Starting out with the custom development scene and don’t know many useful ADB Fastboot commands? Don’t worry, this simple guide will help you out. In this guide, you will get to know a list of useful ADB Fastboot commands.
Android has long been seen as the counterpart of the Linux operating system and it uses shell commands running on the core compared to the all user-friendly tap UI. Knowing the right commands can help you deal with various issues.
Android Debug Bridge or ADB is the most effective way to control your Android smartphone using your PC and carrying out tasks like transferring files to running scripts. Moreover, it is the only way of interacting with your device in case something is broken or messed up with the software. This is why it is important that you know your way with ADB Fastboot commands.
You can’t interact with your device if you don’t have the appropriate methods to interface with them. That’s where the ADB drivers come into play. You can get them for Windows, Linux, and Mac. Often, your phone’s manufacturer will provide them at their site. If not, grab it from the web!
Official Update > Download Latest ADB and Fastboot SDK Platform-Tools
Next thing is, you must’ve USB debugging turned on for the ADB to work properly. If you’ve wondered what that was for? This is the answer. ADB.
Now that we’ve got everything required, fire up the adb utility you downloaded and connect your phone to the PC and let’s start!
Other Important Fastboot Related Guides:
- Quickest Way To Install Android ADB and Fastboot (with drivers) on Windows
- How to Install ADB and Fastboot on Mac or Linux
- How to Install TWRP Recovery via Fastboot On Any Android Device
Most common ADB & FastBoot Commands for Android
adb [-d|-e|-s <serialNumber>] <command>
The syntax is the format you should follow when giving instruction, for the system to recognize it.
The -d, -e and -s are parameters that specify the device to which the adb shell should tunnel the commands to.
-d –(direct) Specifies that the device is connected to USB. Can return an error if more than one is connected.
-e — Specifies that an emulator is running and adb should communicate with the emulator.
-s<serialnumber> —When there are multiple devices, commands are directed to each individual by using their adb serial number.
Most Used adb fastboot commands for Android 2024
- adb devices – Shows all the devices adb can run on
- adb help – Displays the Help Documentation on ADB commands.
- adb install <path_to_apk> – Installs the apk file at the specified location.
- adb pull <device> <local> – Copies a file from the device to your system.
- adb push <local> <device> – Copies a file from your system to the device.
- adb logcat – Displays the log data onto the screen.
- adb bugreport – Displays the dumpsys, dumpstate and logcat data on the screen.
- adb jdwp – Lists the JDWP processes on the device.
- adb get-serialno – Prints the adb instance serial number string with the devices.
- adb get-state – Shows the status of the device.
- adb wait-for-device – It’s a command used to program delay before next command is issued. Generally, it executes when the device is online but it can be programmed to wait till another process is done. Like, installing an apk.
- adb start-server – It starts the adb server process.
- adb kill-server – It stops the adb server process.
- adb shell – It starts the remote shell command console in the device and lets you control the device through it.
- adb shell [shellcommand] – It’s used for an instance alone in case a particular command alone is required. After the execution, the shell terminates itself.
- forward <local> <device> – Forwards the socket connections from system ports to device. It can be used with various operations such as tcp and jdwp.
- ppp <tty> [parmeters] – These allow PPP over USB connection. They are serial line tunneling services. If you don’t know what they do, don’t mess around!
ADB & FastBoot Commands for Android:
There are ways you can turn your phone on and off without even touching the power button. And that’s the power of ADB. Flashboot is another tool that can be used to do a lot of critical operations just from the command console. You can launch the flashboot as an application or from the adb program shell itself.
- adb reboot-bootloader – This command can take you directly to the bootloader, which otherwise would’ve have driven to the edge with cumbersome key combinations and stuffs.
- adb reboot-recovery – This command like the previous one, can save you a lot of time to get into recovery mode quickly. Instead of the dreadful trial and error methods of hardware keys.
- adb fastboot – The enables the fast boot mode of your android device. You can notice how soon the phone fires up all ready for you to use with this command. It’s also a great way to flash custom updates, recovery and kernels.
- fastboot flash <xxxxx>.zip – It can flash a .zip file when in fastboot mode.
- fastboot flash recovery <xxxx.img> – It flashes a recovery image.
- fastboot flash boot <xxxx.img> – Flashes a kernel image.
- fastboot getvar cid – Displays CID of the device.
- fastboot erase system/data/cache – It wipes your system, data and cache. But beware that unless you have a backup for the system or you’ll flash a new one, your phone is as good as a brick.
- fastboot flash system/data/cache [system/cache/data .img] – It can flash images of system, data and cache to the device.
- fastboot oem get_identifier_token – Generates the device identification token.
- fastboot oem flash Unlock_code.bin – Unlocks the bootloader.
- fastboot oem lock – Locks the bootloader.
We hope this guide helped you find out the list of useful ADB Fastboot commands. If you have any questions or suggestions, feel free to mention them in the comments section.