ADB Fastboot Tool with Useful Commands

ADB Fastboot Tool has valuable commands for Android device development & flashing. ADB Fastboot Tool is a tool developed by Google, that facilitates connection between phone and computer, to send commands via a command-line interface. It provides a versatile and powerful tool to fix device-related issues.

ADB Fastboot Tool

This post covers essential commands and their usage, including Fastboot for flashing files and applying modifications. It is an update to a previous guide on “How to Install and Use Android ADB & Fastboot“.

If you’re interested in utilizing Android ADB Fastboot Tool, and learning to operate the program, we recommend referring to this informative guide:

Guide on Installing Android ADB & Fastboot Drivers on a Windows PC.

Handy Commands for ADB Fastboot Tool

Commands Use
Basic ADB Commands
adb devices Presents a roster of devices that are connected to the computer.
adb reboot Restarts a peripheral that is linked to the computer.
adb reboot recovery Initiates a restart of a peripheral and directs it to enter recovery mode.
adb reboot download Restarts the device that is connected to the computer and instructs it to enter download mode, for instance, Samsung Galaxy devices.
adb reboot bootloader Directs the device to enter the Bootloader mode after a restart. In this mode, you can make additional selections.
adb reboot fastboot Initiates a restart of a linked device and directs it to enter Fastboot mode.
You can add, remove or upgrade applications using ADB.
adb install .apk Using the “adb install” command, APK files can be installed on the phone by executing the command and hitting enter. If successful, the window displays “Success”.
adb install -r .apk To upgrade an installed app, use the “adb install -r” command followed by the path of the app, such as “C:/Users/UsamaM/Desktop/CandyCrushSaga.apk” for updating it.
adb uninstall package_namee.g adb uninstall com.android.chrome Removes an application from your device. To locate the package name, you can simply download a Package Name Viewer from the Play Store and locate it under the App Name. If the process is successful, the command window will display “Success.”
adb uninstall -K package_namee.g adb uninstall -K com.android.chrome Removes an app while preserving its data and cache directories. If the process is successful, the command window will display “Success.”
Transferring files by pushing and pulling.
adb rootadb push >e.gadb push c:\users\UsamaM\desktop\Song.mp3 \system\media adb push filepathonPC/filename.extension path.on.phone.toplace.the.file Using the adb push command, you can transfer files from your PC to your phone. All you need to do is specify the file’s path on your PC and its destination path on the phone.
adb rootadb pull>e.gadb  pull \system\media\Song.mp C:\users\UsamaM\desktop adb pull [Path of file on phone]  [Path on PC where to place the file] In the same way as the adb push command, you can use adb pull to conveniently retrieve files from your phone.
To backup installed apps and the entire system, create a Backup folder in the ADB directory and add two folders named SystemApps and InstalledApps for pushing the backed-up apps.
adb pull /system/app backup/systemapps Creates a backup of every system app installed on your phone and stores them in the Systemapps folder you created inside the ADB directory.
 adb pull /system/app backup/installedapps Takes a backup of all apps that you have installed on your phone and saves them in the InstalledApps folder you created inside the ADB directory.
Terminal running in the background.
 adb shell Initiates the background terminal.
exit Terminates the background terminal.
adb shell e.g. adb shell su Changes to the root directory of your phone. It’s important to confirm that your device is rooted before attempting to use adb shell su.
To use Fastboot commands for flashing files, ensure the relevant files are placed in either the Fastboot or Platform-tools folder, accessible after installing Android SDK tools.
Fastboot Flash File.zip When your phone is in fastboot mode, it’s possible to flash a .zip file to your device.
Fastboot Flash recovery recoveryname.img When your phone is connected in Fastboot mode, it’s feasible to flash a recovery to it.
Fastboot flash boot bootname.img In Fastboot mode, it’s possible to flash a boot or kernel image to your phone.
Fastboot getvar cid Displays the CID of your phone.
Fastboot oem writeCID xxxxx Sets the super CID.
fastboot erase system fastboot erase data fastboot erase cache To restore a nandroid backup, delete the phone’s existing system/data/cache first and create a backup using the custom recovery backup option. Copy the .img files to either Fastboot or Platform-tools folder in Android SDK. These commands will erase all data so be cautious.
fastboot flash system.img fastboot flash data.img fastboot flash cache.img The following commands enable you to restore a backup that you previously created on your phone using a custom recovery and saved in the Fastboot directory within the Android SDK tools.
fastboot oem get_identifier_token fastboot oem flash Unlock_code.bin fastboot oem lock Commands to acquire bootloader identifier token, flash unlock code and lock the bootloader again if permitted.
Logging system information on Android using Logcat.
adb logcat This command displays real-time logs of your phone, showing current processes occurring on the device, useful to assess activities during startup.
adb logcat > logcat.txt Generates a .txt file that includes the logs in either the Platform-tools or Fastboot folder in the Android SDK tools directory.

A comprehensive list of essential ADB Fastboot Tool commands is provided below. Additional commands may be added in the future and any suggestions or questions can be shared in the comment box below. They will be responded to as quickly as possible.

Feel free to ask questions concerning this post by writing in the comment section below.

About The Author

Reply

error: Content is protected !!