ADB Basics Android 1.0+ Risk: SAFE

Start Remote Interactive Shell

Starts an interactive Linux shell session on the connected Android device or executes a single command.

Command Syntax

adb shell
Generic Syntax: adb shell [command]

Options & Parameters

Flag Description
-x Disable remote PTY allocation.
-t Allocate a PTY (pseudo-terminal).

Real-World Usage Examples

Open interactive shell
Spawns an interactive shell prompt on the target device.
adb shell
Output:
husky:/ $ 
Execute a single shell command without opening prompt
Directly executes command and outputs result to standard terminal.
adb shell getprop ro.build.version.release
Output:
16