mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-04-19 10:31:27 +00:00
Allow boot scripts to know Zygisk status
This commit is contained in:
parent
e4a7617dde
commit
fef44bd24f
@ -5,6 +5,7 @@
|
|||||||
#include <magisk.hpp>
|
#include <magisk.hpp>
|
||||||
#include <utils.hpp>
|
#include <utils.hpp>
|
||||||
#include <selinux.hpp>
|
#include <selinux.hpp>
|
||||||
|
#include <daemon.hpp>
|
||||||
|
|
||||||
#include "core.hpp"
|
#include "core.hpp"
|
||||||
|
|
||||||
@ -24,6 +25,8 @@ static void set_script_env() {
|
|||||||
char new_path[4096];
|
char new_path[4096];
|
||||||
sprintf(new_path, "%s:%s", getenv("PATH"), MAGISKTMP.data());
|
sprintf(new_path, "%s:%s", getenv("PATH"), MAGISKTMP.data());
|
||||||
setenv("PATH", new_path, 1);
|
setenv("PATH", new_path, 1);
|
||||||
|
if (zygisk_enabled)
|
||||||
|
setenv("ZYGISK_ENABLED", "1", 1);
|
||||||
};
|
};
|
||||||
|
|
||||||
void exec_script(const char *script) {
|
void exec_script(const char *script) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user