Magisk/native/jni/magiskpolicy
osm0sis cba0d04000 magiskpolicy: rules: standardize update_engine sepolicy when rooted
The state of ROM A/B OTA addon.d-v2 support is an inconsistent mess currently:
- LineageOS builds userdebug with permissive update_engine domain, OmniROM builds userdebug with a more restricted update_engine domain, and CarbonROM builds user with a hybrid closer to Omni's
- addon.d-v2 scripts cannot function to the full extent they should when there is a more restricted update_engine domain sepolicy in place, which is likely why Lineage made update_engine completely permissive

Evidence for the above:
- many addon.d-v2 scripts only work (or fully work) on Lineage, see below
- Magisk's addon.d-v2 script would work on Lineage without issue, but would work on Carbon and Omni only if further allow rules were added for basic things like "file read" and "dir search" suggesting these ROMs' addon.d-v2 is severely limited
- Omni includes a /system/addon.d/69-gapps.sh script with the ROM itself (despite shipping without GApps), and with Magisk's more permissive sepolicy and no GApps installed it will remove important ROM files during OTA, resulting in a bootloop; the issue with shipping this script was therefore masked by Omni's overly restrictive update_engine sepolicy not allowing the script to function as intended

The solution:
- guarantee a consistent addon.d-v2 experience for users across ROMs when rooted with Magisk by making update_engine permissive as Lineage has
- hopefully ROMs can work together to come up with something standard for unrooted addon.d-v2 function
2019-09-23 07:55:25 -04:00
..
api.cpp Switch from deprecated AUDITDENY to DONTAUDIT 2018-11-29 06:42:04 -05:00
magiskpolicy.cpp Minor code changes across all sources 2019-06-30 19:09:31 -07:00
magiskpolicy.h Minor code changes across all sources 2019-06-30 19:09:31 -07:00
policydb.cpp Add logging in magiskinit 2019-04-04 00:26:16 -04:00
rules.cpp magiskpolicy: rules: standardize update_engine sepolicy when rooted 2019-09-23 07:55:25 -04:00
sepolicy.c Support Android Q new split sepolicy setup 2019-03-15 06:17:37 -04:00
sepolicy.h Minor code changes across all sources 2019-06-30 19:09:31 -07:00