ADB (Android Debug Bridge) is a powerful command-line tool that allows you to communicate with and control your Android device from your computer. It's particularly useful for developers and advanced users who want to enhance their Android experience. Here's a guide on how to use some of the most common ADB commands to get more out of your Android device:
Setting Up ADB
-
Install ADB: Download the Android SDK Platform Tools from the official Android developer website, which includes ADB. Extract the package.
-
Enable USB Debugging on Your Android Device:
- Go to Settings > About Phone.
- Tap "Build Number" repeatedly until it says "You are now a developer."
- Go back to Settings > Developer Options and enable "USB Debugging."
-
Connect Your Device to Your Computer via USB.
-
Open a Command Prompt or Terminal Window:
- Navigate to the directory where the ADB tools are located (e.g.,
platform-tools).
- Navigate to the directory where the ADB tools are located (e.g.,
-
Verify Connection: Type
adb devicesto see a list of connected devices. Your device should be listed.
Useful ADB Commands
-
Reboot Your Device:
adb rebootUse this to restart the device.
-
Reboot into Recovery Mode:
adb reboot recoveryThis command will reboot the device into recovery mode.
-
Reboot into Bootloader:
adb reboot bootloaderThis command will reboot the device into bootloader mode.
-
Install an APK:
adb install path/to/your.apkThis will install the specified APK on your device.
-
Uninstall an App:
adb uninstall package.nameReplace
package.namewith the app package you want to remove. -
Copy Files to Device:
adb push local/file/path /sdcard/remote/file/pathUse this command to transfer files from your computer to your device.
-
Copy Files from Device:
adb pull /sdcard/remote/file/path local/file/pathTransfer files from your device to your computer using this command.
-
Logcat for Debugging:
adb logcatThis command streams system logs, which is useful for debugging.
-
Take a Screenshot:
adb shell screencap /sdcard/screenshot.png adb pull /sdcard/screenshot.pngCapture and save a screenshot from your device to your computer.
-
Record Screen (Android 4.4 and above):
adb shell screenrecord /sdcard/screenrecord.mp4 adb pull /sdcard/screenrecord.mp4Record screen activity on your Android device.
-
Check Device Battery Status:
adb shell dumpsys batteryThis provides detailed information about the device’s battery.
-
Set File System Read-Write:
adb remountMounts the system partition in writable mode.
Tips
- Security: Be mindful when enabling USB Debugging, as it exposes your device to higher security risks if connected to untrusted computers.
- Back Up Data: Before making any changes, especially uninstalling apps or modifying system files, ensure your data is backed up.
Using these ADB commands, you can significantly enhance your Android device's functionality, customize its features, and troubleshoot issues easily.


