renef_java_call
Call Java static methods, construct objects, or invoke/release instance handles with JNI-style signatures for Android Java instrumentation and reverse engineering.
Instructions
Call a Java static method, construct an instance, or call/release a boxed JavaObject.
Uses Renef v0.4.0's Java.use(class):call(...) / :new(...) and instance handles.
Examples:
Static call:
class_name="java/lang/System",method_name="currentTimeMillis",signature="()J"Constructor:
class_name="java/io/File",constructor=True,signature="(Ljava/lang/String;)V",args=["/data/local/tmp"]Instance call:
instance_handle=1,method_name="exists",signature="()Z"Release handle:
instance_handle=1,release=True
Args:
class_name: Java class name (dots or slashes accepted; required unless instance_handle > 0)
method_name: Method name (required unless constructor=True or release=True)
signature: JNI method/constructor signature (e.g., "()Ljava/lang/String;", "(Ljava/lang/String;)V")
args: Optional argument list (strings, ints, bools, floats, or None)
constructor: If True, constructs a new instance via :new(signature, ...)
instance_handle: Existing JavaObject handle returned by a previous call/constructor
release: If True with instance_handle > 0, releases the target-side JNI reference
timeout: RPC timeout in seconds (default: 30.0)
Returns:
JSON object with the return value (or {handle, raw_hex} for returned Java objects)
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "renef_java_call"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | ||
| release | No | ||
| timeout | No | ||
| signature | No | ()V | |
| class_name | No | ||
| constructor | No | ||
| method_name | No | ||
| instance_handle | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |