All Projects → joeyjurjens → Android-Hooking-Template

joeyjurjens / Android-Hooking-Template

Licence: other
Just a simple hooking template which makes use of Cydia Substrate.

Programming Languages

C++
36643 projects - #6 most used programming language
c
50402 projects - #5 most used programming language
Smali
51 projects
Makefile
30231 projects
Batchfile
5799 projects

Android Hooking Template

This is a simple template for the usage of Cydia Substrate.

Installation:


Creating the libhook.so

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.

Loading the lib.so

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!

Useful links

Cydia Substrate Documentation: http://www.cydiasubstrate.com/id/264d6581-a762-4343-9605-729ef12ff0af/

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].