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
In this section, we have shared all the ADB Commands including the ADB Shell Commands along with their functions.
To show all the Android devices connected through ADB
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
To start the ADB Server processes
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
Shows ADB Help Documentation
To display the real-time log data on the screen
To display dumbsys and dump state data on the screen
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
To display the device status
To set a delay period before the next command is issued.
To create a backup of the Android device and save it to your computer
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.
rm -f /file_location/file_name
To delete a file stored on your Android device
crm -d /folder_name
To delete the folder stored in the Android device
To create a new folder named Star in the SD card
To copy a file from the source location and paste it to the entered destination.
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.
To reboot the Android device in normal mode
fastboot reboot recovery
To reboot the Android device in recovery mode
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
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.
- 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.
- Then click on the “Open PowerShell Window here”. It will open the PowerShell. Now you can type ADB and Fastboot commands here.
- 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.
- Then in the command prompt, you can type the ADB Fastboot commands and execute them.
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.
- 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.
- After tapping it 7 times, you will become a developer.
- 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.
- 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.
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.
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.
No. To use the fastboot commands, you have to turn off the android device.
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!