From 415ff23be5872f537d9ad59b4055abe3ddf3e280 Mon Sep 17 00:00:00 2001 From: Shaka Huang Date: Fri, 10 May 2019 10:48:06 +0800 Subject: [PATCH] Fix error mounting /data partition For devices come with two /data mount points, magisk will bind the one in tmpfs and failed to load modules since this partition is empty. Signed-off-by: Shaka Huang --- native/jni/core/bootstages.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/native/jni/core/bootstages.cpp b/native/jni/core/bootstages.cpp index 84bd15e9f..36181811e 100644 --- a/native/jni/core/bootstages.cpp +++ b/native/jni/core/bootstages.cpp @@ -374,7 +374,7 @@ static bool magisk_env() { mount_mirror(system, MS_RDONLY); } else if (str_contains(line, " /vendor ")) { mount_mirror(vendor, MS_RDONLY); - } else if (str_contains(line, " /data ")) { + } else if (str_contains(line, " /data ") && !str_contains(line, "tmpfs")) { mount_mirror(data, 0); } else if (SDK_INT >= 24 && str_contains(line, " /proc ") && !str_contains(line, "hidepid=2")) {