ADB and Fastboot Commands
Android

50+ ADB and Fastboot Commands for Windows, Linux & macOS

Hey Android users! What’s up? Let me guess. You are looking for ADB Fastboot commands and a guide on how to use these commands to customize your android device, right? Then you have reached the right place. In this post, we are going to explain all about ADB and Fastboot commands, platform tools, and how to use them in Windows to make changes to your Android device using those commands. 

ADB and Fastboot commands are magically amazing & interesting that allows you to perform various operations from copying/moving files to flashing custom ROM in Android devices. And what’s more amazing is that these commands are universal and work the same on all Android devices. So, let’s get started to know more about them in this article.

What is ADB?

ADB is the acronym for Android Debug Bridge. It’s a command-line tool that establishes a connection between the Android device and the PC via USB and then allows the users to debug the Android device using the ABD commands through a Unix shell. Unix shell, Power Shell, or Command Prompt is required to run ADB commands. 

Using the ABD commands, users can perform various actions like copying & moving files, installing & uninstalling apps, rebooting the device in normal mode or recovery mode, and many more operations. You can use the ABD commands while the device is turned on. 

ADB Commands List

ADB and Fastboot Commands

In this section, we have shared all the ADB Commands including the ADB Shell Commands along with their functions.

ADB Commands

ADB Commands
Used To
adb devices
To show all the Android devices connected through ADB
adb shell
Interact with the device’s OS
adb reboot bootloader
Reboot the device into Bootloader or Fastboot mode
adb reboot recovery
Reboot the device into recovery or TWRP mode from booted OS
adb pull /file_location/filename
Copy a file from android device and paste it into the PC.Example – adb pull /system/download/brawl.mp4
adb push /source_path/source_name/target_path
Copy a file from a PC and paste it into the Android device. Example – adb push /download/brawl.apk/sdcard/games
adb sideload filename
To flash zip files or Custom ROM in recovery mode which is available on the computer
adb start-server
To start the ADB Server processes
adb kill-server
To stop the ADB server processes
adb install filename.apk
To install an APK file on your Android device
adb install -r filename.apk
To reinstall or update the app
adb install -s filename.apk
To install or move the app to SDcard
adb uninstall package_name
To uninstall an app from the Android device
adb uninstall -k package_name
To uninstall an app but keep its data & cache
adb help
Shows ADB Help Documentation
adb logcat
To display the real-time log data on the screen
adb bugreport
To display dumbsys and dump state data on the screen
adb jdwp
To list the Java Debug Wire Protocol processes (JDWP Processes) on the device
adb get-serial no
To show the ADB serial number string of all the connected Android device
adb get-state
To display the device status
adb wait-for-device
To set a delay period before the next command is issued. 
adb backup
To create a backup of the Android device and save it to your computer
adb restore
To restore the backup to your Android device

ADB Shell Commands

adb shell pm list packages
Lists package names of all apps installed on your Android device
adb shell pm list packages -s
Lists package names of all system apps installed on your Android device
adb shell pm uninstall -k –user 0 app_package_name
To uninstall the system app from the Android device
adb shell pm list packages -3
Lists package names of all third-party apps installed on your Android device
adb shell screencap /sdcard/screenshot.png
To take a screenshot. The screenshot will save on SD card with the screenshot.png name.
adb shell
rm -f /file_location/file_name
To delete a file stored on your Android device
adb shell
crm -d /folder_name
To delete the folder stored in the Android device
adb shell
mkdir /sdcard/Star
To create a new folder named Star in the SD card 
adb shell
cp /source_location/source_file_name/destination_path
To copy a file from the source location and paste it to the entered destination.
adb shell
mv /source_location/source_file_name/destination_path
To move a file from the source location to the entered destination.

What is Fastboot?

Fastboot is a tool included in the Android SDK package which allows you to access all the Android device’s partitions including the data partition and the boot partition via a USB connection from a computer. To use the fastboot, you will require the Android device in the fastboot or bootloader mode. You can use the Fastboot commands while the device is turned off.

Fastboot Commands List

In this section, we have shared all the fastboot commands with their functions. 

Fastboot Command
Used to
fastboot reboot
To reboot the Android device in normal mode
fastboot reboot recovery
To reboot the Android device in recovery mode
fastboot devices
To show all the Android devices connected in fastboot mode to the computer
fastboot reboot bootloader
To reboot the Android device into fastboot or bootloader mode
fastboot oem unlock
To unlock the bootloader on the Android device
fastboot oem lock
To relock the bootloader of your Android device
fastboot oem device-info
To check the lock/unlock status of the bootloader of the Android device
fastboot flash
To flash files on the Android device
fastboot flash boot boot.img
To flash boot image on the Android device’s boot partition 
fastboot flash recovery recovery.img
To flash recovery image on the Android device’s recovery partition
fastboot boot file_name.img
To boot directly the image without installing it.
fastboot getvar cid
To display the CID of the Android device

How to Use ADB and Fastboot Commands

To use the Fastboot ADB commands, you will need Android SDK Platform Tools on your computer, need to enable USB Debugging on your Android device, and then write the commands in the Power Shell or Command Prompt. Don’t worry about anything. We are going to give a complete guide you can follow to use these commands.

ADB and Fastboot Platform Tools

In this subsection, we have written down all the steps necessary to install ADB Fastboot Platform tools and how to use them. These steps are as follows:

  • First of all, download the Platform Tools based on your computer OS using the following links – Windows | macOS | Linux
  • It will download a zip file to your computer. It contains all the Platform Tools in a folder named Platform Tools. Extract that folder. The files included in the folder are shown in the following image.
ADB and Fastboot Commands
  • Now, go to the Platform Tools folder and open the PowerShell or Command Prompt according to your preference. Remember that you have to open the PowerShell or Command Prompt from the same folder where the platform-tools are. 
  • To open the PowerShell, right-click on the empty space while pressing the Shift key. 
ADB and Fastboot Commands_1
  • Then click on the “Open PowerShell Window here”. It will open the PowerShell. Now you can type ADB and Fastboot commands here.
ADB and Fastboot Commands_2
  • If you want to use Command Prompt, you can open it by typing “cmd” in the address bar in the platform tool folder and then hitting the enter button. 
ADB and Fastboot Commands_3
  • Then in the command prompt, you can type the ADB Fastboot commands and execute them.
ADB and Fastboot Commands_4

Note: When using the commands in the PowerShell, start the commands with “.\” For example, .\adb command_name. But there’s no need to write .\ in the command prompt. 

How to Enable USB Debugging on the Android Device

To enable the USB debugging on your Android device, follow the steps written below:

  • Open the Setting in your device.
ADB and Fastboot Commands_5
  • Then go to the “About Phone” option. You will see ‘Build Number’ here. Tap on it 7 times. While tapping the build number, you can see a toast message indicating how many taps away you are from being the developer. 
ADB and Fastboot Commands_7
  • After tapping it 7 times, you will become a developer. 
ADB and Fastboot Commands_8
  • Now go back to the setting. 
  • Then search for the developer option in the settings. I am using Samsung Note 10 Lite and found the developer option below the about phone option. You may find it in the advanced setting option.
ADB and Fastboot Commands_9
  • In the developer options, you will see the “USB Debugging” option. Enable it. If you are going to use the adb bootloader command and adb reboot bootloader command, then enable the “OEM Unlocking” option as well. 
ADB and Fastboot Commands_10

FAQ

How to use ADB commands?

To use ADB commands, you will need ADB and Fastboot Platform Tools on your computer, and a USB debugging option enabled on your Android device. Then you can use the ADB commands in the PowerShell or Command Prompt.

ADB Fastboot commands are working in Command Prompt, but not in the PowerShell. Why?

Maybe you are writing the commands without “.\” in the PowerShell too just like in the Command Prompt. Always write .\ before all the commands in the PowerShell.

Can I use fastboot commands without turning off the Android device?

No. To use the fastboot commands, you have to turn off the android device.

Conclusion

Thank you for visiting and reading the post. ADB and Fastboot commands allow you to customize & modify the Android device using your computer by establishing a connection via USB. You can perform various functions from copying, moving, & deleting files to flashing Custom ROM in the Android device. In this post, we have shared all the ADB Fastboot commands and a guide on how to use these commands. We hope you can now use the commands without facing any issues. If you have any questions, feel free to ask us in the comment section. Have a nice day!

Leave a Reply

Your email address will not be published.