Created
July 2, 2015 14:11
-
-
Save tolmachevroman/73a6f421109fb6f8d04d to your computer and use it in GitHub Desktop.
This shell script allows you to emulate frequent connection drop outs on your device via ADB
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in {1..5} | |
do | |
adb shell settings put global airplane_mode_on 1 | |
adb shell am broadcast -a android.intent.action.AIRPLANE_MODE --ez state true | |
sleep $(( ( RANDOM % 10 ) + 10 )) | |
adb shell settings put global airplane_mode_on 0 | |
adb shell am broadcast -a android.intent.action.AIRPLANE_MODE --ez state false | |
sleep $(( ( RANDOM % 10 ) + 10 )) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment