Repository navigation
Conversation
插件与 DSH 工具跑在 proot 里,只能看到 guest 挂载视图。guest 内看不到 /vendor 或打不开 /dev/fastrpc-cdsp 时,无法区分「机型没有驱动」 「proot 未绑定」与「厂商 SELinux 策略挡住本应用」。 在 startSandbox() 加一行只读探针(宿主上下文):fastrpc 节点的 exists/canRead/canWrite、OpenCL/Vulkan/QNN 库可见性、/proc/self/attr/current。 不改变任何启动行为。
Author
探针已在真机出结果(iQOO 15 / Android 17 / SDK 37)把探针调用点移到 同机对照数据:
要点:
配套实测(PR #95 的 /vendor 绑定):注入 android-side 后在 guest 内 |
This branch has not been deployed
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.
延续上一条 PR「把 /vendor 绑定进 proot」的背景:那次改动只解决 guest 看不到
/vendor,但还有一个当时无法回答的问题——guest 里打不开
/dev/fastrpc-cdsp时,到底是机型没有驱动、proot 没绑定,还是厂商 SELinux 策略挡住了本应用? 三者修法完全不同。
本 PR 做了什么
在
DefaultSandboxManager.startSandbox()里加一行调用,并在 proot 之外(App 自身 SELinux上下文)记录一次只读探测,输出到 logcat:
判读方式:
fastrpc(exists=false)exists=true r=false w=falseopencl=true vulkanIcd=true但 guest 内看不到为什么必须在宿主侧
这轮实测里出现了一组互相矛盾的观察:
stat /dev/fastrpc-cdspEACCES(而同容器/dev/kgsl-3d0是真字符设备,可 rw)adb shell(shell 域)读写EACCESu:r:untrusted_app_34:s0:c255,…)remote_handle64_open ... libggml-htp-v81.so ... domain 3,4B 模型 decode 15.3 tok/s两个 App 域相同、仅 MLS 类别不同,结论无法从 guest 侧推出。这行日志能一次定死。
风险与影响
exists/canRead/canWrite+ 读/proc/self/attr/current;不写文件、不联网、不上报startSandbox()一行日志,不影响状态机与启动时序;异常用runCatching兜底复现