| Index: build/android/pylib/device/adb_wrapper.py
|
| diff --git a/build/android/pylib/device/adb_wrapper.py b/build/android/pylib/device/adb_wrapper.py
|
| index 20787c19dc7b665d3140f3af4867da8d0d39f9b5..8e8abf8b5e01bcc7d9bdbc911b3f4e7a634e2758 100644
|
| --- a/build/android/pylib/device/adb_wrapper.py
|
| +++ b/build/android/pylib/device/adb_wrapper.py
|
| @@ -450,7 +450,7 @@ class AdbWrapper(object):
|
| timeout: (optional) Timeout per try in seconds.
|
| retries: (optional) Number of retries to attempt.
|
| """
|
| - cmd = ['backup', path]
|
| + cmd = ['backup', '-f', path]
|
| if apk:
|
| cmd.append('-apk')
|
| if shared:
|
| @@ -542,6 +542,24 @@ class AdbWrapper(object):
|
| raise device_errors.AdbCommandFailedError(
|
| ['root'], output, device_serial=self._device_serial)
|
|
|
| + def Emu(self, cmd, timeout=_DEFAULT_TIMEOUT,
|
| + retries=_DEFAULT_RETRIES):
|
| + """Runs an emulator console command.
|
| +
|
| + See http://developer.android.com/tools/devices/emulator.html#console
|
| +
|
| + Args:
|
| + cmd: The command to run on the emulator console.
|
| + timeout: (optional) Timeout per try in seconds.
|
| + retries: (optional) Number of retries to attempt.
|
| +
|
| + Returns:
|
| + The output of the emulator console command.
|
| + """
|
| + if isinstance(cmd, basestring):
|
| + cmd = [cmd]
|
| + return self._RunDeviceAdbCmd(['emu'] + cmd, timeout, retries)
|
| +
|
| @property
|
| def is_emulator(self):
|
| return _EMULATOR_RE.match(self._device_serial)
|
|
|