2016-05-06 14:45:23 +03:00
|
|
|
#!/bin/bash
|
|
|
|
|
2016-09-26 17:13:17 +03:00
|
|
|
# Originally written by Ralf Kistner <ralf@embarkmobile.com>, but placed in the public domain
|
|
|
|
|
2016-05-06 14:45:23 +03:00
|
|
|
bootanim=""
|
|
|
|
failcounter=0
|
|
|
|
checkcounter=0
|
2016-09-26 17:13:17 +03:00
|
|
|
|
2016-05-06 14:45:23 +03:00
|
|
|
until [[ "$bootanim" =~ "stopped" ]]; do
|
|
|
|
bootanim=`adb -e shell getprop init.svc.bootanim 2>&1`
|
|
|
|
echo "($checkcounter) $bootanim"
|
|
|
|
if [[ "$bootanim" =~ "not found" ]]; then
|
|
|
|
let "failcounter += 1"
|
2016-09-26 17:13:17 +03:00
|
|
|
if [[ $failcounter -gt 3 ]]; then
|
2016-05-06 14:45:23 +03:00
|
|
|
echo "Failed to start emulator"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
let "checkcounter += 1"
|
|
|
|
sleep 10
|
|
|
|
done
|
2016-09-26 17:13:17 +03:00
|
|
|
echo "($checkcounter) Done"
|
|
|
|
adb -e shell input keyevent 82
|
|
|
|
echo "($checkcounter) Unlocked emulator screen"
|