Tinyhook
A tiny hook framework for macOS/iOS, inlcuded inline hook, objc runtime hook, symbol resolver..
Install / Use
/learn @Antibioticss/TinyhookREADME
tinyhook
A minimalist hook framework for macOS/iOS, built for speed and size
Note that inline hooking/inserting only works on jailbroken iOS devices
Features
- inline hook
- symbol interposing
- symbol resolving
- objc runtime hook
Building
Build tinyhook yourself or download pre-built binaries from Releases
Nightly builds are available from Actions
Build with make
make
Available targets:
static(default) build static librarysharedbuild shared libraryallbuild both static and shared librariestestrun tinyhook tests
Available variables:
ARCHthe arch to build:arm64,arm64e,x86_64TARGETtargeting os:macosx(default),iphoneosMIN_OSVERminimum os version requirementDEBUGgenerate debug infomationCOMPACTno error log output (not recommended!)NO_EXPORThide all symbols (don't use this for dynamic library)
For example, building shared library for iOS 18.0+ arm64e binary with DEBUG enabled
make shared ARCH=arm64e TARGET=iphoneos MIN_OSVER=18.0 DEBUG=1
Use build.sh
build.sh can be used to build universal FAT binaries (i.e. a single binary with multiple arches)
arguments:
-a <arch> add an arch to build
-t <target> specify target system, macosx(default) or iphoneos
-v <version> specify minimum system version
-c build compact version
-n don't export symbols
For example, the below commands are used to build binaries for releasing
./build.sh -t macosx -v 10.15
./build.sh -t iphoneos -v 12.0
Output binaries will be in build/universal
Documentation
Served on GitHub Pages: https://antibioticss.github.io/tinyhook/
Example
Source code of the examples: tinyhook/test
References
Thanks to these projects for their inspiring idea and code!
Related Skills
node-connect
337.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
337.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.2kCommit, push, and open a PR
