Closed hannesa2 closed 1 year ago
Hey @hannesa2.
wait-for-xx
command in adb only waits for a specific state in the adb server, in this case you’re suggesting to replace the getprop sys.boot_completed
check with checking if device appeared with state device
==online
. This will result in failures during action execution due to device not fully booted.
Refer to https://cs.android.com/android/platform/superproject/+/master:packages/modules/adb/services.cpp;l=155?q=Wait-for&ss=android%2Fplatform%2Fsuperproject:packages%2Fmodules%2Fadb%2F for more information on how wait-for-xx
works.
Currently you do a polling for an emulator start https://github.com/Malinskiy/action-android/blob/b58aaba4a3bfe4966c26be53b573b2b2a5c2e936/emulator-run-cmd/src/emulator.ts#L42-L69
which results in a lot of noise
But there is an
adb wait-for-device
which can do this with one command. To specify the timeout you could do atimeout <some seconds> adb wait-for-device
It's just a suggestion.