adb_heap_dump
Capture a heap dump from a running Android process for memory analysis, then retrieve the .hprof file. Provide a PID or package name to select the target.
Instructions
Capture a heap dump from a running process for memory analysis. Triggers am dumpheap and pulls the resulting .hprof file. Requires the target process PID or package name.
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": {
"target": "<target>"
},
"name": "adb_heap_dump"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device | No | Device serial | |
| target | Yes | Process PID (number) or package name (e.g., com.example.app) | |
| filename | No | Output filename (default: heap_<target>_<timestamp>.hprof) |