Index: build/android/pylib/android_commands.py |
diff --git a/build/android/pylib/android_commands.py b/build/android/pylib/android_commands.py |
index cb72fffba55ae46025c824bdd0e060fa52e658ed..f8c074758d08c35ce7b637959447b1a68faaf598 100644 |
--- a/build/android/pylib/android_commands.py |
+++ b/build/android/pylib/android_commands.py |
@@ -350,6 +350,11 @@ class AndroidCommands(object): |
if full_reboot or not self.IsRootEnabled(): |
self._adb.SendCommand('reboot') |
timeout = 300 |
+ retries = 1 |
+ # Wait for the device to disappear. |
+ while retries < 10 and self.IsOnline(): |
+ time.sleep(1) |
+ retries += 1 |
else: |
self.RestartShell() |
timeout = 120 |