From c38b826abf2fc4114fe30ed5e94fa994855782ac Mon Sep 17 00:00:00 2001 From: LoveSy Date: Sat, 1 Jan 2022 07:58:57 +0800 Subject: [PATCH] Skip overlayfs for post-fs-data mount adb remount will introduce overlayfs for /system and /vendor, we should skip mounting as overlayfs. This also helps us support overlayfs Magisk later. --- native/jni/core/bootstages.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/native/jni/core/bootstages.cpp b/native/jni/core/bootstages.cpp index 2a2b80968..93c6a103f 100644 --- a/native/jni/core/bootstages.cpp +++ b/native/jni/core/bootstages.cpp @@ -39,7 +39,7 @@ bool zygisk_enabled = false; } #define mount_mirror(part, flag) \ -else if (MNT_DIR_IS("/" #part) && me->mnt_type != "tmpfs"sv && lstat(me->mnt_dir, &st) == 0) \ +else if (MNT_DIR_IS("/" #part) && me->mnt_type != "tmpfs"sv && me->mnt_type != "overlay"sv && lstat(me->mnt_dir, &st) == 0) \ do_mount_mirror(part, flag) #define link_mirror(part) \ @@ -50,7 +50,7 @@ if (access("/system/" #part, F_OK) == 0 && access(buf1, F_OK) != 0) { \ } #define link_orig_dir(dir, part) \ -else if (MNT_DIR_IS(dir) && me->mnt_type != "tmpfs"sv) { \ +else if (MNT_DIR_IS(dir) && me->mnt_type != "tmpfs"sv && me->mnt_type != "overlay"sv) { \ SETMIR(buf1, part); \ rmdir(buf1); \ xsymlink(dir, buf1); \