mirror of
https://gitlab.shinice.net/pixeldroid/PixelDroid
synced 2025-01-11 14:44:02 +01:00
eh
This commit is contained in:
parent
6469e87609
commit
5ee424697a
@ -15,7 +15,7 @@ connected_check_task:
|
|||||||
start_emulator_background_script:
|
start_emulator_background_script:
|
||||||
$ANDROID_HOME/emulator/emulator -avd "api-${API_LEVEL}" -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -camera-back none
|
$ANDROID_HOME/emulator/emulator -avd "api-${API_LEVEL}" -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -camera-back none
|
||||||
wait_for_emulator_script:
|
wait_for_emulator_script:
|
||||||
adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 3; done; input keyevent 82'
|
- ./android-wait-for-emulator.sh
|
||||||
disable_animations_script: |
|
disable_animations_script: |
|
||||||
adb shell settings put global window_animation_scale 0.0
|
adb shell settings put global window_animation_scale 0.0
|
||||||
adb shell settings put global transition_animation_scale 0.0
|
adb shell settings put global transition_animation_scale 0.0
|
||||||
|
28
android-wait-for-emulator.sh
Normal file
28
android-wait-for-emulator.sh
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Originally written by Ralf Kistner <ralf@embarkmobile.com>, but placed in the public domain
|
||||||
|
|
||||||
|
#set -x
|
||||||
|
set +e
|
||||||
|
|
||||||
|
bootanim=""
|
||||||
|
failcounter=0
|
||||||
|
#timeout_in_sec=360 # 6 minutes
|
||||||
|
timeout_in_sec=600 # 10 minutes
|
||||||
|
|
||||||
|
until [[ "$bootanim" =~ "stopped" ]]; do
|
||||||
|
bootanim=`adb -e shell getprop init.svc.bootanim 2>&1 &`
|
||||||
|
#echo bootanim=\`$bootanim\`
|
||||||
|
if [[ "$bootanim" =~ "device not found" || "$bootanim" =~ "device offline"
|
||||||
|
|| "$bootanim" =~ "running" || "$bootanim" =~ "error: no emulators found" ]]; then
|
||||||
|
let "failcounter += 1"
|
||||||
|
echo "Waiting for emulator to start: $failcounter of $timeout_in_sec : status: $bootanim"
|
||||||
|
if [[ $failcounter -ge timeout_in_sec ]]; then
|
||||||
|
echo "Timeout ($timeout_in_sec seconds) reached; failed to start emulator"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Emulator is ready"
|
Loading…
Reference in New Issue
Block a user