Mobile Development 3 min read

How to Use ADB Commands: Reboot, Logcat, and Shell

This guide explains essential ADB commands for Android development, covering how to reboot a device (including bootloader and recovery modes), view real‑time logs with logcat and its filtering options, and enter the device’s shell to run Linux commands such as ls, pwd, and top.

Test Development Learning Exchange
Test Development Learning Exchange
Test Development Learning Exchange
How to Use ADB Commands: Reboot, Logcat, and Shell

During Android development or testing, you may need to restart a device to apply changes or restore its state. ADB provides a simple command to do this.

Command format: adb reboot . Running this in a command prompt or terminal will reboot the connected device.

If you need to reboot into a specific mode, use the following commands:

Reboot to bootloader: adb reboot bootloader

Reboot to recovery: adb reboot recovery

To view device logs in real time, use adb logcat . This powerful tool helps debug applications and resolve runtime issues. You can filter output, for example to show only logs from a specific tag:

adb logcat MyTag:I *:S – displays informational logs for MyTag while suppressing others.

To enter the device’s shell environment, use adb shell . Once inside, you can execute Linux commands such as:

List files in the current directory: ls

Show the current working directory: pwd

View CPU usage: top

These ADB commands are fundamental for daily development and testing tasks, and mastering them will improve your efficiency when working with Android devices.

debuggingMobile Developmentandroidshellcommand-lineADB
Test Development Learning Exchange
Written by

Test Development Learning Exchange

Test Development Learning Exchange

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.