From 6c05527ffa3f6a76dbb988bda4b20bbab656b4d8 Mon Sep 17 00:00:00 2001 From: ThePedroo Date: Sun, 22 Jun 2025 17:02:22 -0300 Subject: [PATCH] fix: Zygisk modules not being recognized in WSA This commit fixes the issue where due to ARM architectures having priority in ReZygiskd code, ReZygisk, running on emulators, wouldn't be capable of recognizing Zygisk modules. This order is important, Zygisk modules should always give priority to the native architecture over the emulated one, since WSA runs Zygote in x64/x86. --- zygiskd/src/zygiskd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zygiskd/src/zygiskd.c b/zygiskd/src/zygiskd.c index fe00454..cedd0ce 100644 --- a/zygiskd/src/zygiskd.c +++ b/zygiskd/src/zygiskd.c @@ -51,8 +51,11 @@ static enum Architecture get_arch(void) { char system_arch[64]; get_property("ro.product.cpu.abilist", system_arch); - if (strstr(system_arch, "arm") != NULL) return lp_select(ARM32, ARM64); + /* INFO: "PC" architectures should have priority because in an emulator + the native architecture should have priority over the emulated + architecture for "native" reasons. */ if (strstr(system_arch, "x86") != NULL) return lp_select(X86, X86_64); + if (strstr(system_arch, "arm") != NULL) return lp_select(ARM32, ARM64); LOGE("Unsupported system architecture: %s\n", system_arch); exit(1);