Repository navigation
问题包补收管理器日志、adb 进程与 adb server 日志、Windows 保留端口 - #112
Merged
Merged
Conversation
有用户新建实例开机超时,问题包里缺了排查要用的三样东西,只能另外问对方要: 管理器自己的日志、机器上的 adb.exe 和 adb server 的日志、Windows 保留的端口。 - 管理器日志:logs\modavd-ui.log、modavd-bootwatch.log 和各自的 .1,各取最后 5 MB - adb.exe 进程与 adb server 日志:列出所有 adb.exe(没在监听的也列),复制 ANDROID_ADB_LOG_PATH 或临时目录下 adb.log 的最后 2 MB - Windows 保留的 TCP 端口:原样列出 netsh excludedportrange 的输出,并指出本目录的 adb server 端口和各实例的端口有没有落在里面 这三节脚本里没有,不计时;和脚本逐行对照的测试跳过这三节和它们的文件。
qiyinxi
enabled auto-merge
November 9, 2026 16:22
qiyinxi
disabled auto-merge
November 9, 2026 16:23
This was referenced Nov 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
为什么 有用户新建实例时开机超时,可问题包里看不出原因,还得另外问对方要三样东西: - 管理器自己的日志
modavd-ui.log:任务过程都记在这里,问题包以前不收; - adb server 起不来时,要看机器上有哪些 adb.exe、adb server 自己的日志里写了什么; - 端口能不能用,要用户再跑一次 netsh 看 Windows 保留了哪些端口。 这些应该一次都收进问题包。 ## 改了什么 - 问题包新加三节(collect-info.ps1 没有这三节): - 管理器日志:logs\modavd-ui.log、modavd-bootwatch.log,以及各自的.1,每份取最后 5 MB。文件不在就写「没有」,.1不在不提。 - adb.exe 进程与 adb server 日志: - 列出所有 adb.exe 的 pid、启动时间、路径、命令行,没在监听的也列。 - 复制 adb server 日志的最后 2 MB:设了ANDROID_ADB_LOG_PATH就取它,否则取临时目录下的adb.log(和 GetTempPath 一样,先看 TMP 再看 TEMP)。 - 读不到进程表时只在这一节写一行,不算出错的节;「正在运行的模拟器与 adb」那一节已经记过这个错了。 - Windows 保留的 TCP 端口:原样列出netsh interface ipv4 show excludedportrange protocol=tcp的输出,再指出本目录的两个 adb server 端口、各实例的控制台 / adb / gRPC 端口有没有落在保留范围里。 - 三节都不进「收集过程」的耗时列表。哪一节失败,照常写进「出错的节」,后面几节接着收。 - 和脚本逐行对照的测试跳过这三节和它们的文件。full 场景里那两份日志不再标成 not collected,另加了一份 adb.log。 - README 里collect-info那一行写明了多收的东西。 ## 测试 -go test ./internal/report/:新测试覆盖三节的内容、只取末尾、端口落在保留范围里时的警告、netsh 起不来时记为本节出错。 -go test ./...,go vet(windows / darwin / linux)。 - 本机编了 modavd.exe,对一个测试根实际跑了一次collect-info: - 三份新文件进了包; - netsh 那一节列出了本机的保留范围,判断为「本目录要用的端口都不在保留范围里」; - 各节都没出错。Refs ModAVD/ModAVD#172