mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-01-02 05:27:37 +00:00
EMUI's logcat will change output file's permission and break ADBD
This commit is contained in:
parent
bf9927c7dd
commit
2bde8a1975
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user