Created
July 11, 2012 20:02
-
-
Save eagletmt/3092913 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
AVD="$1" | |
if [ -z "$AVD" ]; then | |
echo "usage: $0 <avd name>" | |
exit 1 | |
fi | |
emulator-arm -avd "$AVD" -no-window & | |
ant clean debug | |
echo 'Waiting for device...' | |
adb wait-for-device | |
for _ in `seq 30` | |
do | |
# send MENU key to unlock the screen | |
# http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_MENU | |
R=$(adb shell input keyevent 82) | |
if [ -z "$R" ]; then | |
break | |
fi | |
echo "input returned: $R" | |
sleep 1 | |
done | |
ant installd test | |
kill %1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment