adb_file_chmod
Change file or directory permissions on an Android device using an octal mode, with optional recursive, depth-protected application and root shell support.
Instructions
Change file permissions on the device. Mode must be a valid octal string (e.g., '755', '644', '600'). Recursive mode uses depth-based protection: refuses at depth ≤ 2 from root. Note: sdcardfs/FUSE ignores Unix permissions — file access on /sdcard is controlled by Android's package ownership model.
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>",
"mode": "<mode>"
},
"name": "adb_file_chmod"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | Octal permission mode (e.g., '755', '644', '0600') | |
| path | Yes | File or directory path | |
| root | No | Use root shell (typically required for chmod) | |
| device | No | Device serial | |
| recursive | No | Apply recursively to directory contents. Depth-protected. |