Fix sepolicy rules dir is not found in recovery

This commit is contained in:
Rei Ryuki 2022-05-07 16:43:26 +07:00 committed by GitHub
parent fef41f68c0
commit 97135879a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 6 deletions

View File

@ -40,12 +40,6 @@ is_mounted /data || mount /data || abort "! Unable to mount /data, please uninst
mount_partitions
check_data
$DATA_DE || abort "! Cannot access /data, please uninstall with the Magisk app"
if ! $BOOTMODE; then
# Mounting stuffs in recovery (best effort)
mount_name metadata /metadata
mount_name "cache cac" /cache
mount_name persist /persist
fi
get_flags
find_boot_image

View File

@ -295,6 +295,13 @@ mount_partitions() {
# Allow /system/bin commands (dalvikvm) on Android 10+ in recovery
$BOOTMODE || mount_apex
# Mount sepolicy rules dir locations in recovery (best effort)
if ! $BOOTMODE; then
mount_name "cache cac" /cache
mount_name metadata /metadata
mount_name persist /persist
fi
}
# loop_setup <ext4_img>, sets LOOPDEV