This is a simple template for the usage of Cydia Substrate.
- Download Android NDK, Revision 16b from: https://developer.android.com/ndk/downloads/older_releases
- Open compile.bat & paste your ndk-build path location in the first line. (remove mine)
- Download this github files somewhere to your PC.
I'm not going to explain how Cydia Substrate works, since it has it's own documentation.
- Inside the file "Utils.h", you'll specifiy the lib name of the game.
- Inside "hook.cpp", you'll write your hooks.
- Once done, double click compile.bat & it will create a libs folder.
- Inside the libs folder, you'll have a "libhook.so" file, this will be placed inside the APK's lib folder.
In order to load your libhook.so, you'll need to decompile the apk, you can use ApkTool for this.
- Navigate to "/smali/com" & create a folder called "loadLib"
- Copy the two .smali files provided in the smali folder from this Git, inside of that folder.
- Now, navigate to "com/unity3d/player/UnityPlayerActivity" & search for something like this:
.method protected onCreate(Landroid/os/Bundle;)V
.locals 2
- Once found, paste this code under .locals 2:
invoke-static {}, Lcom/loadLib/libLoader;->loadLib()V
- Recompile the apk & test out your hack!
Cydia Substrate Documentation: http://www.cydiasubstrate.com/id/264d6581-a762-4343-9605-729ef12ff0af/
If you've any questions, suggestions or whatever, you can contact me on Discord.
My Discord: Joey
#0309