ADB โ the Android Debug Bridge โ is one of the most useful tools in an Android enthusiast's kit. It lets you control your phone from your computer through a simple command line: install apps, pull and push files, capture screenshots, read live logs, and diagnose problems. This guide covers the commands worth memorizing and how to use them safely.
What ADB Is and Why It Is Useful
ADB is a bridge between your computer and your Android device. Once connected over USB (or Wi-Fi), you can issue commands that would be awkward or impossible from the phone itself:
- Install and uninstall apps without the Play Store.
- Transfer files in bulk between computer and device.
- Capture screenshots and screen recordings cleanly.
- Read system logs to debug crashes and behavior.
- Reboot into different modes for maintenance.
Getting Connected First
Before any command works, you need to enable ADB:
- Open Settings โ About Phone and tap Build Number seven times to unlock Developer Options.
- In Developer Options, turn on USB Debugging.
- Connect your device and approve the authorization prompt.
- Run
adb devicesto confirm your device is listed.
If adb devices shows your device, you are ready. If it says "unauthorized," check the phone for the approval dialog. Once you are comfortable with a cable connection, you can also switch to wireless ADB over Wi-Fi so you no longer need to keep your phone plugged in โ a real convenience for repeated testing and file transfers throughout the day.
The Essential Commands
Here are the ones you will reach for most often. You can generate and copy any of these from the ADB Command Generator.
Device and connection
adb devicesโ list connected devices.adb rebootโ restart the device.adb reboot recoveryโ reboot into recovery mode.
Apps
adb install app.apkโ install an APK.adb uninstall com.example.appโ remove an app by package name.adb shell pm list packagesโ list installed packages.
Files
adb push localfile /sdcard/โ copy a file to the device.adb pull /sdcard/file localfolderโ copy a file from the device.
Screen capture
adb shell screencap /sdcard/screen.pngโ take a screenshot.adb shell screenrecord /sdcard/video.mp4โ record the screen.
Debugging
adb logcatโ stream live system logs.adb shell dumpsys batteryโ inspect battery state.
Tip: To find an app's package name for the uninstall or launch commands, inspect the APK with the APK Info tool โ the package name is right at the top.
Using ADB Shell
adb shell drops you into a command line running on the device itself. From there you can run device-side commands, query system properties with getprop, and manage packages with pm. It is the gateway to ADB's most powerful features, so tread carefully โ commands run here act directly on the phone.
Best Practices
- Confirm the device first. Always run
adb devicesbefore commands so you know you are targeting the right phone. - Only authorize trusted computers. The ADB prompt grants significant access; approve it deliberately.
- Back up before risky commands. Anything that clears data or changes system settings deserves a backup first.
- Use Wi-Fi ADB for convenience. Once set up, wireless ADB avoids cable juggling.
Common Mistakes to Avoid
- Forgetting USB Debugging. Nothing works until it is enabled and authorized.
- Wrong package names. Uninstall and launch commands need the exact package name, not the app's display name.
- Running destructive commands casually. Some shell commands can wipe data; read before you run.
- Ignoring the authorization prompt. If the device shows "unauthorized," approve it on the phone.
Conclusion
ADB turns your computer into a control center for your Android device. Master a handful of commands โ install, push, pull, screencap, logcat โ and you can install apps, move files, capture your screen, and debug issues far faster than tapping through menus. Enable USB Debugging, confirm your device, and keep a backup before anything risky.
Generate the exact commands you need with the free ADB Command Generator โ copy-ready and organized by task.