MCPcopy Create free account
hub / github.com/XiaoMi/mace / list_devices

Method list_devices

tools/python/utils/device.py:137–149  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

135
136 @staticmethod
137 def list_devices():
138 out = execute("adb devices", False)
139 serialno_list = out.strip().split('\n')[1:]
140 serialno_list = [tuple(pair.split('\t')) for pair in serialno_list]
141 devices = []
142 for serialno in serialno_list:
143 if (len(serialno) < 2 or
144 serialno[1].startswith("no permissions") or
145 serialno[1].startswith("unauthorized")):
146 continue
147 devices.append(serialno[0])
148
149 return devices
150
151 def install(self, target, install_dir, install_deps=False):
152 install_dir = os.path.abspath(install_dir)

Callers

nothing calls this directly

Calls 1

executeFunction · 0.85

Tested by

no test coverage detected