diff --git a/native/jni/core/daemon.c b/native/jni/core/daemon.c index 6e8e1a971..a701be7e7 100644 --- a/native/jni/core/daemon.c +++ b/native/jni/core/daemon.c @@ -122,6 +122,7 @@ void main_daemon() { // Start the log monitor loggable = exec_command_sync("/system/bin/logcat", "-d", "-f", "/dev/null", NULL) == 0; + chmod("/dev/null", 0666); if (loggable) { connect_daemon2(LOG_DAEMON, &fd); write_int(fd, HANDSHAKE); diff --git a/native/jni/core/log_daemon.c b/native/jni/core/log_daemon.c index 75e737c34..3b0c10d2a 100644 --- a/native/jni/core/log_daemon.c +++ b/native/jni/core/log_daemon.c @@ -135,6 +135,7 @@ void log_daemon() { if (exec_command_sync("/system/bin/logcat", "-b", b[i], "-d", "-f", "/dev/null", NULL) == 0) vec_push_back_all(&log_cmd, "-b", b[i], NULL); } + chmod("/dev/null", 0666); vec_dup(&log_cmd, &clear_cmd); vec_push_back_all(&log_cmd, "-v", "threadtime", "-s", "am_proc_start", "Magisk", "*:F", NULL); vec_push_back(&log_cmd, NULL); diff --git a/native/jni/include/magiskrc.h b/native/jni/include/magiskrc.h index 6066d0f97..964d7c1ac 100644 --- a/native/jni/include/magiskrc.h +++ b/native/jni/include/magiskrc.h @@ -14,7 +14,7 @@ const char magiskrc[] = " rm "UNBLOCKFILE"\n" " start magisk_startup\n" " wait "UNBLOCKFILE" 10\n" -" rm /dev/.magisk.unblock\n" +" rm "UNBLOCKFILE"\n" "\n" // Services