Skip to content

Fix dex2oat wrapper SELinux check on Android 14+#785

Open
pbzin wants to merge 1 commit into
JingMatrix:masterfrom
pbzin:agent/fix-artd-dex2oat-selinux
Open

Fix dex2oat wrapper SELinux check on Android 14+#785
pbzin wants to merge 1 commit into
JingMatrix:masterfrom
pbzin:agent/fix-artd-dex2oat-selinux

Conversation

@pbzin

@pbzin pbzin commented Jul 16, 2026

Copy link
Copy Markdown

Summary

  • detect the Android 14+ artd to dex2oat_exec transition when selecting the wrapper file context
  • keep the existing dex2oat execute_no_trans check for Android versions before 14

Root cause

Android 14 introduced the artd service path for dex2oat. The previous check queried dex2oat with execute_no_trans; on Android 16 this check fails because the supported path is the artd -> dex2oat_exec -> dex2oat domain transition. Vector therefore selected the xposed_file fallback for its bind-mounted wrapper. artd then failed to execute the wrapper because the module policy only grants xposed_file access to the older domains.

The fix uses the platform transition already defined by AOSP, so it does not broaden the module policy with an artd access rule for xposed_file.

Validation

  • Reproduced on a Redmi Note 13 4G running an Android 16 user build: the old path mounted dex2oat64 with xposed_file, and artd logged Permission denied.
  • Confirmed the installed AOSP Android 16 policy defines domain_auto_trans(artd, dex2oat_exec, dex2oat).
  • git diff --check passes.
  • No full build was run.

@JingMatrix

Copy link
Copy Markdown
Owner

@pbzin Please upload your logs in Redmi Note 13 4G for me to better understand what you described.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants