Useful ADB and Fastboot Commands

ADB and Fastboot Commands
TechLatest is supported by readers. We may earn a commission for purchases using our links. Learn more.

Android enthusiasts are already in love with rooting their devices and familiar with bootloader, fastboot commands, etc. Either it is rooting the device or flashing a new kernel, the first most thing we need to do is installing ADB and Fastboot drivers. Rooting a device enlarges the customization option, and it’s better to say that with rooting, a smartphone becomes smarter. But how a device gets so much power? With Fastboot commands.


Here in this article, we will discuss some essential and useful ADB and Fastboot commands. These commands will help and assist you in entering the bootloader by rebooting your device.

List of Some Useful ADB and Fastboot Commands

Before listing all the ADB and Fastboot commands, you should know how to install ADB and Fastboot on any operating system. To understand the complete installation of ADB and fastboot and how to enable USB debugging on your Android device, follow this link.

How to Install ADB and Fastboot?

ADB and Fastboot Commands

There are hundreds of ADB and fastboot commands, but most of them are not required, so we have collected and listed some important and useful fastboot commands. These fastboot commands can be executed on a terminal or command prompt in the computer while your Android device is connected with the computer with the proper required settings.

Most Common ADB commands:

adb devicesIt will show list of all devices connected with the PC via ADB
adb rebootThis command will restart your system
adb helpThis will display the help documentation of
adb installThis will install APK files manually on the Android device using ADB
adb recoveryThis will start your Android into recovery mode
adb install filename.apkThis will install APK files (replacing the file name with the particular APK file name)
adb install -s filename.apkThis will install APK file in the external SD Card (if supported by the application)
adb install -r filename.apkThis will re-install or update an APK file to the newer version on Android using ADB
adb uninstall filename.apkThis will uninstall an APK file on your device.
adb uninstallThis will uninstall any app using ADB command
adb uninstall -k com.tencent.igThis will uninstall the app keeping the data and cache untouched
adb uninstall com.tencent.igThis will uninstall PUBG app package (replace package name with your desired one)
adb logcatThis will display full log data on the screen
adb bugreportThis will check then the dumpsys, dumpstate and logcat data
adb jdwpThis will display full list of Java Debug Wire Protocol (JDWP) processes on the Android
adb wait-for-deviceThis command is used to program the device in such way so that it can wait for some time until another process is completing.
adb get-serialnoIt displays the ADB instance serial number string which is associated with the device
adb start-serverThis will start the ADB server process
adb kill-serverThis will terminate the ADB server process.
adb restore //This will restore the backup
adb backup //This will create a complete backup of your Android device and save it to the computer also.
adb connect ip_address_of_deviceThis will connect the IP address of Android device to the PC.
adb shellThis will interact with your device’s operating system
adb reboot recoveryThis will boot your device to stock recovery or TWRP from the booted OS
adb pull /file-location-on-device/filenameThis will ‘pull’ any file from Android device and send it to PC
adb push filename /destination-locationThis will push’ any file to the Android device from PC
adb sideload filenameThis will flash (install) zip files directly from the command shell
adb sideload ota-update.zipThis will used to manually install OTA updates using recovery mode (when the ZIP file is present on the computer, not in Android device)

Rare but Important Commands

adb shell pm list packagesThis command will list all the app packages
adb shell pm uninstall -k –user 0 app-package-nameThis command will uninstall system apps or any bloatware
adb shell pm list packages -sThis command will  list all the system apps
adb shell pm list packages -3This command will list all the installed third-party apps.
adb shell screencap /sdcard/screenshot.pngThis command will capture screenshot from your device
adb pull /sdcard/screenshot.pngThis command will download the captured screenshot to your PC
adb shell
rm -f /sdcard/OPWallpaperResources.apk
This command will delete a file
adb shell
rm -d /sdcard/ZooperWidget
This command will delete a folder
adb shell
mkdir /sdcard/NewFolder
This command will create a new folder on your device
adb shell
cp /sdcard/OPWallpaperResources.apk /sdcard/LiveWallpapers
This command will copy a file from one location and paste it to another location (on your device)
adb shell
mv /sdcard/OPWallpaperResources.apk /system/app
This command will move a file from one location to another (on your device)

Most Common Fastboot Commands

adb reboot bootloaderThis will reboot your device to fastboot or bootloader mode
fastboot devicesThis will check whether the connection is successful or not
fastboot oem unlock
fastboot flashing unlock
This will unlock the bootloader of your device, type in any of the two codes (make sure ‘OEM Unlocking’ is enabled from the ‘Developer Options’)
fastboot oem lock
fastboot flashing lock
This will relock the bootloader of your device
fastboot boot recovery-name.imgThis will boot a recovery file on your device
fastboot flash boot boot-file-name.imgThis will flash (install) a boot file from the command shell
fastboot flash recovery recovery-name.imgThis will flash (install) a recovery file from the command shell to the recovery partition
fastboot erase userdataThis will erase all the userdata on your device (i.e.formatting the userdata partition)
fastboot -wThis will erase everything from your device
fastboot getvar allIf their is dual A/B Partition in the device, then this command can be used to check current active partition.
fastboot set_active bIf their is dual A/B Partition in the device, and you want to switch between slots, say from A to B, so this command can be used
fastboot rebootThis will reboot your PC to Android operating system
fastboot reboot recovery // general command
fastboot oem reboot-recovery // for some devices such as Poco X2
This will reboot from Fastboot to recovery mode, either TWRP or stock
fastboot reboot fastbootThis can be used to boot the device to the newer FastbootD Mode

So, these were some important ADB and Fastboot commands. I hope you like this article. If you know some more important ADB and fastboot commands that can be added to this post, or you have some more suggestions, so let us know in the comment section.

Leave a Comment
Related Topics
Notify of
Inline Feedbacks
View all comments