This project demonstrates how to perform native hooking on Android applications using Frida. It includes scripts for intercepting and logging JNI function calls within native libraries.
info.js
: A Frida script to log all loaded native libraries and their JNI functions.hook.js
: A Frida script to hook specific JNI functions in a specified native library.list_all_loaded.js
: A Frida script to list all loaded native libraries and their functions.
- Frida must be installed on your system.
- You need root access on your Android device or emulator.
- Ensure you have adb installed and properly configured.
-
Clone the repository:
git clone https://github.com/decryptable/android-native-hooking.git cd android-native-hooking
-
Connect your Android device or start your emulator.
-
Start the Frida server on your Android device:
adb shell "/data/local/tmp/frida-server &"
The info.js
script logs all loaded native libraries and their JNI functions:
frida -U -f com.example.targetapp -l info.js --no-pause