renef_hook_java
Install a Java method hook for Android instrumentation using JNI class names and signatures. Intercept method calls and modify arguments or return values through on_enter and on_leave callbacks.
Instructions
Install a Java method hook. class_name in JNI slash format (e.g. "com/example/Class"), signature in JNI format (e.g. "(Ljava/lang/String;)Z"). arg layout: args[0]=ArtMethod* (ignore), args[1]=this (instance methods), args[2..]=parameters. Use on_enter="args.skip = true" to bypass void methods. Wrap uncertain classes in pcall via renef_exec.
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": "<method>",
"signature": "<signature>"
},
"name": "renef_hook_java"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| method | Yes | ||
| on_enter | No | ||
| on_leave | No | ||
| signature | Yes | ||
| class_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |