Switch to modifying /system/etc/selinux/plat_seapp_contexts #41
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.
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