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
|
// Start the log monitor
|
||||||
loggable = exec_command_sync("/system/bin/logcat", "-d", "-f", "/dev/null", NULL) == 0;
|
loggable = exec_command_sync("/system/bin/logcat", "-d", "-f", "/dev/null", NULL) == 0;
|
||||||
|
chmod("/dev/null", 0666);
|
||||||
if (loggable) {
|
if (loggable) {
|
||||||
connect_daemon2(LOG_DAEMON, &fd);
|
connect_daemon2(LOG_DAEMON, &fd);
|
||||||
write_int(fd, HANDSHAKE);
|
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)
|
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);
|
vec_push_back_all(&log_cmd, "-b", b[i], NULL);
|
||||||
}
|
}
|
||||||
|
chmod("/dev/null", 0666);
|
||||||
vec_dup(&log_cmd, &clear_cmd);
|
vec_dup(&log_cmd, &clear_cmd);
|
||||||
vec_push_back_all(&log_cmd, "-v", "threadtime", "-s", "am_proc_start", "Magisk", "*:F", NULL);
|
vec_push_back_all(&log_cmd, "-v", "threadtime", "-s", "am_proc_start", "Magisk", "*:F", NULL);
|
||||||
vec_push_back(&log_cmd, NULL);
|
vec_push_back(&log_cmd, NULL);
|
||||||
|
@ -14,7 +14,7 @@ const char magiskrc[] =
|
|||||||
" rm "UNBLOCKFILE"\n"
|
" rm "UNBLOCKFILE"\n"
|
||||||
" start magisk_startup\n"
|
" start magisk_startup\n"
|
||||||
" wait "UNBLOCKFILE" 10\n"
|
" wait "UNBLOCKFILE" 10\n"
|
||||||
" rm /dev/.magisk.unblock\n"
|
" rm "UNBLOCKFILE"\n"
|
||||||
"\n"
|
"\n"
|
||||||
|
|
||||||
// Services
|
// Services
|
||||||
|
Loading…
Reference in New Issue
Block a user