Version 1.4.0 (current)
Execute system commands
The actual Android permissions and execution locations behind bash-style operations.
A shell executes commands. Read the device identity and system information first, then choose write operations based on actual access. Distinguish commands running on the phone from those running on a computer.
Prerequisites
The current device runtime can launch Android /system/bin/sh on a development userdebug device. Actual authority depends on UID (Linux user identity), file permissions, SELinux mandatory-access policy, and Android service checks together.
The two entry points below are alternatives. If you are at a computer, use adb devices to find the target serial and replace emulator-5582; adb -s SERIAL shell opens that device’s shell. The phone commands then run on Android, while the adb command itself runs on the computer.
Read system state
Read from the phone shell
In the phone shell:
id
getprop ro.build.version.sdk
getprop ro.product.cpu.abi
getenforce
cmd display get-displays --ids-onlyChoose a target from the computer
When connected from a computer, select the target explicitly:
adb -s emulator-5582 shell id
adb -s emulator-5582 shell getenforceVerify the result
Read back execution identity, system information, and logical display IDs. The SDK wraps the same kind of device probes; a model can also invoke commands directly.
Verify writes separately
am start launches activities; input -d injects events into a selected display; pm install installs APKs; cmd notification posts notifications subject to Android identity checks. Successful command exit does not always prove that a notification appeared. Read back state or observe the native result.
Android shell is not a full desktop bash environment. Previous model runs encountered missing rg and Node absent from the default PATH. Recover using actual device tools and absolute paths rather than assuming desktop dependencies exist.
Limits and troubleshooting
Root and platform signing are different qualifications. SELinux Enforcing may still reject UID 0. Do not disable SELinux, modify third-party apps, or guess interfaces to bypass test boundaries.
Next steps
Research preview · Current availability
Report an issue or give feedback
Delivery to the maintenance queue does not mean it has been handled. Feedback is retained for 90 days.
Built with Fumadocs