Last active
August 29, 2015 13:58
-
-
Save mattak/9930103 to your computer and use it in GitHub Desktop.
android emulator wait script.
This file contains 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
#!/bin/sh | |
echo "please launch after: emulator -avd TARGET -no-window -no-boot-anim -no-audio" | |
# wait for launch | |
result="" | |
while [ -z "$result" ]; do | |
sleep 5 | |
adb kill-server | |
adb start-server | |
sleep 5 | |
result=$(adb shell pm path android) | |
echo $result | |
result=$(echo $result | egrep 'package:[a-zA-Z\.\/\-]+') | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment