From f00408c793ad01beb02c12cb860a55f37719d1f6 Mon Sep 17 00:00:00 2001 From: canyie Date: Sun, 3 Mar 2024 15:14:19 +0800 Subject: [PATCH] Fix zygote restart monitor --- native/src/init/rootdir.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/native/src/init/rootdir.cpp b/native/src/init/rootdir.cpp index 6182da6a6..e1df06acf 100644 --- a/native/src/init/rootdir.cpp +++ b/native/src/init/rootdir.cpp @@ -97,8 +97,8 @@ static void patch_rc_scripts(const char *src_path, const char *tmp_path, bool wr if (line.starts_with("service zygote ")) { LOGD("Inject zygote restart\n"); fprintf(dest.get(), "%s", line.data()); - fprintf(dest.get(), " onrestart exec %2$s 0 0 -- %1$s/magisk --zygote-restart\n", - tmp_path, MAGISK_PROC_CON); + fprintf(dest.get(), + " onrestart exec " MAGISK_PROC_CON " 0 0 -- %s/magisk --zygote-restart\n", tmp_path); return true; } fprintf(dest.get(), "%s", line.data());