diff --git a/app/src/main/cpp/main.cpp b/app/src/main/cpp/main.cpp index 98e6c94..e6f8435 100644 --- a/app/src/main/cpp/main.cpp +++ b/app/src/main/cpp/main.cpp @@ -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)