Clarify WiFi ADB scan failure hint
This commit is contained in:
1 parent
5c98bb8353
commit
20e438ee13
2 files changed
+43
-2
No files matched your search
@@ -59,12 +59,16 @@ def _handle_scan_result(
|
||||
if len(connected) == 0 and len(unauthorized) == 0 and failed:
|
||||
# 端口开放但 adb connect 失败:通常是 adb 服务异常 / 设备处于诡异状态。
|
||||
# 把 adb 真实返回拼出来,让用户看到根因,而不是误导地说"请授权"。
|
||||
failed_targets = []
|
||||
for d in failed:
|
||||
msg = (d.message or "").strip().replace("\n", " | ")
|
||||
failed_targets.append(str(d.target or "").strip())
|
||||
on_line(f"[扫描] {d.target} 连接失败 (state=failed): {msg or '未知错误'}")
|
||||
sample_target = next((t for t in failed_targets if t), "<ip:port>")
|
||||
on_line(
|
||||
"[扫描] 提示:可在终端跑 `adb kill-server && adb connect <ip:port>` 看真实输出,"
|
||||
"或检查是否多个 adb 进程冲突"
|
||||
f"[扫描] 提示:多台 WiFi ADB 可同时在线;失败时先逐个执行 "
|
||||
f"`adb connect {sample_target}` 和 `adb devices -l` 看真实状态,"
|
||||
"若 adb server 状态异常再执行 `adb kill-server` 后重试"
|
||||
)
|
||||
return
|
||||
|
||||
|
||||
Reference in new issue
Block a user