A lightweight, standalone native hook for IL2CPP applications (Android/Linux AArch64). This project allows for intercepting native functions (like __cxa_throw) and logging detailed exception information, including IL2CPP-specific data objects.
- Standalone: No dependency on heavy hooking frameworks in the guest process.
- IL2CPP Aware: Can parse
Il2CppExceptionobjects, including messages, stack traces, and internal trace IPs. - Native Logging: Detailed logging via Android's
__android_log_print(or equivalent). - Easy Injection: Includes a Lua script for use with Cheat Engine or similar tools to inject the hook into a running process.
src/: C++ source files for the hook.config.h: Centralized configuration for offsets and constants.hook.cpp: Main hook logic (intercepts__cxa_throw).logger.h: Logging utilities.
scripts/: Injection scripts.injector.lua: Lua script for Cheat Engine to injecthook.bininto memory.
out/: Build artifacts (generated after runningbuild.sh).
- Clang/LLVM: A cross-compiler for AArch64 (e.g.,
aarch64-linux-gnu). - Cheat Engine (or similar): For running the Lua injection script.
- Configure Offsets:
Open
src/config.hand update the offsets for your target application. You can find these offsets using tools like Ghidra or IDA Pro. - Build:
Run the build script to generate the binary files:
This will create
./build.sh
out/hook.binandout/load_pages.bin.
- Copy
out/hook.binandout/load_pages.binto a location accessible by your Cheat Engine instance (or the target system). - Open Cheat Engine and attach it to the target process.
- Load and execute
scripts/injector.lua. Ensure the paths to the.binfiles in the configuration section of the script are correct. - Check the system logs (e.g.,
logcaton Android) to see the hook in action.
This project is licensed under the MIT License - see the LICENSE file for details.
Third-party software included in this project is listed in THIRD_PARTY_NOTICES.md.