skip adb root if one of its sub adb cmd fails in the lab
Change-Id: Ide1901dd1c16aa87298ae99702b5aa941f6de299
diff --git a/utils/python/controllers/android_device.py b/utils/python/controllers/android_device.py
index 1a0cb81..27cffaa 100644
--- a/utils/python/controllers/android_device.py
+++ b/utils/python/controllers/android_device.py
@@ -396,19 +396,12 @@
if not self.isAdbRoot:
try:
self.adb.root()
- except adb.AdbError as e:
- # adb root is not always possible in the lab
- logging.exception(e)
- try:
+ self.adb.wait_for_device()
+ self.adb.remount()
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()
- try:
- self.adb.wait_for_device()
- except adb.AdbError as e:
- # adb wait-for-device is not always possible in the lab
+ # continue with an assumption it's done by the harness.
logging.exception(e)
def startAdbLogcat(self):