From ab9442d4ae81c0707615f6ba7dd1cbc999b390ca Mon Sep 17 00:00:00 2001 From: Alessandro Astone Date: Mon, 9 Mar 2020 06:38:47 +0100 Subject: [PATCH] Fixup mounting system on Lineage Recovery * Lineage Recovery 17.1, like AOSP Q recovery, has '/' as a shared mount point, causing `mount --move` to fail. If it fails, directly mount system to /system_root via /dev/block/ symlinks, like AnyKernel and OpenGapps Co-authored-by: John Wu --- scripts/util_functions.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/util_functions.sh b/scripts/util_functions.sh index 58769a0ed..aaedac1f1 100644 --- a/scripts/util_functions.sh +++ b/scripts/util_functions.sh @@ -217,7 +217,11 @@ mount_partitions() { if [ -f /system/init.rc ]; then SYSTEM_ROOT=true setup_mntpoint /system_root - mount --move /system /system_root + if ! mount --move /system /system_root; then + umount /system + umount -l /system 2>/dev/null + mount_ro_ensure "system$SLOT app$SLOT" /system_root + fi mount -o bind /system_root/system /system else grep ' / ' /proc/mounts | grep -qv 'rootfs' || grep -q ' /system_root ' /proc/mounts \