Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to modifying /system/etc/selinux/plat_seapp_contexts #41

Merged
merged 1 commit into from
Mar 5, 2024

Conversation

chenxiaolong
Copy link
Owner

Android 14 QPR2 (2024 March security update) dropped support for loading APEX SELinux policies [1] and thus, /dev/selinux/apex_seapp_contexts.

This commit updates the post-fs-data hook script to modify /system/etc/selinux/plat_seapp_contexts instead, which is the only other file that's applicable to apps stored on the system partition. The hook script takes extra care to ensure that an outdated modified version of this file won't be loaded because that can result in boot loops.

[1] https://android.googlesource.com/platform/external/selinux/+/e9448817b37b2d14ab8e00dfff4b60347512aae7%5E%21/

Fixes: #40

@chenxiaolong chenxiaolong self-assigned this Mar 5, 2024
Android 14 QPR2 (2024 March security update) dropped support for loading
APEX SELinux policies [1] and thus, /dev/selinux/apex_seapp_contexts.

This commit updates the post-fs-data hook script to modify
/system/etc/selinux/plat_seapp_contexts instead, which is the only other
file that's applicable to apps stored on the system partition. The hook
script takes extra care to ensure that an outdated modified version of
this file won't be loaded because that can result in boot loops.

[1] https://android.googlesource.com/platform/external/selinux/+/e9448817b37b2d14ab8e00dfff4b60347512aae7%5E%21/

Fixes: #40

Signed-off-by: Andrew Gunnerson <[email protected]>
chenxiaolong added a commit that referenced this pull request Mar 5, 2024
Signed-off-by: Andrew Gunnerson <[email protected]>
@chenxiaolong chenxiaolong force-pushed the no_apex_seapp_contexts branch from 00f7998 to 69a79c0 Compare March 5, 2024 02:26
@chenxiaolong chenxiaolong merged commit 69a79c0 into master Mar 5, 2024
4 checks passed
@chenxiaolong chenxiaolong deleted the no_apex_seapp_contexts branch March 5, 2024 03:21
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.

Fails to connect to update_engine on Android 14 QPR2
1 participant