Update fixes for detection

- Details for detection and fix: https://github.com/JingMatrix/NeoZygisk/commit/76d54228c7e6fe14cca93338865008946b94f7e
- Ensure no memory leaks related to local references
- With the __cxa_atexit fix, Dobby should not be detected by user apps anymore
This commit is contained in:
simonpunk
2025-08-21 21:34:21 +08:00
committed by osm0sis
parent 3c9c13e3ff
commit ffd8d77d6f

View File

@@ -310,7 +310,15 @@ private:
LOGD("JNI %s: Calling EntryPoint.init", niceName);
auto entryInit = env->GetStaticMethodID(entryClass, "init", "(IIII)V");
env->CallStaticVoidMethod(entryClass, entryInit, verboseLogs, spoofBuild, spoofProvider, spoofSignature);
env->DeleteLocalRef(javaStr);
}
env->DeleteLocalRef(clClass);
env->DeleteLocalRef(dexClClass);
env->DeleteLocalRef(systemClassLoader);
env->DeleteLocalRef(dexCl);
env->DeleteLocalRef(buffer);
env->DeleteLocalRef(entryClassName);
env->DeleteLocalRef(entryClassObj);
}
};
@@ -356,6 +364,14 @@ static void companion(int fd) {
jsonVector.clear();
}
/*
* - The fix is public now: https://github.com/JingMatrix/NeoZygisk/commit/76d54228c7e6fe14cca93338865008946b94f7ee
* - Remeber to add this for all other zygisk c++ library
*/
extern "C" int __cxa_atexit(void (*func)(void*), void* arg, void* dso) {
return 0;
}
REGISTER_ZYGISK_MODULE(PlayIntegrityFix)
REGISTER_ZYGISK_COMPANION(companion)