From e87d989ca36ddd7443f3d13b5a55020efc91a976 Mon Sep 17 00:00:00 2001 From: Jasmin Hassan Date: Fri, 24 Mar 2017 20:45:12 +0100 Subject: [PATCH] Fix proccess monitor for lsskernel 6.0.1 (3.8UX) --- jni/magiskhide/proc_monitor.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jni/magiskhide/proc_monitor.c b/jni/magiskhide/proc_monitor.c index 07c96b9cc..e092e9076 100644 --- a/jni/magiskhide/proc_monitor.c +++ b/jni/magiskhide/proc_monitor.c @@ -27,7 +27,7 @@ void monitor_proc() { fprintf(logfile, "\n"); // Monitor am_proc_start - p = popen("while true; do logcat -b events -c; logcat -b events -v raw -s am_proc_start; sleep 1; done", "r"); + p = popen("logcat -b events -v raw -s am_proc_start", "r"); while(!feof(p)) { //Format of am_proc_start is (as of Android 5.1 and 6.0) @@ -43,7 +43,7 @@ void monitor_proc() { } char processName[256]; - int ret = sscanf(buffer, "[%*d %d %*d %256s", &pid, processName); + int ret = sscanf(buffer, "[%*d %d %*d %*d %256s", &pid, processName); if(ret != 2) continue; @@ -79,4 +79,4 @@ void monitor_proc() { // Close the logcat monitor pclose(p); -} \ No newline at end of file +}