root_run_command — Claude Code prompt: what it does, how to install
root_run_command — a prompt for Claude Code runs shell commands on Android with root privileges. Used when interacting with device system files.
Apache-2.0 ★ 9,488 updated 2026-11-16
.claude/commands/root_run_command.mdWhat root_run_command does
The prompt grants access to protected Android paths, bypassing the standard Linux sandbox. Read-only queries execute directly, whereas modifications or redirects require explicit user approval. The agent returns exit codes, stdout, stderr, timing metrics, and timeout flags.
Execution timeout defaults to 30 seconds with a maximum limit of 300. The tool interacts directly with the device shell through su.
What it helps with
- run an Android shell command as root
- access protected system files on a device
- read private data from other applications
- query system state via dumpsys or getprop
Example prompts for the agent
- Run an Android command with root_run_command
- Execute a root shell command on the device
- Inspect system logs using root_run_command
How to install root_run_command
Manually: put the files in place
.claude/commands/root_run_command.mdHow to use
Paste the text at the start of a chat or into project instructions
Questions about root_run_command
How to install root_run_command in Claude Code?
Place the prompt file at .claude/commands/root_run_command.md.
What does root_run_command do?
It allows the agent to execute shell commands with root permissions via su on Android devices, providing deep access to system files and app data.
What is the execution timeout for root_run_command?
The time limit defaults to 30 seconds and can be set up to a maximum of 300 seconds.
Source text
root_run_command.md · Apache-2.0
Run an Android shell command as root (uid 0) through su: full access to the whole phone, including other apps' private data and system files. This is the device shell, not the Linux sandbox. Returns ok, exitCode, timedOut, durationMs, stdout and stderr (head and tail when long). ok is true only when the exit code is 0 and it did not time out. Read-only commands (ls, cat, stat, du, find without -delete or -exec, grep, getprop, dumpsys, sqlite3 with only SELECT or PRAGMA reads, and the like) run directly. Anything else, or anything that cannot be told apart from a change (redirecting output to a file, $(...), piping into sh), may first ask the user, showing the exact command; if the user says no it is not run. Time limit: timeoutSec, default 30, at most 300.
© wangzan101 · Apache-2.0 · wangzan101/Mika