Is there a way to have a timeout when calling "adb wait-for-devices"?
Scenario:
adb reboot
adb wait-for-devices (timeout listed here - if possible)
**if times out: echo timed out**
**else**
adb root
adb wait-for-devices
In Bash,
timeout <time_in_seconds> adb wait-for-any-device
Ex: Below command waits for 40 seconds to scan for adb devices, and will return the exit code of the command, on success, or 124 on timeout, or exit code of command on command failure.
timeout 40 adb wait-for-any-device
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With