1. Cause
- The issue is caused by a JNI package name mismatch between the Java/Smali code and the native C++ library (libPoisonModz.so).
- When the mod author renamed the mod's package from "uk.lgl.modmenu" to "poison.modz", he probably only updated the Java/Smali side and forgot to update the corresponding native function name inside the C++ source code.
- When the app runs, the Java code calls the "isGameLibLoaded()" method. The Android Runtime searches the .so file for "Java_poison_modz_FloatingModMenuService_isGameLibLoaded", but the .so file still contains the old name "Java_uk_lgl_modmenu_FloatingModMenuService_isGameLibLoaded". Because the system cannot find the target function, it throws an UnsatisfiedLinkError and immediately crashes the app.
2. Steps to Fix
- You can bypass this error by removing the "native" link in the Smali code and forcing the method to always return true. This prevents the app from looking into the broken .so file.
Step 1: Open the APK file in MT Manager or other alternative. In this case, I use MT Manager. Tap the APK file and select "View".
Step 2: Tap on "classes.dex". If there are multiple dex files, select "Dex Editor Plus", check all dex files, and tap "OK".
Step 3: Go to the "Search" tab and search for the class path: poison.modz/FloatingModMenuService
Step 4: Open the file and search for the string "isGameLibLoaded". You will find the original method declaration:
.method native isGameLibLoaded()Z
.end method
Step 5: Delete that entire method declaration and replace it with the code in .txt file.
Step 6: Tap the Save icon at the top.
Step 7: Press the back button and choose "Save and exit".
Step 8: Make sure "Auto sign" is checked and tap "OK" to update the APK.
Step 9: Uninstall the old crashing version from your device and install the newly modified APK.
Note: Please keep in mind that this is a temporary workaround, and the stated cause is based on my subjective assumption, which might not be entirely correct. Additionally, because the mod menu no longer checks if the game engine has finished loading, the menu UI will appear instantly upon opening the app. To prevent hooking crashes, wait about 3 to 5 seconds for the game to reach its loading screen before toggling any mod features on the menu.