Skip to main content

Execute ADB shell commands

The integration of Android Debug Bridge (ADB) shell support within the LambdaTest Manual Testing platform for app testing on Android devices empowers users to run supported ADB shell commands directly on devices during manual testing sessions, receiving instant output. This feature addresses the challenge of remote device communication, enabling users to interact with devices as if they were physically present.


Benefits

  • Unlock new testing scenarios that require direct device interaction, simplifying the development process.
  • Speed up testing by easily accessing native device capabilities and APIs, reducing reliance on framework-specific commands.
  • Gain better control over device configurations to execute specific commands tailored to your test cases.

Accessing ADB Shell Terminal

Step 1: Login to your LambdaTest account and navigate to App Testing under Real Device from the left sidebar.

Step 2: Choose the OS version (Android), select your application and device from the device listing, and start your test session.

Step 3: Access ADB Shell

  • Once in the test session, find the ADB Shell icon on the top bar.
  • Click the ADB Shell icon to open the terminal and start running supported ADB shell commands.
  • With a single click, you can clear the terminal content or download the terminal output as a .txt file.
ADB Shell Access

Supported ADB Commands

To ensure security and compatibility, we have a list of ADB commands that can be executed within our Real Device Cloud. Please refer to the following list of supported commands:

Supported ADB Commands - Public Device

CommandDescription
am startLaunches an activity on the device. Useful for opening apps or specific screens.
am force-stopForce-stops an application by its package name.
am compat enableEnables app compatibility options.
cat /sdcard/Download/Displays the content of a specific file inside the Download folder.
cat /sdcard/Pictures/Displays the content of a specific file inside the Pictures folder.
cat /sdcard/Movies/Displays the content of a specific file inside the Movies folder.
cat /proc/versionDisplays kernel version and build info.
dumpsysDumps system service information (battery, activity, memory, etc.).
echoPrints text to the terminal. Useful for testing output or scripting.
getpropGets system properties. Often used for device diagnostics.
grepSearches for text patterns. Useful for filtering logs or command output.
inputSimulates user input like taps, swipes, or key events.
log.tag.FAFirebase Analytics SDK logs (e.g., event recording, session start).
log.tag.FA-SVCFirebase background service logs (e.g., data uploads, scheduled jobs).
ls /sdcard/DownloadLists all files and folders located in the device's Download folder.
ls /sdcard/PicturesLists all files and folders located in the device's Pictures folder.
ls /sdcard/MoviesLists all files and folders located in the device's Movies folder.
pm clearClears all data associated with a package (app).
pwdDisplays the current working directory.
setprop debug.firebase.analytics.appEnables Firebase Analytics debug mode for a specific app.
wm fixed-to-user-rotationControls screen rotation policy.

Supported ADB Commands - Private Device

All the public commands along with the following:

CommandDescription
am instrumentExecutes instrumented tests. Often used in automated testing pipelines.
am broadcastSends custom broadcast messages for triggering in-app actions.
amAll other app manager commands.
cmd connectivity airplane-modeToggles airplane mode on/off (requires permissions).
logcatStreams real-time logs from device, including app logs.
lsLists files and directories. Commonly used to inspect folders like /sdcard/Download.
mkdirCreates a new directory.
pmAll other package manager commands.
rmRemoves files or directories.
setpropSets custom system properties (e.g., for debugging frameworks).
note

adb shell is already pre-applied in our terminal environment. Rewriting it explicitly may prevent the command from executing properly.

If the command you require is not listed, please reach out at our 24x7 Chat Support or you could also mail us at support@lambdatest.com.

Test across 3000+ combinations of browsers, real devices & OS.

Book Demo

Help and Support

Related Articles