Index: build/android/pylib/android_commands.py |
diff --git a/build/android/pylib/android_commands.py b/build/android/pylib/android_commands.py |
index 20684b7b07b317b870370d8476eb237f6cbffe23..c1f25eb200add21cc388b7fe5d7fac328bfc9576 100644 |
--- a/build/android/pylib/android_commands.py |
+++ b/build/android/pylib/android_commands.py |
@@ -458,6 +458,14 @@ class AndroidCommands(object): |
if out.strip() != 'remount succeeded': |
raise errors.MsgException('Remount failed: %s' % out) |
+ def RestartAdbdOnDevice(self): |
+ logging.info('Killing adbd on the device...') |
+ adb_pids = self.ExtractPid('adbd') |
+ if adb_pids: |
tonyg
2013/10/21 17:48:39
Should we assert adb_pids? There is no way we'd be
bulach
2013/10/21 18:49:40
Done.
|
+ self.RunShellCommandWithSU('kill %s' % ' '.join(adb_pids)) |
tonyg
2013/10/21 17:48:39
We already have a KillAll() method in this class.
bulach
2013/10/21 18:49:40
Done.
|
+ logging.info('Waiting for device to settle...') |
+ self._adb.SendCommand('wait-for-device') |
+ |
def RestartAdbServer(self): |
"""Restart the adb server.""" |
ret = self.KillAdbServer() |