continue if adb wait-for-device fails
Change-Id: I2b6d8de1a701d05762e16e272376906be0ec5fe0
diff --git a/utils/python/controllers/android_device.py b/utils/python/controllers/android_device.py
index 7269a95..1a0cb81 100644
--- a/utils/python/controllers/android_device.py
+++ b/utils/python/controllers/android_device.py
@@ -399,9 +399,17 @@
except adb.AdbError as e:
# adb root is not always possible in the lab
logging.exception(e)
- self.adb.wait_for_device()
+ try:
+ self.adb.wait_for_device()
+ except adb.AdbError as e:
+ # adb wait-for-device is not always possible in the lab
+ logging.exception(e)
self.adb.remount()
- self.adb.wait_for_device()
+ try:
+ self.adb.wait_for_device()
+ except adb.AdbError as e:
+ # adb wait-for-device is not always possible in the lab
+ logging.exception(e)
def startAdbLogcat(self):
"""Starts a standing adb logcat collection in separate subprocesses and
@@ -456,7 +464,11 @@
This function times out after 15 minutes.
"""
- self.adb.wait_for_device()
+ try:
+ self.adb.wait_for_device()
+ except adb.AdbError as e:
+ # adb wait-for-device is not always possible in the lab
+ logging.exception(e)
while True:
try:
out = self.adb.shell("getprop sys.boot_completed")