add: Android 9 support (#117)

This commit makes ReZygisk load Zygisk libraries directly, not utilizing memfd, as it doesn't exist in older versions of Android.
This commit is contained in:
Reveny
2025-03-22 23:12:24 +01:00
committed by GitHub
parent bc6cf67c7b
commit 92e2f528a9
5 changed files with 34 additions and 32 deletions

View File

@@ -591,7 +591,7 @@ void ZygiskContext::run_modules_post() {
if (modules.size() > 0) {
LOGD("modules unloaded: %zu/%zu", modules_unloaded, modules.size());
clean_trace("jit-cache-zygisk", modules.size(), modules_unloaded, true);
clean_trace("/data/adb", modules.size(), modules_unloaded, true);
}
}
@@ -762,7 +762,7 @@ void clean_trace(const char* path, size_t load, size_t unload, bool spoof_maps)
// spoofing map names is futile in Android, we do it simply
// to avoid Zygisk detections based on string comparison
for (auto &map : lsplt::MapInfo::Scan()) {
if (strstr(map.path.c_str(), path))
if (strstr(map.path.c_str(), path) && strstr(map.path.c_str(), "libzygisk") == 0)
{
void *addr = (void *)map.start;
size_t size = map.end - map.start;