android_hook_method
Hook Java methods in Android apps to monitor calls, log arguments and return values, and optionally capture stack traces for debugging.
Instructions
Hook a Java method to monitor calls. Logs arguments, return values, and optionally backtraces.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"class_name": "<class_name>",
"method_name": "<method_name>"
},
"name": "android_hook_method"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| class_name | Yes | Full class name | |
| method_name | Yes | Method name (or '*' for all methods) | |
| dump_args | No | Log arguments (default: true) | |
| dump_return | No | Log return value (default: true) | |
| dump_backtrace | No | Log stack trace (default: false) |