renef_jni
Create, read, and measure Java strings via JNI, and delete global references to manage jstring or ART String pointers during Android instrumentation.
Instructions
Raw JNI string & reference helpers (Jni.* API — distinct from JNI.* return tags).
Actions:
new_string: Create a Java String from UTF-8 text ->Jni.newStringUTF(value)(returns ref pointer)get_string: Read UTF-8 text from ajstringor raw ARTString*pointer ->Jni.getStringUTF(ref)string_length: Get UTF-16 character length of ajstring/ ARTString*->Jni.getStringLength(ref)delete_ref: Delete a JNI global reference ->Jni.deleteGlobalRef(ref)
Args: action: "new_string", "get_string", "string_length", or "delete_ref" value: UTF-8 string value (required for "new_string") ref: JNI reference / ART String* address (required for "get_string", "string_length", "delete_ref")
Returns: JSON object with JNI operation result
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": {
"action": "<action>"
},
"name": "renef_jni"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | ||
| value | No | ||
| action | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |