restart zygiskd when zygote restart

This commit is contained in:
5ec1cff
2023-12-08 11:23:20 +08:00
parent 9e48f18247
commit 9c34c671fa
10 changed files with 56 additions and 33 deletions

View File

@@ -180,7 +180,7 @@ bool trace_zygote(int pid) {
}
WAIT_OR_DIE
if (STOPPED_WITH(SIGSTOP, PTRACE_EVENT_STOP)) {
std::string magic_path = getenv("MAGIC_PATH");
std::string magic_path = getenv(MAGIC_PATH_ENV);
std::string lib_path = magic_path + "/lib" LP_SELECT("", "64") "/libzygisk.so";
if (!inject_on_main(pid, lib_path.c_str(), magic_path.c_str())) {
LOGE("failed to inject");