2018-07-28 13:23:26 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2018-08-02 10:37:08 +01:00
|
|
|
function wait_emulator_to_be_ready () {
|
|
|
|
boot_completed=false
|
|
|
|
while [ "$boot_completed" == false ]; do
|
|
|
|
status=$(adb wait-for-device shell getprop sys.boot_completed | tr -d '\r')
|
|
|
|
echo "Boot Status: $boot_completed"
|
|
|
|
|
|
|
|
if [ "$boot_completed" == "1" ]; then
|
|
|
|
boot_completed=true
|
|
|
|
else
|
|
|
|
sleep 1
|
|
|
|
fi
|
|
|
|
done
|
2018-07-28 13:23:26 +01:00
|
|
|
}
|
|
|
|
|
2018-08-02 10:37:08 +01:00
|
|
|
function install_google_play_service () {
|
|
|
|
wait_emulator_to_be_ready
|
|
|
|
adb install -r "/root/google_play_service.apk"
|
2018-07-28 13:23:26 +01:00
|
|
|
}
|
2018-08-02 10:37:08 +01:00
|
|
|
|
|
|
|
function disable_animation () {
|
2018-07-28 13:23:26 +01:00
|
|
|
# this is for demonstration what other amazing staff can be done here
|
|
|
|
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 animator_duration_scale 0.0"
|
|
|
|
}
|
2018-08-02 10:37:08 +01:00
|
|
|
|
|
|
|
install_google_play_service
|
|
|
|
disable_animation
|