Browse by type
PineHookPlus is an advanced example project demonstrating creative and efficient ways to leverage the Pine Hooking Framework for runtime modifications in Android apps. This project focuses on simplifying the integration and customization of hooks, offering a structured and flexible approach to app behavior modification.
To learn more about its usage and demo, please refer to the blog post.
hook/ for streamlined access.config.json to define hooks in the hook/ directory.AppComponentFactory, android:name and uses ContentProvider.PineHookPlus/
│
├── app/
│ ├── src/
│ │ ├── hook/ # Hook source directory
| | | ├──hook/
| | | | ├── libarm.so # ARM32 library
| | | | ├── libarm64.so # ARM64 library
| | | | ├── config.json # Hook configuration file
| | | | ├── modules.txt # Xposed modules configuration file
│ │ ├── main/ # Main application source code
│ │ └── ... # Other modules and configurations
│ ├── build.gradle # Project-specific Gradle file
│
├── build.gradle # Root Gradle file
└── settings.gradle
In config.json, define the target class and method to hook, along with the parameter types, arguments, and return value as needed:
{
// Target class to hook
"com.pinehook.plus.MainActivity": {
// Method name to hook
"argMethod": {
// parameter types of the method
"paramTypes": [
"boolean"
],
// return result of the method after it's call
"after": {
"result": false
}
},
"beforeOnlyMethod": {
"paramTypes": [
"java.lang.String"
],
"before": {
// args to pass to the method before it's call
"args": [
"modifiedBefore"
]
}
},
"afterOnlyMethod": {
"paramTypes": [
"java.lang.String"
],
"after": {
// return result of the method after it's call
"result": "modifiedAfter"
}
}
},
}
{
// Constructor hook example
"com.pinehook.plus.ConstructorClass": {
// Do not change this value for constructor hook
"constructor": {
// parameter types of the constructor
"paramTypes": [
"boolean",
"java.lang.String",
"boolean",
"long",
"long",
"java.lang.String",
"java.lang.String",
"java.lang.String"
],
// args to pass to the constructor before it's call
"before": {
"args": [
true,
"PlayStore",
false,
0,
0,
"null",
"Yearly",
"null"
]
}
}
}
}
Check config.json for more.

This project is licensed under the MIT License. See the LICENSE file for details.
$ claude mcp add PineHookPlus \
-- python -m otcore.mcp_server <graph>