feat: add handle AdbError: unknown host service

This commit is contained in:
2026-07-06 22:40:36 +08:00
parent 63d238171f
commit 430d69695c
11 changed files with 104 additions and 26 deletions
+5 -1
View File
@@ -10,7 +10,7 @@ from module.base.utils import random_rectangle_point
from module.device.method.minitouch import insert_swipe
from module.device.method.scrcpy.core import ScrcpyCore, ScrcpyError
from module.device.method.uiautomator_2 import Uiautomator2
from module.device.method.utils import RETRY_TRIES, handle_adb_error, retry_sleep
from module.device.method.utils import RETRY_TRIES, handle_adb_error, handle_unknown_host_service, retry_sleep
from module.exception import RequestHumanTakeover
from module.logger import logger
@@ -62,6 +62,10 @@ def retry(func):
if handle_adb_error(e):
def init():
self.adb_reconnect()
elif handle_unknown_host_service(e):
def init():
self.adb_start_server()
self.adb_reconnect()
else:
break
# Unknown, probably a trucked image