Allow boot scripts to know Zygisk status

This commit is contained in:
topjohnwu 2021-11-20 13:05:15 -08:00
parent e4a7617dde
commit fef44bd24f

View File

@ -5,6 +5,7 @@
#include <magisk.hpp>
#include <utils.hpp>
#include <selinux.hpp>
#include <daemon.hpp>
#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) {