Last active
April 4, 2017 03:28
-
-
Save wangyung/c3b6626c7f8568195843c47ae8dfa06c to your computer and use it in GitHub Desktop.
Start android emulator
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/bash | |
#stop emulator | |
process=`ps -ef | awk '/[e]mulator/{print $2}'` | |
for i in $process; do | |
kill -9 $i; | |
done | |
#launch emulator | |
$ANDROID_SDK_PATH/tools/emulator -avd hudson_ja-JP_240_480x640_android-21_armeabi-v7a_creators-market -no-window & | |
#wait for emulator bootup | |
booted=`$ANDROID_SDK_PATH/platform-tools/adb shell getprop sys.boot_completed | tr -d '\r'` | |
while [ "$booted" != 1 ]; do | |
echo "emulator is not booted, waiting 3 sec" | |
sleep 3 | |
booted=`$ANDROID_SDK_PATH/platform-tools/adb shell getprop sys.boot_completed | tr -d '\r'` | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment