How to Use ADB and Fastboot on Android And Why You Should Use Them

By | January 14, 2022

Learn how to master ADB and Fastboot to make your Android experience even better! Here’s what you need to know.

If you’ve ever rooted your Android phone, you’ve almost certainly come across ADB and Fastboot. These utilities are an essential part of any rooting device, however they may be difficult to understand for beginners.

So if you’re wondering what ADB and Fastboot really are, need help setting them up, or want some ideas on what you can do with them, keep reading this article.

What is ADB and Fastboot

ADB and Fastboot are utilities that unlock access to the Android system when your phone is connected to a desktop computer via a USB cable. Computers and cables are an integral part of this, there’s no app version, and while you can use ADB wirelessly, it’s a lot more complicated to set up.

You usually use ADB while Android is running. This allows you to access system folders, or change hidden settings, which would otherwise be off limits to the user. You can copy system files to and from your device using ADB, and there’s also a sideload function that you can use to install system updates.

Fastboot works when Android is not running and the device is booted into “Fastboot mode” instead. It allows you to access all partitions of your device, not only Android system, but also data partition, boot partition and so on.

On Android, Fastboot is a diagnostic tool. This is essential if you need to disconnect your phone, and is most often used to install custom recoveries.

Both are part of the Platform Tools collection of Android software development tools.

Both tools run via Command Prompt on Windows, or Terminal on Mac and Linux. This means they are not very user friendly, although they are quite easy to understand.

How to Set Up ADB and Fastboot

First, you need to prepare your phone to use the tool. If you haven’t already, enable Developer Options by going to Settings> About phone or Settings > About phone and knock Build number seven times.

Then, in Settings> Developer options, check the box next to USB debugging and browse for the dialog box that follows.

Download ADB and Fastboot from the Android Developers website. When you extract the download, its contents will be collected together into a folder called platform-tools. There are several other items in the folder, but you can ignore them.
If you are using Windows, you will also need to download drivers for your device. There is a list of links for the most popular manufacturers in android developer website. Drivers are not required on Mac or Linux.

Using Command Prompt Or Terminal

Open the Command Prompt or Terminal application. You have to navigate to the folder platform-tools to use ADB and fastboot.

Do this using the command CD : insert CD [path to platform-tools]. An easier way is to type CD[space] then drag the folder platform-tools into the Command Prompt window, it will autofill the path for you.

Even easier, in Windows you can hold shift while right-clicking a folder platform-tools, then select Open Command Prompt Here.

Difference Between Windows And Mac / Linux

There is one small but important difference between using Windows and Mac or Linux. In the last two commands, each ADB and Fastboot command must be preceded by a sign slashed dots.

So where do you type adb in Windows, you have to type ./adb on Mac and Linux. And fastboot on Windows must ./fastboot on Mac and Linux.

How to Use ADB

Boot your phone into Android, then connect it to your desktop computer with a USB cable. On your computer, launch Command Prompt and change the directory to point to the folder platform-tools.

Type adb devices and press Enter. You should now see a list of installed devices, with serial numbers. This shows that it worked.

That’s all there is to it: type adb followed by the command you want to run. For another simple example, enter adb reboot to restart your phone.

How to Use Fastboot

Fastboot works the same way as ADB, except you need to boot your phone into Fastboot mode instead of Android. You usually do this by holding down the power and volume button combination while turning on the phone.

Or, use ADB and type adb reboot bootloader.

After that it’s the same. insert fastboot devices to check if your phone is recognized. Entered into fast boot reboot to relaunch Android.

Things You Can Do With ADB and Fastboot

Now that you know how to use ADB and Fastboot, what can you do with them? Here are some tools to try:

  • adb pull [path to file] [path to folder] It copies files stored anywhere on your phone, and saves them to a specific folder on your computer.
  • adb push [path to file] [path to folder] The opposite of pulls; send files from desktop to your phone.
  • adb install [path to file] Install the APK application on your phone. It is mostly used for app developers.
  • adb uninstall [package name] Uninstall the application. You should enter the full package name usually along the lines of com.devname.appname instead of the generic application name.
  • adb shell wm density [dpi] Change the pixel density of your screen. Lower numbers fit more content onto the screen, while higher numbers will fit less. For example, older devices like the OnePlus 3 have a native DPI of 480. Setting it to 400 makes text, icons, and everything else smaller.
  • adb sideload [path to] Sideload the firmware update This one goes through a custom recovery on your phone. Useful if you can’t wait for updates to be pushed to your device.
  • fastboot oem unlock or fastboot flash unlock Which command you should use depends on the version of Android you are running. From Android 6 onwards you also need to enable OEM unlocking in Developer Options. Unlocking the bootloader in this way will wipe your phone completely.
  • fast boot flash recovery [filename.img] Install a custom recovery, such as TWRP, on your device. For ease of use, we recommend renaming the recovery file to something easy twrp.img, for example and move it to a folder platform-tools.
  • fastboot -w Wiping your phone completely in preparation for flashing a custom ROM.
  • fastboot updates [path to] Flash custom ROMs. Useful option if you haven’t rooted your phone yet.

Why You Should Learn ADB and Fastboot

Obviously, the above commands are just for basic guidance. Maybe not everything works on all devices. You should only use them if you understand what they will do and how to undo any changes they make.

ADB and Fastboot are essential parts of Android rooting and modding games. Learning how to use them is important and will help you use more advanced mods.

As we mentioned, to use ADB and Fastboot, you need to enable Developer Options first. Once you’ve done that, a number of other useful settings are available to you. For more details on what developer options are see our article Developer Options Tips You Need to Know on Android.