Hook Framework for Android/IOS/Linux/MacOS
APACHE-2.0 License
Whale is a cross-platform Hook Framework, allowed to run Android、IOS、Linux、MacOS. Whale support both ARM/THUMB, ARM64, X86, X86_64 (AMD64), This covers almost all the major devices available today.
Hidden API Policy
InlineHook on IOS is only usable in debug compile mode
on non-jailbreak devices.
Release compilation mode will not work properly.
To solve this problem,Whale will provide a new core named Binary Static Inline Hook
.
Binary Static Inline Hook
will open source in the near future.
untested
)For pcrel instruction
, Whale will convert it to pc-independent instruction
,
If the Hook procedure have not convert instructions, please feedback to issue
.
Whale has a built-in Jit Engine
, When you have more advanced Hook requirements, you can directly generate executable instructions in memory through the Jit.
There is no longer the need to generate ugly hard code through tools as before.
We have pre-built binary versions of Android & IOS. You can find them in the built directory.
Whale uses CMake to build projects, so you need to install CMake on your system.
If you need to use Java Hook
please copy java folder to your project.
Direct use of binary,You just copy the files under built/Android
to src/main/jniLibs
in your project.
If you need to compile the source code, specify CMakeLists.txt
in build.gradle:
externalNativeBuild {
cmake {
path "your/whale/path/CMakeLists.txt"
}
}
cd toolchain
cmake .. \
-DCMAKE_TOOLCHAIN_FILE=ios.toolchain.cmake \
-DIOS_PLATFORM=OS64 \
-DPLATFORM=IOS \
-DIOS_ARCH=arm64 \
-DENABLE_ARC=0 \
-DENABLE_BITCODE=0 \
-DENABLE_VISIBILITY=0 \
-DIOS_DEPLOYMENT_TARGET=9.3 \
-DSHARED=ON \
-DCMAKE_BUILD_TYPE=Release
make -j4
cmake .
make -j4
Email: [email protected]