mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-18 03:48:08 +00:00
Update wait-for-android-emulator
This commit is contained in:
parent
4308bedbd6
commit
e83e427eb1
1 changed files with 4 additions and 4 deletions
|
|
@ -9,7 +9,7 @@ adb="${ANDROID_HOME}/platform-tools/adb"
|
|||
device="emulator-5554"
|
||||
timeout_in_sec=360
|
||||
|
||||
while getopts a:t:d flag; do
|
||||
while getopts a:d:t flag; do
|
||||
case "${flag}" in
|
||||
a) adb=${OPTARG};;
|
||||
d) device=${OPTARG};;
|
||||
|
|
@ -19,11 +19,11 @@ done
|
|||
|
||||
until [[ "$bootanim" =~ "stopped" ]]; do
|
||||
bootanim=`$adb -s $device -e shell getprop init.svc.bootanim 2>&1 &`
|
||||
if [[ "$bootanim" =~ "device not found" || "$bootanim" =~ "device offline"
|
||||
if [[ "$bootanim" =~ "device '$device' not found" || "$bootanim" =~ "device '$device' offline"
|
||||
|| "$bootanim" =~ "running" ]]; then
|
||||
let "failcounter += 1"
|
||||
if [[ $failcounter = 1 ]]; then
|
||||
echo -n "Waiting for emulator to start"; else
|
||||
echo -n "Waiting for $device to start"; else
|
||||
echo -n "."
|
||||
fi
|
||||
if [[ $failcounter -gt timeout_in_sec ]]; then
|
||||
|
|
@ -34,4 +34,4 @@ until [[ "$bootanim" =~ "stopped" ]]; do
|
|||
sleep 1
|
||||
done
|
||||
|
||||
echo "Emulator is ready"
|
||||
echo "$device is ready"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue