diff --git a/native/jni/core/scripting.cpp b/native/jni/core/scripting.cpp index 388f80849..b9c735193 100644 --- a/native/jni/core/scripting.cpp +++ b/native/jni/core/scripting.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include "core.hpp" @@ -24,6 +25,8 @@ static void set_script_env() { char new_path[4096]; sprintf(new_path, "%s:%s", getenv("PATH"), MAGISKTMP.data()); setenv("PATH", new_path, 1); + if (zygisk_enabled) + setenv("ZYGISK_ENABLED", "1", 1); }; void exec_script(const char *script) {