From 7ea1579bce18e2641a4e182cfe70c5017e9dc825 Mon Sep 17 00:00:00 2001 From: rifsxd Date: Tue, 31 Dec 2024 11:14:39 +0600 Subject: [PATCH] kernel: try umount /system/etc/hosts & /system_ext --- kernel/core_hook.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/core_hook.c b/kernel/core_hook.c index da7140ef..33fbe2ba 100644 --- a/kernel/core_hook.c +++ b/kernel/core_hook.c @@ -543,6 +543,7 @@ int ksu_handle_setuid(struct cred *new, const struct cred *old) // fixme: use `collect_mounts` and `iterate_mount` to iterate all mountpoint and // filter the mountpoint whose target is `/data/adb` try_umount("/system", true, 0); + try_umount("/system_ext", true, 0); try_umount("/vendor", true, 0); try_umount("/product", true, 0); try_umount("/data/adb/modules", false, MNT_DETACH); @@ -550,6 +551,9 @@ int ksu_handle_setuid(struct cred *new, const struct cred *old) // try umount ksu temp path try_umount("/debug_ramdisk", false, MNT_DETACH); try_umount("/sbin", false, MNT_DETACH); + + // try umount hosts file + try_umount("/system/etc/hosts", false, MNT_DETACH); return 0; }