Skip to content

开机后读客体时钟源改用 root:shell 用户读不到 - #173

Merged
qiyinxi merged 1 commit into
ModAVD:mainfrom
qiyinxi:fix/clocksource-su-110
Nov 15, 2026
Merged

qiyinxi merged 1 commit into
ModAVD:mainfrom
qiyinxi:fix/clocksource-su-110

Conversation

@qiyinxi

@qiyinxi qiyinxi commented Nov 15, 2026

Copy link
Copy Markdown
Member

Refs ModAVD/ModAVD#110

#171 加的「开机后记下客体时钟源」在 0.41.0 候选包的发版回归里没起作用:5 次开机都只记到「读不到客体时钟源(…Permission denied…)」。Android 14 Google APIs 镜像上 SELinux 不让 adb shell 用户读 /sys/devices/system/clocksource/clocksource0/,以 root 读到的是 tsc。

  • 读时钟源的那条命令改成 su 0 sh -c '…',和后面读内核日志一样用 root。
  • 读失败时,记录文件里的 available 不再留报错文字。
  • 测试:命令必须是一条 su 0 sh -c ;「Permission denied」的输出按读不到处理。go vet ./internal/emu/、go test ./internal/emu/ -run Clocksource 通过。实机在这一版的发版回归里重测。

0.41.0 候选的发版回归里,每次开机都只记到「读不到客体时钟源(…Permission denied…)」:SELinux 不让 adb shell 用户读 /sys/devices/system/clocksource/clocksource0/。改成和读内核日志一样用 su 0;读失败时记录里的 available 不再留报错文字。

Refs ModAVD/ModAVD#110
@qiyinxi qiyinxi added the bug Something isn't working label Nov 15, 2026
@qiyinxi
qiyinxi added this pull request to the merge queue Nov 15, 2026
Merged via the queue into ModAVD:main with commit 0714e3c Nov 15, 2026
6 checks passed
@qiyinxi
qiyinxi deleted the fix/clocksource-su-110 branch November 15, 2026 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant