Fix: Ignore device that getprop is unavailable

This commit is contained in:
LmeSzinc 2024-06-07 09:16:24 +08:00
parent 33cefa9817
commit ab27a00125

View File

@ -59,10 +59,15 @@ class AdbManager(DeployConfig):
del os.environ[k]
for device in adbutils.adb.iter_device():
logger.info(f'Init device {device}')
initer = init.Initer(device, loglevel=logging.DEBUG)
# MuMu X has no ro.product.cpu.abi, pick abi from ro.product.cpu.abilist
if initer.abi not in ['x86_64', 'x86', 'arm64-v8a', 'armeabi-v7a', 'armeabi']:
initer.abi = initer.abis[0]
# /bin/sh: getprop: not found
if 'getprop' in initer.abi:
logger.warning(f'Cannot getprop from device {device}, result: {initer.abi}')
continue
initer.set_atx_agent_addr('127.0.0.1:7912')
for _ in range(2):