mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-20 04:58:07 +00:00
Update wait-for-android-emulator
This commit is contained in:
parent
4b1dfad106
commit
0ecc00909f
1 changed files with 13 additions and 4 deletions
|
|
@ -1,15 +1,24 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Originally written by Ralf Kistner <ralf@embarkmobile.com>, but placed in the public domain
|
||||
|
||||
set +e
|
||||
|
||||
bootanim=""
|
||||
failcounter=0
|
||||
|
||||
adb=`${ANDROID_HOME}/platform-tools/adb`
|
||||
device=`emulator-5554`
|
||||
timeout_in_sec=360
|
||||
|
||||
while getopts a:t:d flag; do
|
||||
case "${flag}" in
|
||||
a) adb=${OPTARG};;
|
||||
d) device=${OPTARG};;
|
||||
t) timeout_in_sec=${OPTARG};;
|
||||
esac
|
||||
done
|
||||
|
||||
until [[ "$bootanim" =~ "stopped" ]]; do
|
||||
bootanim=`${ANDROID_HOME}/platform-tools/adb -e shell getprop init.svc.bootanim 2>&1 &`
|
||||
bootanim=`$adb -s $device -e shell getprop init.svc.bootanim 2>&1 &`
|
||||
if [[ "$bootanim" =~ "device not found" || "$bootanim" =~ "device offline"
|
||||
|| "$bootanim" =~ "running" ]]; then
|
||||
let "failcounter += 1"
|
||||
|
|
@ -25,4 +34,4 @@ until [[ "$bootanim" =~ "stopped" ]]; do
|
|||
sleep 1
|
||||
done
|
||||
|
||||
echo "Emulator is ready"
|
||||
echo "Emulator is ready"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue