From 61783ffc821e73ab27bed8920f0f7665f40a0455 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AE=8B=E9=A1=B5?= <31466456+canyie@users.noreply.github.com> Date: Tue, 21 Sep 2021 23:23:25 +0800 Subject: [PATCH] Prevent original libselinux.so to be unmounted libselinux.so will be unmounted when magiskd starts. If magiskd restarts (like it died before boot completed), the files we want to unmount is the original files because the modified files is unmounted in previous start, which will causes many crashes due to missing libselinux.so. --- native/jni/core/daemon.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/native/jni/core/daemon.cpp b/native/jni/core/daemon.cpp index 75b39ca32..771aeedcb 100644 --- a/native/jni/core/daemon.cpp +++ b/native/jni/core/daemon.cpp @@ -336,6 +336,7 @@ static void daemon_entry() { }); } unlink("/dev/.se"); + unlink(mount_list.data()); // Load config status auto config = MAGISKTMP + "/" INTLROOT "/config";