From ff5c0d6361cd43c394532eeed12f71d50ffe8099 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Sun, 1 Jan 2017 20:31:08 +0800 Subject: [PATCH] MagiskHide small fix --- jni/magiskhide/main.c | 2 +- jni/magiskhide/proc_monitor.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/jni/magiskhide/main.c b/jni/magiskhide/main.c index e9164aa98..95c58b2ca 100644 --- a/jni/magiskhide/main.c +++ b/jni/magiskhide/main.c @@ -19,7 +19,7 @@ static void terminate(int sig) { int main(int argc, char *argv[]) { - if (argc > 0) { + if (argc > 1) { if (strcmp(argv[1], "--daemon") == 0) run_as_daemon(); else { diff --git a/jni/magiskhide/proc_monitor.c b/jni/magiskhide/proc_monitor.c index 30b10cdb5..380ceafbc 100644 --- a/jni/magiskhide/proc_monitor.c +++ b/jni/magiskhide/proc_monitor.c @@ -7,6 +7,8 @@ void monitor_proc() { // Get the mount namespace of init read_namespace(1, init_ns, 32); + printf("%s\n", init_ns); + // Get the mount namespace of zygote FILE *p = popen("/data/busybox/ps | grep zygote | grep -v grep", "r"); while(fgets(buffer, sizeof(buffer), p)) {