Skip to content

fix: avoid custom zygisk SELinux type on KSU#2

Draft
larsmartens wants to merge 1 commit into
masterfrom
fix/ksu-android16-sepolicy
Draft

fix: avoid custom zygisk SELinux type on KSU#2
larsmartens wants to merge 1 commit into
masterfrom
fix/ksu-android16-sepolicy

Conversation

@larsmartens

Copy link
Copy Markdown
Owner

Summary

  • remove the custom zygisk_file SELinux type from the module policy
  • allow zygote to traverse/read/map the existing adb_data_file and system_file labels used by the staged NeoZygisk path
  • label NeoZygisk daemon sockets as system_file instead of the unmapped custom type

Context

On the Pixel 7 Pro Android 16 KernelSU setup, NeoZygisk reports monitor: stopped(zygote crashed) and fails remote dlopen with a misleading libzygisk.so not found error. The file exists, has the correct arm64 ABI, and only depends on platform libraries.

The useful boot evidence is SELinux/KSU-side:

SELinux: Context u:object_r:zygisk_file:s0 is not valid (left unmapped).
ksud::sepolicy: apply sepolicy batch failed: Invalid argument (os error 22)
avc: denied { search } for comm="app_process64" name="adb" scontext=u:r:zygote:s0 tcontext=u:object_r:adb_data_file:s0 tclass=dir permissive=0

That points to policy batch rejection and missing zygote traversal rights, not a missing library, ABI mismatch, or missing dependency.

Validation

Test artifact

Local test ZIP copied to Downloads on the device:

/sdcard/Download/NeoZygisk-v2.3-340-4e04c61-ksu-sepolicy-fix-release.zip

SHA256:

05c401eb21126a73820f436474ff0d5abfbed3f86842c6462125e0b5736e0459

Runtime test plan

Do not use manual zygisk-ptrace trace --restart for validation. Install the ZIP through KernelSU, reboot normally, then check:

  • no zygisk_file unmapped-context warning
  • no app_process64 name="adb" AVC denial
  • NeoZygisk status no longer says monitor: stopped(zygote crashed)
  • zygote maps include libzygisk.so
  • Vector/LSPosed services remain running

@larsmartens larsmartens force-pushed the fix/ksu-android16-sepolicy branch from 4e04c61 to 4e804be Compare June 16, 2026 22:49
@larsmartens larsmartens force-pushed the fix/ksu-android16-sepolicy branch from 4e804be to 1f00729 Compare June 16, 2026 23:32
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.

1 participant