Android Debug Bridge (ADB) and Fastboot are two important utilities that one must know about, and these are a significant part of a rooting toolkit. Most people find it difficult to understand and differentiate between the two utilities. Both the utilities resolve a different issue but are combinedly used to unlock access to the Android system when a smartphone is connected to a PC via USB cable.

The Android Debug Bridge (ADB) is a versatile command-line tool that works when an Android is running, and it lets you create communication with a device. It also facilitates a variety of device actions. One can use it for installing and debugging apps, tweak hidden settings, access system folders, etc. It will help you with multiple purposes. In contrast, Fastboot works when the Android is not working, and the device gets booted into Fastboot mode. It lets you reflash system partitions on your Android device. These two utilities are a significant part of an Android software development kit’s Platform Tools collection. You can use these via Command Prompt (on Windows) or Terminal (on Mac and Linux).

Now that you have learned the basics, here is how you can set up the ADB and Fastboot utility:

  1. Start by setting up your phone by going to the Settings app.
  2. Then, click on About Phone and tap on the Build Number seven times to enable the Developers Options.
  3. In the Settings page, checkmark the box for USB debugging and check the following dialogue box.

Then, you can download the ADB and Fastboot from the Android Developer website. While unzipping the downloads, all the data will get collected inside Platform tools. Windows users will also have to download the drivers from the Android Developer website. You can then use the Command Prompt or Terminal, depending on the device you use. Here is what to do:

  1. Open the Command Prompt or Terminal app on your device.
  2. Now, go to the platform-tools folder for using the ADB and Fastboot utility.
  3. Type the following command and hit the Enter key:

cd [path to platform-tools]

  • If you are using Windows, you can hold the Shift key while right-clicking the platform-tools folder. Then, click on ‘Open Command Prompt Here.’

Note that the commands for Windows and Mac or Linux are different. So, Windows users will write ‘adb,’ and Mac or Linux users have to write ‘./adb’ for every ADB command. For Fastboot commands, write ‘fastboot’ on Windows and ‘./fastboot’ on Mac or Linux. Below, we will mention the steps for Windows, which you can tweak according to your system.

Following are the steps for using ADB:

  1. Start by booting your phone into Android and connecting it to your PC with a USB cable.
  2. On PC, open Command Prompt and change the directory to the platform-tools folder.
  3. Enter the following command and hit the Enter key:
  4. adb devices
  5. You will find a list of attached devices with a serial number.
  6. Now, type ‘adb’ followed by the command you want to execute.

If you are going to use Fastboot, know that it works the same way as ADB. The only difference is that you have to boot your phone into Fastboot mode instead of Android. To do so, press and hold power and volume keys together when turning on the phone.

When to Use ADB and Fastboot?

Now that you have learned to use ADB and Fastboot, you must know about the tools you can use with these two utilities. Here are a few examples of what you can try:

  1. Use ‘adb pull [path to file] [path to folder]’ for copying the files stored on your phone, and save them into a specified folder on your PC.
  2. Using the ‘adb push [path to file] [path to folder]’ command, you can send files from your desktop to your phone.
  3. With ‘adb install [path to file],’ you can install an APK app on your phone.
  4. You can even tweak your display’s pixel density using the ‘adb shell wm density [dpi]’ command. Note that using a lower number will make space for more content to fit onto the screen, and a higher number will consume space and hold less content.
  5. Use ‘fastboot -w’ to entirely wipe your phone and prepare it for flashing a custom ROM.
  6. Using the ‘fastboot update [path to]’ command will flash a custom ROM.

This was everything you needed to know about the ADB and Fastboot utility tools. Note that the commands mentioned above will offer you essential guidance, which you can tweak as per your preference. You have to be careful while using the commands with ADB and Fastboot, so take your time to understand them and try when you are sure about it.

Source: How to Use ADB And Fastboot on Android