Created
January 5, 2015 04:16
-
-
Save viperwarp/3cfc572a77f784c255a5 to your computer and use it in GitHub Desktop.
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 | |
# Originally written by Ralf Kistner <[email protected]>, but placed in the public domain | |
# Edited for log brevity by Affian <https://github.com/viperwarp> | |
set +e | |
bootanim="" | |
failcounter=0 | |
echo "Waiting for Emulator" | |
until [[ "$bootanim" =~ "stopped" ]]; do | |
bootanim=`adb -e shell getprop init.svc.bootanim 2>&1` | |
echo -ne "." | |
if [[ "$bootanim" =~ "not found" ]]; then | |
let "failcounter += 1" | |
if [[ $failcounter -gt 15 ]]; then | |
echo "Failed to start emulator" | |
exit 1 | |
fi | |
fi | |
sleep 2 | |
done | |
echo "Done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment