github.com/canyie/pine ↗
Dynamic java method hook framework on ART. Allowing you to change almost all java methods' behavior dynamically.
Open this visualization on its own page →
Contributors
3
Lines of Code
986
From
2020-04-26
To
2022-04-20
About canyie/pine
Pine is a dynamic Java method hooking framework designed for Android's ART runtime, enabling developers to intercept and modify the behavior of Java method calls in their applications. It supports Android versions from 4.4 through Android 15 Beta 4 on thumb-2 and arm64 architectures, allowing near-complete control over method execution without requiring system-level modifications.
The framework provides multiple integration approaches, including a core hooking API for intercepting specific methods and an Xposed-compatible interface that allows loading Xposed-style modules within a single process. Developers can monitor and modify method behavior for common Android patterns like activity creation, thread lifecycle management, and UI thread access. Pine also offers enhanced features through integration with Dobby, including support for delayed hooking of static methods without triggering class initialization.
Notable technical aspects include its ability to disable hidden API restrictions on Android 9.0 and later, though this comes with known concurrency considerations around class member enumeration. The project is intended for advanced Android development scenarios requiring runtime method interception, and it acknowledges compatibility variations across different devices and Android versions while maintaining active community discussion channels for troubleshooting and support.