Magisk/scripts
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
..
addon.d.sh scripts: fix addon.d using $TMPDIR 2020-08-19 02:05:58 -07:00
boot_patch.sh Significantly broaden sepolicy.rule compatibility 2020-11-02 23:20:38 -08:00
emulator.sh Update Android 11 emulator support 2020-07-27 03:33:11 -07:00
flash_script.sh scripts: ensure system is able to be mounted rw before attempting 2020-04-24 02:24:36 -07:00
magisk_uninstaller.sh Significantly broaden sepolicy.rule compatibility 2020-11-02 23:20:38 -08:00
module_installer.sh Require Magisk v20.4 for modules 2020-10-28 05:13:39 -07:00
update_binary.sh Update scripts to use BusyBox standalone mode 2020-03-08 22:25:06 -07:00
util_functions.sh Significantly broaden sepolicy.rule compatibility 2020-11-02 23:20:38 -08:00