Chromium Code Reviews| Index: build/android/pylib/android_commands.py |
| diff --git a/build/android/pylib/android_commands.py b/build/android/pylib/android_commands.py |
| index ee12cd436a2dbc90f903c66dac37f933ba99e294..d0ef0a3db0a75462247e6c3b6dd77573bf2cdc48 100644 |
| --- a/build/android/pylib/android_commands.py |
| +++ b/build/android/pylib/android_commands.py |
| @@ -544,19 +544,16 @@ class AndroidCommands(object): |
| raise errors.MsgException('Remount failed: %s' % out) |
| def RestartAdbdOnDevice(self): |
| - logging.info('Killing adbd on the device...') |
| - adb_pids = self.ExtractPid('adbd') |
| - if not adb_pids: |
| - raise errors.MsgException('Unable to obtain adbd pid') |
| - try: |
| - self.KillAll('adbd', signum=signal.SIGTERM, with_su=True) |
| - logging.info('Waiting for device to settle...') |
| + logging.info('Restarting adbd on the device...') |
| + with DeviceTempFile(self, suffix=".sh") as temp_script_file: |
|
bulach
2014/06/02 11:47:50
nit: s/"/'/
|
| + host_script_path = os.path.join(constants.DIR_SOURCE_ROOT, |
| + 'build', |
| + 'android', |
| + 'pylib', |
| + 'restart_adbd.sh') |
| + self._adb.Push(host_script_path, temp_script_file.name) |
| + self.RunShellCommand('. %s' % temp_script_file.name) |
| self._adb.SendCommand('wait-for-device') |
| - new_adb_pids = self.ExtractPid('adbd') |
| - if new_adb_pids == adb_pids: |
| - logging.warning('adbd on the device may not have been restarted.') |
| - except Exception as e: |
| - logging.error('Exception when trying to kill adbd on the device [%s]', e) |
| def RestartAdbServer(self): |
| """Restart the adb server.""" |