Skip to content

Commit d834f3e

Browse files
author
shushant
committed
Create wait_for_emulator
1 parent 19a0ca6 commit d834f3e

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

wait_for_emulator

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
3+
# Originally written by Ralf Kistner <[email protected]>, but placed in the public domain
4+
5+
set +e
6+
7+
bootanim=""
8+
failcounter=0
9+
until [[ "$bootanim" =~ "stopped" ]]; do
10+
bootanim=`adb -e shell getprop init.svc.bootanim 2>&1`
11+
echo "$bootanim"
12+
if [[ "$bootanim" =~ "not found" ]]; then
13+
let "failcounter += 1"
14+
if [[ $failcounter -gt 15 ]]; then
15+
echo "Failed to start emulator"
16+
exit 1
17+
fi
18+
fi
19+
sleep 1
20+
done
21+
echo "Done"

0 commit comments

Comments
 (0)