Magisk/native/jni
topjohnwu 16e4c67992 Significantly broaden sepolicy.rule compatibility
Previously, Magisk uses persist or cache for storing modules' custom
sepolicy rules. In this commit, we significantly broaden its
compatibility and also prevent mounting errors.

The persist partition is non-standard and also critical for Snapdragon
devices, so we prefer not to use it by default.

We will go through the following logic to find the best suitable
non-volatile, writable location to store and load sepolicy.rule files:

Unencrypted data -> FBE data unencrypted dir -> cache -> metadata -> persist

This should cover almost all possible cases: very old devices have
cache partitions; newer devices will use FBE; latest devices will use
metadata FBE (which guarantees a metadata parition); and finally,
all Snapdragon devices have the persist partition (as a last resort).

Fix #3179
2020-11-02 23:20:38 -08:00
..
core Significantly broaden sepolicy.rule compatibility 2020-11-02 23:20:38 -08:00
external Update lz4 to v1.9.2 2020-10-15 00:04:48 -07:00
include Significantly broaden sepolicy.rule compatibility 2020-11-02 23:20:38 -08:00
init Significantly broaden sepolicy.rule compatibility 2020-11-02 23:20:38 -08:00
magiskboot Headers doesn't always occupy 1 page 2020-10-25 06:25:42 -07:00
magiskhide Place pthread_mutex_init() before init_list() 2020-06-28 07:06:19 -07:00
magiskpolicy Fix Android 8.0 selinux rules 2020-09-20 14:39:11 -07:00
resetprop Move logging.hpp 2020-06-17 01:17:28 -07:00
su Remove unnecessary workaround 2020-09-10 01:01:51 -07:00
systemproperties Update resetprop to partially use system impl 2020-05-07 23:54:00 -07:00
utils Remove compressed ramdisk support 2020-09-24 02:49:09 -07:00
.gitignore Add entrypoint to build test 2019-04-01 02:46:09 -04:00
Android.mk magiskinit code tidy-up 2020-10-26 20:46:15 -07:00
Application.mk native: fix slower build on non-Windows platforms 2020-05-09 04:41:07 -07:00