adb_file_write
Create or overwrite text files on an Android device via ADB shell, ideal for configs, scripts, test fixtures, and small data files; use adb_push for large or binary files.
Instructions
Create or overwrite a text file on the device. Content is delivered via shell heredoc — suitable for config files, scripts, test fixtures, and small data files. For large or binary files, use adb_push instead. Shell buffer limits content to approximately 128KB.
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": {
"path": "<path>",
"content": "<content>"
},
"name": "adb_file_write"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Destination file path on device | |
| root | No | Use root shell for protected paths | |
| append | No | Append to existing file instead of overwriting | |
| device | No | Device serial | |
| content | Yes | File content to write |