Home | History | Annotate | Download | only in adb

Lines Matching refs:adb_path

50 def get_devices(adb_path='adb'):
52 subprocess.check_call([adb_path, 'start-server'], stdout=devnull,
55 subprocess.check_output([adb_path, 'devices']).decode('utf-8'))
71 def _get_unique_device(product=None, adb_path='adb'):
72 devices = get_devices(adb_path=adb_path)
75 return AndroidDevice(devices[0], product, adb_path)
78 def _get_device_by_serial(serial, product=None, adb_path='adb'):
79 for device in get_devices(adb_path=adb_path):
81 return AndroidDevice(serial, product, adb_path)
85 def get_device(serial=None, product=None, adb_path='adb'):
107 return _get_device_by_serial(serial, product, adb_path)
111 return _get_device_by_serial(android_serial, product, adb_path)
113 return _get_unique_device(product, adb_path=adb_path)
116 def _get_device_by_type(flag, adb_path):
118 subprocess.check_call([adb_path, 'start-server'], stdout=devnull,
122 [adb_path, flag, 'get-serialno']).decode('utf-8').strip()
127 return _get_device_by_serial(serial, adb_path=adb_path)
130 def get_usb_device(adb_path='adb'):
140 return _get_device_by_type('-d', adb_path=adb_path)
143 def get_emulator_device(adb_path='adb'):
153 return _get_device_by_type('-e', adb_path=adb_path)
232 def version(adb_path=None):
235 adb_path = adb_path if adb_path is not None else ['adb']
236 version_output = subprocess.check_output(adb_path + ['version'])
262 def __init__(self, serial, product=None, adb_path='adb'):
265 self.adb_path = adb_path
266 self.adb_cmd = [adb_path]