Commit f642fb3b authored by topjohnwu's avatar topjohnwu

Properly handle child zygote

Close #4720
parent e68dd866
...@@ -267,6 +267,10 @@ void HookContext::nativeSpecializeAppProcess_post() { ...@@ -267,6 +267,10 @@ void HookContext::nativeSpecializeAppProcess_post() {
run_modules_post(); run_modules_post();
if (info.is_magisk_app) { if (info.is_magisk_app) {
setenv("ZYGISK_ENABLED", "1", 1); setenv("ZYGISK_ENABLED", "1", 1);
} else if (args->is_child_zygote && *args->is_child_zygote) {
// If we are in child zygote, unhook all zygisk hooks
// Modules still have their code loaded and can do whatever they want
unhook_functions();
} }
} }
g_ctx = nullptr; g_ctx = nullptr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment