mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-09 18:39:04 +08:00
跳过尝试连接emulator
connect连的是ip+端口,应该连不上emulator-55xx吧(
This commit is contained in:
parent
49aa866eb6
commit
c9820e5ff3
@ -80,12 +80,15 @@ class Connection:
|
||||
self.adb_command(cmd, serial)
|
||||
|
||||
def _adb_connect(self, serial):
|
||||
if 'emulator' in serial:
|
||||
return True
|
||||
else:
|
||||
for _ in range(3):
|
||||
msg = self.adb_command(['connect', serial]).decode("utf-8").strip()
|
||||
logger.info(msg)
|
||||
if 'already' in msg:
|
||||
return True
|
||||
|
||||
else:
|
||||
logger.warning(f'Failed to connect {serial} after 3 trial.')
|
||||
return False
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user