write_file
Write text content to any Android device file by pushing a temporary file, safely handling content that shell echo cannot. Optionally push as root into protected paths and return status, remote path, and byte count.
Instructions
Write text content to a device file by pushing a temp file (handles any
content safely, unlike shell echo). as_root pushes to /data/local/tmp then
su -c cp into place. Returns {status, remote, bytes}.
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": {
"remote": "<remote>",
"content": "<content>"
},
"name": "write_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| remote | Yes | ||
| serial | No | ||
| as_root | No | ||
| content | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||