Lines Matching refs:device

6 Wrapper around the Android device abstraction from src/build/android.
33 """Helper class to execute shell commands on an Android device."""
34 def __init__(self, device=None):
51 # Find specified device or a single attached device if none was specified.
53 self.device = device_utils.DeviceUtils.HealthyDevices(
54 retries=5, enable_usb_resets=True, device_arg=device)[0]
56 # This remembers what we have already pushed to the device.
61 self.device.RemovePath(DEVICE_DIR, force=True, recursive=True)
65 """Push a single file to the device (cached).
70 target_rel: Parent directory of the target location on the device
71 (relative to the device's base dir for testing).
75 # TODO(sergiyb): Implement this method using self.device.PushChangedFiles to
76 # avoid accessing low-level self.device.adb.
95 output = self.device.adb.Push(file_on_host, file_on_device_tmp)
100 self.device.adb.Shell('mkdir -p %s' % folder_on_device)
101 self.device.adb.Shell('cp %s %s' % (file_on_device_tmp, file_on_device))
109 target_dir: Parent directory of the executable on the device (relative to
138 """Execute a command on the device's shell.
141 target_dir: Parent directory of the executable on the device (relative to
145 rel_path: Relative path on device to use as CWD.
154 output = self.device.RunShellCommand(
170 with self.device.GetLogcatMonitor(output_file=logcat_file) as logmon:
178 """Drop ran caches on device."""
179 cache = cache_control.CacheControl(self.device)
183 """Set device into high performance mode."""
184 perf = perf_control.PerfControl(self.device)
188 """Set device into default performance mode."""
189 perf = perf_control.PerfControl(self.device)
194 def android_driver(device=None):
198 _ANDROID_DRIVER = _Driver(device)