From 76c88913f9dcde9293104e7a5cba9a5ccdea005e Mon Sep 17 00:00:00 2001 From: vvb2060 Date: Tue, 28 May 2019 07:29:54 +0800 Subject: [PATCH] Ensure Magisk environment normal --- native/jni/core/bootstages.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/native/jni/core/bootstages.cpp b/native/jni/core/bootstages.cpp index 35a3eac49..7970cfb22 100644 --- a/native/jni/core/bootstages.cpp +++ b/native/jni/core/bootstages.cpp @@ -694,6 +694,14 @@ void late_start(int client) { exec_command_sync("/system/bin/reboot"); } + if (access(BBPATH, F_OK) != 0){ + LOGE("* post-fs-data mode is not triggered\n"); + unlock_blocks(); + magisk_env(); + prepare_modules(); + close(xopen(DISABLEFILE, O_RDONLY | O_CREAT | O_CLOEXEC, 0)); + } + auto_start_magiskhide(); // Run scripts after full patch, most reliable way to run scripts