Commit f443cbaa authored by vvb2060's avatar vvb2060 Committed by John Wu

Revert "Always run non disabled module post-fs-data scripts"

This reverts commit 4dfb193d.
parent dbf45da8
...@@ -695,13 +695,13 @@ static void collect_modules(bool open_zygisk) { ...@@ -695,13 +695,13 @@ static void collect_modules(bool open_zygisk) {
return; return;
module_info info; module_info info;
if (open_zygisk) {
if (zygisk_enabled) { if (zygisk_enabled) {
// Riru and its modules are not compatible with zygisk // 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); LOGI("%s: ignore\n", entry->d_name);
return; return;
} }
if (open_zygisk) {
#if defined(__arm__) #if defined(__arm__)
info.z32 = openat(modfd, "zygisk/armeabi-v7a.so", O_RDONLY | O_CLOEXEC); info.z32 = openat(modfd, "zygisk/armeabi-v7a.so", O_RDONLY | O_CLOEXEC);
#elif defined(__aarch64__) #elif defined(__aarch64__)
...@@ -715,6 +715,7 @@ static void collect_modules(bool open_zygisk) { ...@@ -715,6 +715,7 @@ static void collect_modules(bool open_zygisk) {
#else #else
#error Unsupported ABI #error Unsupported ABI
#endif #endif
}
} else { } else {
// Ignore zygisk modules when zygisk is not enabled // Ignore zygisk modules when zygisk is not enabled
if (faccessat(modfd, "zygisk", F_OK, 0) == 0) { if (faccessat(modfd, "zygisk", F_OK, 0) == 0) {
...@@ -722,11 +723,10 @@ static void collect_modules(bool open_zygisk) { ...@@ -722,11 +723,10 @@ static void collect_modules(bool open_zygisk) {
return; return;
} }
} }
}
info.name = entry->d_name; info.name = entry->d_name;
module_list->push_back(info); module_list->push_back(info);
}); });
if (open_zygisk && zygisk_enabled) { if (zygisk_enabled) {
bool use_memfd = true; bool use_memfd = true;
auto convert_to_memfd = [&](int fd) -> int { auto convert_to_memfd = [&](int fd) -> int {
if (fd < 0) if (fd < 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment