20 Useful ADB and Fastboot Commands for Android and Windows | MATAMILTECH

ADB AND FASTBOOT COMMANDS FOR ANDROID - WINDOWS

ADB (Android Debug Bridge) and Fastboot are command mode communication tool between PC and Android Device. You can do things like modify Android system, unlock bootloader, reflash image / partition, recover the Android device, update the device, install third party ROMs, etc., on your Android Device using this ADB & Fastboot from your PC.

To work with ADB and Fastboot, you should properly install ADB and Fastboot drivers on your PC. Also enable the USB Debugging Mode in the Android Device and connect it to the PC using original USB Cable.

And, here you can find some most using ADB and Fastboot commands that you should know to do the above said things. Number of users are using ADB & FASTBOOT for backup the Android device, install the TWRP recovery, Flash ROMs and some other uses.

 

Fastboot commands may brick your device.

Make sure you know what you are doing!

 


Useful ADB Commands:

 1. To check the connected Android Smartphone, type the following Command:

adb devices

 

2. To restart your Android device, type the following Command:

adb reboot

 

3. To boot your Android Smartphone recovery mode, type the following Command:

adb reboot recovery

 

4. To boot your Android Smartphone into fastboot / download mode, type the following Command:

adb reboot bootloader



5. To backup your Android Smartphone, type the following Command:

adb backup -all or -shared or -apk or -system [Directory on the Computer]

 *Type any one you want to backup (ex. adb backup -all C:\backup.ab)


6. To restore the backup to your Android Smartphone, type the following Command:

adb restore [Directory on the Computer]

* Note that there is a WARNING that “adb backup is deprecated and may be removed in a future release”.

 

7. To show your Android Smartphone’s real time log, type the following Command:

adb logcat

 

8. To install zip file using sideload when your device is in recovery mode, type the following Command:

adb sideload filename.zip


Useful Fastboot Commands:

 1. To check the connected Android Smartphone, type the following Command:

fastboot devices

 

2. To check the Bootloader unlock status, type the following Command:

fastboot oem device-info

* “true” means the Android device’s Bootloader is in unlocked status.

  “false” means the Bootloader is in locked status.

 

3. To know the Antiroll back version of the Android device, type the following Command:

fastboot getvar anti

 

4. To unlock the bootloader of the Android device, type the following Command:

fastboot oem unlock

or

fastboot flashing unlock

* most of the Android Smartphone manufacturers having their own method to unlock their devices. If applicable then follow their instructions and method.

 

5. To relock the bootloader of the Android device, type the following Command:

fastboot oem lock

or

fastboot flashing lock

 

6. To boot into TWRP or any Custom Recovery on Android device (download the device specific recovery image & open the PowerShell window on the folder which contains recovery image), type the following Command:

fastboot boot recovery.img

* recovery.img - change it to your custom recovery file name (ex. - twrp.img)

* This command only boots the device with custom recovery and not installing it. When you reboot your Android Smartphone, the custom recovery will be overwritten by previous recovery.

 

7. To flash the TWRP or any Custom Recovery permanently on the Android device (download the specific recovery image & open the PowerShell window on the folder which contains recovery image), type the following Command:

fastboot flash recovery recovery.img

* This command installs the custom recovery and sometimes the stock recovery will be overwritten when you reboot your device. To avoid this, it is recemented after installing custom recovery by using the above command and boot the device into recovery mode by using the following command.

fastboot reboot recovery

 

8. To flash the KERNEL on the Android device (download the specific kernel boot image & open the PowerShell window on the folder which contains recovery image), type the following Command:

fastboot flash boot bootimage.img

 * bootimage.img - change it to your boot image file name


9. To wipe your Android device, type the following Command:

fastboot -w

 

10. To update the Android device with some xyz.zip file (open the PowerShell window on the folder which contains update zip file), type the following Command:

fastboot update xyz.zip

 

11. To format data partition in your Android device, type the following Command:

fastboot format:ext4 userdata

*This will erase your data 

 

12. To restart the Android device, type the following fastboot Command:

fastboot reboot

 

Post a Comment

0 Comments