If you are a basic Android user and unaware of features like developer options, you are missing many advanced features that you can get on your Android phone. As I mentioned earlier these are powerful commands that can fix, upgrade, or even unlock Android devices. Out of ADB and Fastboot, ADB is a common word, and you might also know about this word and its use. And if not, don’t worry, I will help you to understand both ADB and Fastboot in this guide along with ADB and Fastboot commands.
What is ADB?
The expansion of ADB is Android Debug Bridge, and it is used to communicate with Android devices through various commands. These commands that we use to communicate between devices are known as ADB commands. ADB feature comes by default in all Android phones but is hidden deep in Settings. To use ADB commands, we need to first enable ADB support from Settings on the device. The ADB works as a client-server structure for easy communication.
What is Fastboot?
Fastboot is a bootloader mode or diagnostic tool on Android phones, which we can use to flash different files on the phone. It is a unique boot state which only supports the command line interface, including reboot or restart operation. The Fastboot mode is used for any modification on Android phones using Fastboot commands. Now you must be familiar with the term ADB & Fastboot and how does it work. But still, one question remains that where we will be using these ADB & Fastboot commands. And so, we have a dedicated section below for the same. Let’s check out the usage of these commands.
What are ADB and Fastboot Commands?
ADB & Fastboot commands have different functions and effects on Android phones. Let’s first understand ADB Commands. These commands are used to communicate with devices like booting devices into different modes, installing & uninstalling Apps, and checking connectivity. Fastboot commands are used to add additional functionality or features to devices. These features include flashing various files like custom recovery, Magisk, and other image files. Fastboot commands work only when the device is in the specific bootloader state. Note:- To use ADB & Fastboot commands, you should connect the device to the computer. And also, drivers are required. So before using ADB & Fastboot commands, make sure to install ADB & Fastboot drivers on your computer. The driver may not be necessary for the Mac and Linux operating systems, so you can skip installing the driver. For Mac and Linux, you can use Platform tools. Important tools for ADB & Fastboot:
Install ADB & Fastboot Driver – (Windows)Platform Tools for Windows (v31.0.2)Platform Tools for Mac (v31.0.2)Platform Tools for Linux (v31.0.2)
Also, for using ADB commands, the USB debugging must be enabled on your phone. So let first check out the method to enable USB debugging.
How to Enable USB Debugging on Android Phones
Now you can easily use ADB commands. But for Fastboot Commands, first, you have to boot your phone into Bootloader mode/Fastboot mode. You can use the key combination to boot your phone into this state. The key combination can vary according to the device you are using. There is also a common method to boot any phone into Bootloader, which is possible using ADB Command that you will know in the below list of ADB Fastboot Commands.
ADB Commands for Windows, Mac, & Linux
adb devices – This is the basic adb command that used to list all the devices connected to the computer, and debugging is enabled. If you are entering the ADB command for the first time, then it will prompt to allow debugging on your phone. So you must allow it to use ADB commands to your phone.adb reboot – You can use this command to reboot your phone without using the power button. It can be used when any modification requires a reboot.adb reboot bootloader – As you know, to use fastboot commands, you have to boot your device into bootloader/fastboot/download mode. So this is the command that will boot your device into the Fastboot mode. After this adb command, you can use any fastboot command to modify your device.adb reboot recovery – With this command, you can boot your Android phone to the stock recovery or custom recovery. You can also boot your phone into recovery using key combinations, but that is more complicated as the combination varies as per devices.adb shell – The shell command will enable the Linux terminal interface on your command window to control your connected Android phone. It allows us to enter Linux commands to interact with the device.adb install
Fastboot Commands for Windows, Mac & Linux
fastboot reboot – To reboot your device back into the fastboot/bootloader mode. Remember fastboot command will only work if your phone is in Fastboot mode that can be achieved using adb reboot bootloader command.fastboot devices – This fastboot command will list the devices connected to the computer in fastboot mode.fastboot reboot recovery – Entering this fastboot command will boot into Stock or custom recovery. We generally use this command after flashing recovery image with fastboot command.fastboot oem unlock – The command used to unlock bootloader on Google phones and some other phones. It will only work with supported phones.fastboot flashing unlock – This one is also used to unlock bootloader but for different devices like the new Pixel phones released after 2015.fastboot flashing unlock_critical – It is also used to unlock bootloader for a different condition like updating bootloader, and updating phones manually.fastboot oem lock – Like unlock, you can also use the fastboot command to relock the bootloader of many Android phones.fastboot flashing lock – To relock bootloader of newer phones, this fastboot command can be used.fastboot flashing lock_critical – It can be used to relock bootloader if you have unlocked using the unlock_critical command.fastboot flash boot boot.img – You can use this fastboot command to flash boot image files. It is generally used when the phone is stuck in the boot loop due to a corrupt boot image. And also, the command used to root Android phones after patching the boot image file. Make sure to rename your boot file to boot.img.fastboot flash recovery recovery.img – If you want to flash stock recovery or a custom recovery, then this fastboot command is used. Before entering the command, rename the recovery image file to recovery.img.fastboot flashall -w – The fastboot command used to wipe the /data partition on the device.fastboot oem device-info – This fastboot command will help us to see the bootloader status. It will return ‘True’ if bootloader unlocked and return ‘False’ if bootloader locked.fastboot format:ext4 userdata – It can be used to delete/wipe all the data from the ext4 partition. Change the partition if you want to delete data from other partitions.fastboot boot recovery.img – You can use this fastboot command to boot the phone into recovery temporarily. Replace the recovery.img with the recovery file name.fastboot erase data – If you want to clean flash any ROM then you can use this fastboot command to erase phone data.fastboot erase system – To erase the system from your phone before flashing a custom ROM.fastboot erase cache – To delete all cache from the phone.fastboot erase system -w – This fastboot command will erase System, data, and cache in one command. So it is the combined command for the previous three commands.fastboot flash system system.img – You can flash the system image file using the command. The system image can be found in the Firmware of the phone.fastboot flash userdata data.img – Similar to the last fastboot command you can also flash user data image.fastboot boot kernel ramdisk – For developers who are working on the custom kernel can use the fastboot command to test the kernel.fastboot flash zip file.zip – It can be used to flash zip files like custom ROM. Replace the file.zip with the file name you want to flash.fastboot getvar mid – This fastboot command used to get the device model number.fastboot getvar all – It will give more information about the device like device model, radio, IMEI, etc.
Now you know adb & fastboot commands that you can use to modify and control your phone. As you know, these commands require adb & fastboot drivers. But if you don’t have the driver on your computer, then you can use the Platform-tools. Download the Platform tools from the links given above and follow the below guide to open a command window in the same location.
How to Open Command Prompt in Platform Tools
So there you have it, the complete list of ADB & Fastboot commands for Windows, Mac, & Linux operating systems. There are more ADB Fastboot commands recognized developers generally use for development and testing purposes. If you have any queries or any problems with the given ADB Fastboot commands, let us know in the comment section. Related Guides:
How to Install Windows 10X Emulator on Windows 10 PC [Definitive Guide]How to Get Windows 10X File Explorer on Windows 10 [Definitive Guide]15 Best Games Like Terraria for Different Platforms