1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-01-31 02:00:45 +00:00

android: avoid connect for USB target

The "adb connect" command is not required for USB connected devices.
This patch is a small update to use "adb connect" only for android devices
accessed by IP address.

Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
This commit is contained in:
Patrick Bellasi 2016-07-15 11:18:09 +01:00
parent c4784e0993
commit f714dd39f1

View File

@ -265,6 +265,10 @@ def adb_get_device(timeout=None):
def adb_connect(device, timeout=None, attempts=MAX_ATTEMPTS): def adb_connect(device, timeout=None, attempts=MAX_ATTEMPTS):
_check_env() _check_env()
# Connect is required only for ADB-over-IP
if "." not in device:
logger.debug('Device connected via USB, connect not required')
return
tries = 0 tries = 0
output = None output = None
while tries <= attempts: while tries <= attempts: