ADFA-3827 Whitelist for MIUI's AccessController.haveAccessControlPassword disk read during startActivity transitions#1246
Conversation
…read during startActivity transitions
📝 WalkthroughWalkthroughA new strict-mode whitelist rule is added to Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@app/src/main/java/com/itsaky/androidide/app/strictmode/WhitelistEngine.kt`:
- Around line 142-144: Update the comment in WhitelistEngine.kt to avoid
implying the violation originates remotely in the system_server; instead note
that the stack shows com.miui.server.AccessController and SecurityManagerService
frames executing in-process on MIUI ROMs (e.g., "executes in-process during
activity transitions on MIUI ROMs"), so change the wording around that block
where the current comment mentions "happens in the system server and is reported
back via Binder" to the tightened phrasing; keep this as a documentation-only
change in the same comment near the handling of
AccessController/SecurityManagerService frames.
- Around line 137-153: Add a unit test in WhitelistRulesTest.kt that covers the
new rule: create a test method (follow naming like
allow_DiskRead_on_MiuiMultiLangHelperTextViewDraw, e.g.,
allow_DiskRead_on_MiuiAccessControllerHaveAccessControlPassword) that constructs
a stack trace with adjacent frames matching java.io.File.exists ->
com.miui.server.AccessController.haveAccessControlPassword ->
com.miui.server.SecurityManagerService.haveAccessControlPassword, triggers a
DiskReadViolation, and asserts the WhitelistEngine rule allows it (use the same
helper/assert utilities used by existing tests to verify the rule permits
DiskReadViolation for that frame sequence).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 933dbfc7-143a-4823-a62b-0a31ae4b0355
📒 Files selected for processing (1)
app/src/main/java/com/itsaky/androidide/app/strictmode/WhitelistEngine.kt
Part of fixing StrictMode violations
Xiaomi/MIUI ROM checks an access-control password file during activity transitions