2016-05-06 14:45:23 +03:00
|
|
|
#!/bin/bash
|
|
|
|
|
2024-03-29 18:56:51 +03:00
|
|
|
#
|
|
|
|
# SPDX-FileCopyrightText: 2021 Ralf Kistner <ralf@embarkmobile.com>
|
|
|
|
# SPDX-License-Identifier: CC0-1.0
|
|
|
|
#
|
|
|
|
|
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"
|
2018-06-22 12:45:00 +03:00
|
|
|
if [[ "$bootanim" =~ "not found" || "$bootanim" =~ "error" ]]; then
|
2016-05-06 14:45:23 +03:00
|
|
|
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"
|
2018-03-02 14:08:09 +03:00
|
|
|
sleep 5
|
2016-05-06 14:45:23 +03:00
|
|
|
done
|
2016-09-26 17:13:17 +03:00
|
|
|
echo "($checkcounter) Done"
|
|
|
|
adb -e shell input keyevent 82
|
2018-03-02 14:08:09 +03:00
|
|
|
echo "($checkcounter) Unlocked emulator screen"
|