From c1c8a4ba13431a5d249c037cd540ae87650e5f8d Mon Sep 17 00:00:00 2001 From: DjBushido Date: Sat, 5 Jul 2014 11:23:28 -0400 Subject: [PATCH] Forgot the wait_for_emulator script... --- wait_for_emulator | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 wait_for_emulator diff --git a/wait_for_emulator b/wait_for_emulator new file mode 100644 index 0000000..207f028 --- /dev/null +++ b/wait_for_emulator @@ -0,0 +1,17 @@ +#!/bin/bash + +bootanim="" +failcounter=0 +until [[ "$bootanim" =~ "stopped" ]]; do + bootanim=`adb -e shell getprop init.svc.bootanim 2>&1` + echo "$bootanim" + if [[ "$bootanim" =~ "not found" ]]; then + let "failcounter += 1" + if [[ $failcounter -gt 3 ]]; then + echo "Failed to start emulator" + exit 1 + fi + fi + sleep 1 +done +echo "Done" \ No newline at end of file