From 670767a82b574e30f023e94d8f93bf246fc66ac2 Mon Sep 17 00:00:00 2001 From: snake-4 <18491360+snake-4@users.noreply.github.com> Date: Mon, 1 Apr 2024 01:33:12 +0200 Subject: [PATCH] Added exception for hosts bind mount --- module/jni/unmount.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/module/jni/unmount.cpp b/module/jni/unmount.cpp index 5374def..28d66a4 100644 --- a/module/jni/unmount.cpp +++ b/module/jni/unmount.cpp @@ -41,6 +41,13 @@ static bool shouldUnmount(const mount_entry_t &info) if (workdir != options.end() && workdir->second.rfind("/data/adb", 0) == 0) return true; } + + // Unmount the bind mount of default Systemless Hosts module of Magisk + // It should've been an overlay instead but we'll make an exception for this one + // TODO: Maybe we can unmount all binds from userdata to system? + if (mountPoint == "/system/etc/hosts") + return true; + return false; }