| 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) |