diff options
| author | Rami Potinkara <rami.potinkara@qt.io> | 2025-09-02 12:34:22 +0300 |
|---|---|---|
| committer | Rami Potinkara <rami.potinkara@qt.io> | 2025-09-15 11:37:03 +0000 |
| commit | 414316f8ee6ced40217cc597db05167a3ac0f7d2 (patch) | |
| tree | 63089cc91a607d40225a48f96295035e3a97865e | |
| parent | 10729614963b9e9b2348ca2c1db53aca88d9b322 (diff) | |
Android: Fix Android 16 emulator CI start problems6.9
This patch updates the fully booted check for Android.
Old logic used init.svc.bootanim property and it's status
"stopped", but since Android 16 forward the status is kept
empty "" if "-no-boot-anim" emulator startup parameter is used.
The new logic simplifies old and relies only to two values:
sys.boot_completed and dev.bootcomplete. These work similary
from Android 9 to 16.
Task-number: QTQAINFRA-7399
Task-number: QTQAINFRA-7298
Pick-to: 6.8
Change-Id: I62efb0b05cd9792f92040dcb98a37f4bf14022e6
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Elias Toivola <elias.toivola@qt.io>
(cherry picked from commit 0eb085f93ddef133aeee2dbcc5cb9b241774300c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 9f42f331947e911cc6a0da33b11c3ed849b050b8)
| -rwxr-xr-x | coin/provisioning/common/linux/android_emulator_launcher.sh | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/coin/provisioning/common/linux/android_emulator_launcher.sh b/coin/provisioning/common/linux/android_emulator_launcher.sh index 351a04f9f..bd89fe1a3 100755 --- a/coin/provisioning/common/linux/android_emulator_launcher.sh +++ b/coin/provisioning/common/linux/android_emulator_launcher.sh @@ -25,13 +25,12 @@ function check_for_android_device } # WARNING: On the very first boot of the emulator it happens that the device -# "finishes" booting and getprop shows bootanim=stopped and -# boot_completed=1. But sometimes not all packages have been installed (`pm -# list packages` shows only 16 packages installed), and after around half a -# minute the boot animation starts spinning (bootanim=running) again despite -# boot_completed=1 all the time. After some minutes the boot animation stops -# again and the list of packages contains 80 packages. Only then the device is -# fully booted, and only then is dev.bootcomplete=1. +# "finishes" booting and getprop shows boot_completed=1. But sometimes not all +# packages have been installed (`pm list packages` shows only 16 packages +# installed), and after around half a minute the boot animation starts spinning +# again despite boot_completed=1 all the time. After some minutes the boot +# animation stops again and the list of packages contains 80 packages. +# Only then the device is fully booted, and only then is dev.bootcomplete=1. # # To reproduce the emulator booting as the first time, you have to delete the # cached images found inside $HOME/.android/avd/{avd_name}.avd/ especially the @@ -39,11 +38,10 @@ function check_for_android_device function check_if_fully_booted { # The "getprop" command separates lines with \r\n so we trim them - bootanim=$( timeout 1 "$ADB_EXEC" shell getprop init.svc.bootanim | tr -d '\r\n') boot_completed=$(timeout 1 "$ADB_EXEC" shell getprop sys.boot_completed | tr -d '\r\n') bootcomplete=$( timeout 1 "$ADB_EXEC" shell getprop dev.bootcomplete | tr -d '\r\n') - echo "bootanim=$bootanim boot_completed=$boot_completed bootcomplete=$bootcomplete" - [ "$bootanim" = stopped ] && [ "$boot_completed" = 1 ] && [ "$bootcomplete" = 1 ] + echo "boot_completed=$boot_completed bootcomplete=$bootcomplete" + [ "$boot_completed" = 1 ] && [ "$bootcomplete" = 1 ] } for counter in $(seq ${EMULATOR_MAX_RETRIES}) |
