Lines Matching refs:adb_path
50 def get_devices(adb_path='adb'): argument
52 subprocess.check_call([adb_path, 'start-server'], stdout=devnull,
54 out = subprocess.check_output([adb_path, 'devices']).splitlines()
70 def _get_unique_device(product=None, adb_path='adb'): argument
71 devices = get_devices(adb_path=adb_path)
74 return AndroidDevice(devices[0], product, adb_path)
77 def _get_device_by_serial(serial, product=None, adb_path='adb'): argument
78 for device in get_devices(adb_path=adb_path):
80 return AndroidDevice(serial, product, adb_path)
84 def get_device(serial=None, product=None, adb_path='adb'): argument
106 return _get_device_by_serial(serial, product, adb_path)
110 return _get_device_by_serial(android_serial, product, adb_path)
112 return _get_unique_device(product, adb_path=adb_path)
115 def _get_device_by_type(flag, adb_path): argument
117 subprocess.check_call([adb_path, 'start-server'], stdout=devnull,
120 serial = subprocess.check_output([adb_path, flag, 'get-serialno']).strip()
125 return _get_device_by_serial(serial, adb_path=adb_path)
128 def get_usb_device(adb_path='adb'): argument
138 return _get_device_by_type('-d', adb_path=adb_path)
141 def get_emulator_device(adb_path='adb'): argument
151 return _get_device_by_type('-e', adb_path=adb_path)
227 def __init__(self, serial, product=None, adb_path='adb'): argument
230 self.adb_cmd = [adb_path]