diff --git a/tools/device.py b/tools/device.py index c7e95553f978a3615c9f52282dd9c29e15d54cce..dc51e4aec22e02e034e8849302bdeffe48a51bda 100644 --- a/tools/device.py +++ b/tools/device.py @@ -953,14 +953,10 @@ class DeviceWrapper: class DeviceManager: @classmethod def list_adb_device(cls): - adb_list = sh.adb('devices').stdout.decode('utf-8'). \ - strip().split('\n')[1:] - adb_list = [tuple(pair.split('\t')) for pair in adb_list] devices = [] + adb_list = sh_commands.adb_devices() for adb in adb_list: - if adb[1].startswith("no permissions"): - continue - prop = sh_commands.adb_getprop_by_serialno(adb[0]) + prop = sh_commands.adb_getprop_by_serialno(adb) android = { YAMLKeyword.device_name: prop['ro.product.model'].replace(' ', ''), @@ -968,7 +964,7 @@ class DeviceManager: prop['ro.product.cpu.abilist'].split(','), YAMLKeyword.target_socs: prop['ro.board.platform'], YAMLKeyword.system: SystemType.android, - YAMLKeyword.address: adb[0], + YAMLKeyword.address: adb, YAMLKeyword.username: '', } if android not in devices: