Skip to content

Instantly share code, notes, and snippets.

@mattak
Last active August 29, 2015 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattak/9930103 to your computer and use it in GitHub Desktop.
Save mattak/9930103 to your computer and use it in GitHub Desktop.
android emulator wait script.
#!/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