root_access
Enables root shell and stack dump access in Waydroid by running commands through sudo, with optional password-file authentication and a check that prevents sudo lockout.
Instructions
Sets up root in Android for shell with root and stack_dump. adb root is disabled in Waydroid, so root runs sudo waydroid shell. Pass a file holding the sudo password, or nothing to use sudo without one (a NOPASSWD rule). With check, runs id -u as root once; if sudo rejects the password, root stays off so repeated failures can't lock sudo.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "root_access"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| check | No | ||
| password_file | No | Absolute path of a file containing the sudo password. |