All Android enthusiasts love tinkering with their phones, and honestly, isn’t that’s what Android all about?
ADB and Fastboot commands allow you to a lot more than what you might otherwise be able to do. Just like Fastboot, which we’ve already covered in a previous article, ADB is also a command-line tool for Andriod that works as a bridge between your phone (or an emulator) and PC.
The ADB or Android Debug Bridge consists of three main components.
- Client: This is the computer you use to establish the connection between your phone or emulator.
- Daemon: Also known as ‘adbd’, this is the process that runs on your computer and facilitates the communication between the client and the device.
- Server: This is the software that handles all communications between the Client and the Daemon.
You need to download and install the proper USB drivers from your device’s Manufacturer, the latest Android SDK tools, and you’ll need to enable USB debugging on your device.
Also read: How to take an encrypted backup of your Android device using ADB?
ADB Command Cheatsheet
Here’s a list of useful ADB commands that you should try out if you’re looking to do more with your Android.
ADB Commands | Description |
---|---|
adb | This is a simple command that returns the ADB version and the list of all commands that you can use. |
adb devices | This command is used to check if the device is properly connected to your PC. You can also use adb devices -1 to get a list of devices sorted by model or product number. |
adb devices //show devices attached | Shows the list of connected devices. |
adb connect [IP address] | Connects to the device with the specified IP address. |
adb help | Shows the documentation of all ADB commands supported in the current ADB version. |
adb version | Shows the current version of the ADB driver installed. |
adb reboot | Reboots your Android device into the bootloader, fastboot or recovery mode |
adb reboot bootloader: | Reboots the device into bootloader mode. |
adb reboot recovery: | Reboots the device into recovery mode. |
adb install [APK name and location] | Installs the specified APK file onto the device. You can use the -r flag with this command to reinstall or update an app without affecting the app data or the -s or -k flags to install the app on the SD card. |
adb uninstall [APK name] | Uninstalls the specified APK file. You can use the -k flag to remove the APK but keep the cache and data files. |
adb usb | This shows a list of connected USB devices. |
adb logcat | This shows the device’s log data. You can use the -c flag to clear the log data or the -k flag followed by the file path to save the file to your PC. |
adb kill-server | Kills the currently running ADB server process. |
adb start-server | Starts the ADB server after you’ve killed the process. |
adb sideload | Used to sideload software update files. Note that your file should be named update.zip and must be stored in the platform-tools folder. You can use the Android stock recovery or TWRP mode to install the package as well. Just make sure you transfer the file to your phone, reboot your phone into bootloader mode and select Apply update from sdcard. |
adb pull [File path] [File save path] | Used to download or ‘pull’ files from your Android device. |
adb push [file path] | Used to upload or ‘push’ files to your device. You can use the /sdcard flag to push files to the memory card. |
adb backup // | Takes a full backup of your device on your computer. |
adb restore // | Restores any backups to your device. |
adb bugreport | The command dumps log ddata, dumpstate and dumpsys from your Android device. |
adb jdwp | Allows you to check the running JDWP or Java Debug Wire Protocol process on your PC. |
adb get-serialno | Shows the ADB instance serial number. |
adb get-state | Shows the ADB status of the connected device. |
adb wait-for-device | Instructs ADB to wait and keep the connection on hold until the next command is issued. |
Also read: How to delete Metadata from photos on Windows and Android?