From 97135879a1e8f5073fdf43128b2e08f33652c3b4 Mon Sep 17 00:00:00 2001 From: Rei Ryuki <46316533+reiryuki@users.noreply.github.com> Date: Sat, 7 May 2022 16:43:26 +0700 Subject: [PATCH] Fix sepolicy rules dir is not found in recovery --- scripts/uninstaller.sh | 6 ------ scripts/util_functions.sh | 7 +++++++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/scripts/uninstaller.sh b/scripts/uninstaller.sh index ed5309c95..619fe1e9f 100644 --- a/scripts/uninstaller.sh +++ b/scripts/uninstaller.sh @@ -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 diff --git a/scripts/util_functions.sh b/scripts/util_functions.sh index 1bd4f9559..aca22db07 100644 --- a/scripts/util_functions.sh +++ b/scripts/util_functions.sh @@ -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 , sets LOOPDEV