Useful ADB and Fastboot Commands and How To Use Them
Useful ADB and Fastboot Commands and How To Use Them
ADB an official tool by Google – you must have heard of it if you have ever come across
Android development or flashing processes. Stands for Android Debug Bridge basically
and helps you to establish a connection and communicate between your phone and your
computer. ADB has a command-line interface, which helps the
developers/programmers/users to enter commands and do the stuff they want. ADB also
plays an important role when you don’t have access to certain things on your phone, you
can simply handle the problem through the command window.
Earlier we posted a guide on “How to Install and Use Android ADB & Fastboot” but
missed the important ADB commands that may become handy in some cases, and found
necessary to cover them now. In case you’re wondering about Fastboot, it’s a component
of ADB that helps you to flash files or make tweaks by accessing Fastboot mode on your
device. Well, let’s get back to the topic. In the following post, I’ve listed the useful ADB
commands, and also explained their use.
https://techbeasts.com/useful-adb-and-fastboot-commands-and-how-to-them/ 1/7
2/26/2020 Useful ADB and Fastboot Commands and How to Use them
You may want to install Android ADB and Fastboot, and also learn how to use the
program actually please go through this guide:
Commands Use
adb reboot download Reboots the connected device into download mode
E.G Download mode on Samsung Galaxy devices.
https://techbeasts.com/useful-adb-and-fastboot-commands-and-how-to-them/ 2/7
2/26/2020 Useful ADB and Fastboot Commands and How to Use them
Commands Use
adb install .apk ADB install let's you install APK files directly to you
phone. To use this command type adb install
application path, as shown in the commands part
and hit enter key and it will start installing the app
on your phone. e.g adb install
C:/Users/UsamaM/Desktop/CandyCrushSaga.apk.
process succeeds it will show you "Success" in the
command window.
adb install -r .apk If you have already installed an app, and you just
want to update it then this command will let you do
so. e.g adb install -r
C:/Users/UsamaM/Desktop/CandyCrushSaga.apk
adb unistall package_namee.g Uninstalls and application from your device. The
easiest way to find a package name is, install
adb uninstall com.android.chrome Package Name Viewer from the play store and find
the name of the package under the App Name. If
process succeeds it will show you "Success" in the
command window.
adb uninstall -K package_namee.g Uninstall an app but keeps it's data and cache
directories. If process succeeds it will show you
adb uninstall -K com.android.chrome "Success" in the command window.
adb rootadb push >e.gadb push the adb push commands you transfer any files to
c:\users\UsamaM\desktop\Song.mp3 your phone from your PC. You simply need to
\system\media provide the path of file on your PC and path where
to place this file on your phone.
adb push
filepathonPC/filename.extension
path.on.phone.toplace.the.file
https://techbeasts.com/useful-adb-and-fastboot-commands-and-how-to-them/ 3/7
2/26/2020 Useful ADB and Fastboot Commands and How to Use them
Commands Use
adb rootadb pull>e.gadb pull Similar to the adb push command. Using adb pull,
\system\media\Song.mp you can simply pull any files from your phone.
C:\users\UsamaM\desktop
Before doing this, in your adb folder create a folder Backup and under the backup folder
create two folders named SystemApps and InstalledApps.
These folders are necessary as you'll be pushing the backed up apps to these folders.
adb pull /system/app backs up all the system apps of your phone to the
backup/systemapps Systemapps folder that you created in the ADB
folder.
adb pull /system/app backs up all the installed apps of your phone to th
backup/installedapps installed apps folder that you created in the ADB
folder.
Background Terminal
adb shell e.g adb shell su switches to the root of your phone. Please make
sure that you're rooted in case you wish to use adb
shell su.
Fastboot commands
To flash files using fastboot, place the desired files in Fastboot folder or Platform-tools
folder that you obtained after installation of Android SDK tools.
Fastboot Flash File.zip Flashes a .zip file to your phone, when your phone
is connected in Fastboot mode.
https://techbeasts.com/useful-adb-and-fastboot-commands-and-how-to-them/ 4/7
2/26/2020 Useful ADB and Fastboot Commands and How to Use them
Commands Use
Fastboot flash boot bootname.img Flashes a boot or kernel image when your phone is
connected in Fastboot mode.
fastboot flash system system.img These commands will restore the backup that you
made using a custom recovery on your phone and
fastboot flash data data.img placed in the Fastboot folder under Android SDK
tools.
fastboot flash cache cache.img
fastboot oem get_identifier_token These commands help you to get the identifier
token of your phone that can be used for unlocking
fastboot oem flash Unlock_code.bin the bootloader. The second command helps you to
flash the bootloader unlock code, and the 3rd
fastboot oem lock commands help you to lock your phone's bootloade
once again if locking it is actually allowed.
Logcat
adb logcat Shows you the real-time logs of your phone, these
logs represent the ongoing process on your device
It is recommended that you run this command
while your device boots up to check what's going
on.
https://techbeasts.com/useful-adb-and-fastboot-commands-and-how-to-them/ 5/7
2/26/2020 Useful ADB and Fastboot Commands and How to Use them
Commands Use
adb logcat > logcat.txt Creates a .txt file containing the logs in the
Platform-tools folder or Fastboot folder in Android
SDK tools directory.
Here is a complete list of all the important and useful ADB & Fastboot Commands.
That’s all for now. We may be missing a lot of commands, those may be added later. In
case you got any suggestions, queries or face any difficulties, please feel free to stop by
the comment box below and drop your words. We will get back to you as quick as we
can. Thanks All!
Usama M
Usama M, a software engineer by profession, is the founder and editor-in-chief at Techbeasts. At
Techbeasts, he uses his expertise to craft solutions to solve everyday consumer tech problems. His main
areas of interest are Android, iOS, and Windows. You can find him on YouTube at "Tech with Usama".
https://techbeasts.com/useful-adb-and-fastboot-commands-and-how-to-them/ 6/7
2/26/2020 Useful ADB and Fastboot Commands and How to Use them
https://techbeasts.com/useful-adb-and-fastboot-commands-and-how-to-them/ 7/7