With the power of ADB, you can do more than you think. This command-line tool works like a bridge between a connected computer and an Android device or emulator. Unfortunately, most users are familiar with only a small set of ADB commands. We have compiled a list of ADB commands with detailed explanations. With proper knowledge of the commands and their functions, you can explore the true potential of your Android device and perform basic and advanced tasks.
Most users make use of just a small set of commands such as adb devices
, fastboot oem unlock
, fastboot flash recovery.img
, and so on. Check out the following ADB commands list with a simplified explanation for each of them. ADB or Android Debug Bridge consists of 3 components:
- Client: the computer your Android device or emulator is connected to.
- Daemon: also known as ‘adbd‘ is the service that runs on your computer and Android device to facilitate command execution and acceptance between the devices.
- Server: this is the very software that handles the communication between the Client and the Daemon.
Don’t Miss: Speed up Android with These ADB Commands
List of ADB Commands with Explanation
Below is a list of useful ADB commands with a brief description of their functions. ADB can help you debug your Android phone, reboot it, sideload APKs and flashable ZIPs, push and pull files, uninstall apps, and perform other tasks. Before you proceed, however, set up the SDK Platform-tools on your computer or install the aShell Terminal app to run ADB commands on your Android device.
adb
Get the ADB version and all possible commands associated with ADB.
adb -s
Redirect commands to a specific device when many devices are connected.
adb -s <deviceName> <command>
adb -d
This command directs the command to a device connected via USB.
adb –d <command>
adb -e
Use this command to direct ADB commands to a connected emulator.
adb –e <command>
adb devices
This is one of the most used ADB commands to check the list of Android devices connected to your computer.
adb devices -l
List connected devices by model or product number.
adb devices //show devices attached
This is similar to the ‘adb devices’ command that shows you the list of Android devices and emulators that are connected to your computer.
adb connect ip-address-of-device
Find out and connect the IP address of your device to your PC. You can use this ADB command to set up ADB over Wi-Fi.
adb help
Displays the help documentation on all ADB commands.
adb root
Restarts adbd
with root permissions.
adb version
Find out the version of the ADB driver installed on your computer.
adb reboot
Reboot your Android phone or tablet into the bootloader, fastboot, or recovery mode.
adb reboot bootloader
Reboot your Android device in the Fastboot or Bootloader Mode. The command is often used when you want to flash the factory images or a custom recovery.
adb reboot download
Boot Samsung devices into the Download Mode or Odin Mode.
adb reboot recovery
Reboot your device into Android Recovery mode.
adb install
Usually, we transfer an APK file to our Android device and install it via File Manager. This command makes it easy to sideload APK files directly from your computer. To be able to do so, copy the APK file to the SDK platform-tools folder first. There are some variations of this command for different conditions.
adb install com.facebook.katana.apk
While you can install an APK on your Android devices using the above command, you can use the command below to update or reinstall an app without deleting its data.
adb install -r com.facebook.katana.apk
Some apps support installation on the SD card. The following ADB commands move an app to the SD storage.
adb install -s com.facebook.katana.apk
adb install –k <add the path of the .APK file on your computer>
adb uninstall
Uninstall an app from your phone or tablet.
adb uninstall com.facebook.katana
Uninstall an app but keep its data and cache files using the ‘-k‘ parameter as shown below.
adb uninstall -k com.facebook.katana
adb usb
Find the Android device or emulators currently connected to your Windows, Mac, or Linux computer.
Read Also: ADB Commands to Optimize Battery on Android
adb logcat
See the log data of your Android device on your computer. You can also use parameters like ‘-c‘ (clear) and ‘-d‘ (save).
adb logcat -c // clear //
Clear all existing logs on your Android phone or tablet. To save the logcat data on your PC, use the following command.
adb logcat -d > [path_to_file] //
adb start-server
Start the adb server in case it stops responding. It’s often used after killing the adb server as described below.
adb kill-server
Kill the ADB server if it is not functioning properly. It’s similar to turning off our Android devices to fix small issues.
adb sideload
Sideload software update.zip file to an Android device using your computer. If you have a flashable update.zip, copy it to the ‘platform-tools‘ folder and execute the following command. If the zip file has a different name, rename it to “update.zip” for convenience.
adb sideload update.zip
Alternatively, you can sideload or flash update zip packages using Android Recovery or TWRP Recovery. For that, you will have to transfer the update.zip file to your device, reboot your Android into recovery mode, and select the “Apply update from sdcard” option.
adb pull
Download or pull files stored on your Android device to your computer. The pulled files are saved to the ‘platform-tools’ folder.
adb pull /sdcard/video-01.mp4
To pull a file to a specific location or drive (D drive, for instance) on your PC, mention the location path as shown below.
adb pull /sdcard/video-01.mp4 d:\
adb push
Push a file from your computer to your device. Please note that you’ll have to transfer the file you want to push to the ‘platform-tools’ directory. For instance, to push a file to your Android device’s SD card, use the following command.
adb push com.whatsapp_2.19.368-453132.apk /sdcard
Send a file to your device stored in a specific location on your computer.
adb push d:\com.whatsapp_2.19.368-453132.apk /sdcard
adb backup //
Create or take a full backup of your Android to your computer.
adb restore //
Restore the backup you have already created.
adb bugreport
Diagnose issues on Android devices. Its execution can show you log data, dumpstate, and dumpsys from your Android device on your computer.
adb jdwp
See the list of JDWP processes on your PC. JDWP means Java Debug Wire Protocol.
adb get-statе
Print the device state in the command window.
adb get-serialno
Find out the ADB instance serial number.
adb get-state
Shows the ADB status of a connected device or emulator.
adb wait-for-device
This program tells ADB to wait and keep the connection on hold until the next command is issued.
That’s all for now. ADB Shell commands are more useful than the commands mentioned above. Don’t forget to check them out.
Download ADB Commands PDF
I’ll keep updating this list of ADB commands regularly. You can also download this list of ADB commands as a PDF file for future reference.
Read Next: How to Unlock Android PIN and Pattern Using ADB