mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-06-12 05:07:45 +02:00
Refactor sepolicy.rules resolve
We resolve available partitions for sepolicy.rules when patching boot and bind mount the partition by magiskinit. For older devices, the previous logic won't work because the part name is never readable. Co-authored-by: topjohnwu <topjohnwu@gmail.com>
This commit is contained in:
@ -73,12 +73,16 @@ fi
|
||||
[ -z $KEEPFORCEENCRYPT ] && KEEPFORCEENCRYPT=false
|
||||
[ -z $PATCHVBMETAFLAG ] && PATCHVBMETAFLAG=false
|
||||
[ -z $RECOVERYMODE ] && RECOVERYMODE=false
|
||||
[ -z $ISENCRYPTED ] && ISENCRYPTED=false
|
||||
export KEEPVERITY
|
||||
export KEEPFORCEENCRYPT
|
||||
export PATCHVBMETAFLAG
|
||||
export ISENCRYPTED
|
||||
|
||||
chmod -R 755 .
|
||||
|
||||
RULESDEVICE="$(./magiskinit --rules-device)" || abort "! Unable to find rules partition!"
|
||||
|
||||
#########
|
||||
# Unpack
|
||||
#########
|
||||
@ -152,6 +156,7 @@ echo "KEEPVERITY=$KEEPVERITY" > config
|
||||
echo "KEEPFORCEENCRYPT=$KEEPFORCEENCRYPT" >> config
|
||||
echo "PATCHVBMETAFLAG=$PATCHVBMETAFLAG" >> config
|
||||
echo "RECOVERYMODE=$RECOVERYMODE" >> config
|
||||
echo "RULESDEVICE=$RULESDEVICE" >> config
|
||||
[ ! -z $SHA1 ] && echo "SHA1=$SHA1" >> config
|
||||
|
||||
# Compress to save precious ramdisk space
|
||||
|
Reference in New Issue
Block a user