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.
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.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
