From bf3c73d72b99f2e9fc3ee7270adcb6fc00dd00a2 Mon Sep 17 00:00:00 2001 From: ThePedroo Date: Sun, 20 Jul 2025 14:10:56 -0300 Subject: [PATCH] fix: not extracting any binaries in some devices The commit fixes the issue that in devices that "ro.system.product.cpu.abilist" doesn't exist, it will cause ReZygisk "customize.sh" to not extract any binaries. Because of that, we'll fallback to the old "ro.product.cpu.abilist" when "ro.system.product.cpu.abilist" doesn't exist. --- module/src/customize.sh | 1 + module/src/post-fs-data.sh | 1 + zygiskd/src/zygiskd.c | 5 ++++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/module/src/customize.sh b/module/src/customize.sh index 7cf4efd..8accad3 100644 --- a/module/src/customize.sh +++ b/module/src/customize.sh @@ -113,6 +113,7 @@ ui_print "- Extracting webroot" unzip -o "$ZIPFILE" "webroot/*" -x "*.sha256" -d "$MODPATH" CPU_ABIS=$(getprop ro.system.product.cpu.abilist) +CPU_ABIS=${CPU_ABIS:-$(getprop ro.product.cpu.abilist)} SUPPORTS_32BIT=false SUPPORTS_64BIT=false diff --git a/module/src/post-fs-data.sh b/module/src/post-fs-data.sh index ec2f6be..bd68bc4 100644 --- a/module/src/post-fs-data.sh +++ b/module/src/post-fs-data.sh @@ -47,6 +47,7 @@ if [ -f $MODDIR/lib/libzygisk.so ];then fi CPU_ABIS=$(getprop ro.system.product.cpu.abilist) +CPU_ABIS=${CPU_ABIS:-$(getprop ro.product.cpu.abilist)} if [[ "$CPU_ABIS" == *"arm64-v8a"* || "$CPU_ABIS" == *"x86_64"* ]]; then ./bin/zygisk-ptrace64 monitor & diff --git a/zygiskd/src/zygiskd.c b/zygiskd/src/zygiskd.c index 46db13e..b88711e 100644 --- a/zygiskd/src/zygiskd.c +++ b/zygiskd/src/zygiskd.c @@ -48,9 +48,12 @@ enum Architecture { #define ZYGISKD_PATH "/data/adb/modules/rezygisk/bin/zygiskd" lp_select("32", "64") static enum Architecture get_arch(void) { - char system_arch[64]; + char system_arch[64] = { 0 }; get_property("ro.system.product.cpu.abilist", system_arch); + if (system_arch[0] == '\0') + get_property("ro.product.cpu.abilist", system_arch); + /* INFO: "PC" architectures should have priority because in an emulator the native architecture should have priority over the emulated architecture for "native" reasons. */