mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-03-25 10:50:55 +00:00
Ignore zygisk modules when zygisk is not enabled
This commit is contained in:
parent
93e443c4ad
commit
d4ac458d17
@ -705,8 +705,10 @@ static void collect_modules(bool open_zygisk) {
|
||||
module_info info;
|
||||
if (zygisk_enabled) {
|
||||
// Riru and its modules are not compatible with zygisk
|
||||
if (entry->d_name == "riru-core"sv || faccessat(modfd, "riru", F_OK, 0) == 0)
|
||||
if (entry->d_name == "riru-core"sv || faccessat(modfd, "riru", F_OK, 0) == 0) {
|
||||
LOGI("%s: ignore\n", entry->d_name);
|
||||
return;
|
||||
}
|
||||
if (open_zygisk) {
|
||||
#if defined(__arm__)
|
||||
info.z32 = openat(modfd, "zygisk/armeabi-v7a.so", O_RDONLY | O_CLOEXEC);
|
||||
@ -722,6 +724,12 @@ static void collect_modules(bool open_zygisk) {
|
||||
#error Unsupported ABI
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
// Ignore zygisk modules when zygisk is not enabled
|
||||
if (faccessat(modfd, "zygisk", F_OK, 0) == 0) {
|
||||
LOGI("%s: ignore\n", entry->d_name);
|
||||
return;
|
||||
}
|
||||
}
|
||||
info.name = entry->d_name;
|
||||
modules->push_back(info);
|
||||
|
Loading…
x
Reference in New Issue
Block a user