You've already forked ReZygisk
mirror of
https://github.com/PerformanC/ReZygisk.git
synced 2025-09-06 06:37:01 +00:00
improve: set ZYGISK_ENABLED in all supported managers' process
This commit sets the environment variable "ZYGISK_ENABLED" for all managers' process, not limiting to Magisk anymore, so that managers can easily detect (Re)Zygisk.
This commit is contained in:
@@ -773,15 +773,18 @@ void ZygiskContext::app_specialize_pre() {
|
|||||||
update_mnt_ns(Clean, true);
|
update_mnt_ns(Clean, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((info_flags & (PROCESS_IS_MANAGER | PROCESS_ROOT_IS_MAGISK)) == (PROCESS_IS_MANAGER | PROCESS_ROOT_IS_MAGISK)) {
|
if ((info_flags & PROCESS_IS_MANAGER) == PROCESS_IS_MANAGER) {
|
||||||
LOGD("Manager process detected. Notifying that Zygisk has been enabled.");
|
LOGD("Manager process detected. Notifying that Zygisk has been enabled.");
|
||||||
|
|
||||||
/* INFO: This environment variable is related to Magisk Zygisk/Manager. It
|
/* INFO: This environment variable is related to Magisk Zygisk/Manager. It
|
||||||
it used by Magisk's Zygisk to communicate to Magisk Manager whether
|
it used by Magisk's Zygisk to communicate to Magisk Manager whether
|
||||||
Zygisk is working or not.
|
Zygisk is working or not, allowing Zygisk modules to both work properly
|
||||||
|
and for the manager to mark Zygisk as enabled.
|
||||||
|
|
||||||
To allow Zygisk modules to both work properly and for the manager to
|
However, to enhance capabilities of root managers, it is also set for
|
||||||
identify Zygisk, being it not built-in, as working, we also set it. */
|
any other supported manager, so that, if they wish, they can recognize
|
||||||
|
if Zygisk is enabled.
|
||||||
|
*/
|
||||||
setenv("ZYGISK_ENABLED", "1", 1);
|
setenv("ZYGISK_ENABLED", "1", 1);
|
||||||
} else {
|
} else {
|
||||||
/* INFO: Because we load directly from the file, we need to do it before we umount
|
/* INFO: Because we load directly from the file, we need to do it before we umount
|
||||||
|
|||||||
Reference in New Issue
Block a user