Linux · Making things work · Open Source · Technology

How to work with tools like adb and fastboot on your android device (installations of Drivers and tools


What are ADB and Fastboot?

Both of these tools allow you to send terminal commands to your phone from your computer via USB. They are with different functions, but when you are using them, you probably want to install them together.

Android Debug Bridge (ADB):

ADB allows you to send an array of commands to your phone, which includes the shell commands on your phone. ADB also allows you to remotely install packages, get debut information, networking and scripting.

Fastboot:

fastboot is a small tool that comes with the Android SDK (software developer kit) that can be used to re-flash partitions on your device. It is an alternative to the recovery mode for doing installations and updates from your workstation. You use can it when you need to modify your phones firmware, install a new one, run bootloader commands. However fastboot needs to be enabled on your phone, not all phone comes with fastboot installed.

Before I introduce the steps, I will summarize a checklist, which will help you evaluate your progress in case you are having trouble the drivers or tools

Adb and fastboot checklist

  1. Install the adb and fastboot tools. These you need to run it from command line keeping them on your present working directory, you might use this path as a system binary path, in case you want to use this command all across the system. (Step A1)
  2. Enable debug option on your phone and turn on USB debugging (A1.1 )
  3. Open your device manager on your pc
  4. Connect your phone with your PC while it is on
  5. Monitor the “android ADB interface driver” auto installation or install drivers manually
    1. Check device manager for driver installation
    2. Use “adb devices” command to see if the device is communication properly on USB debug mode (A1.4)
    3. Incase step a or/ and b fails  find and install appropriate driver,(A1.3) and try these steps a and b until success. You might need to reboot between new driver installation to make it work
  6. Boot your phone into fastboot mode by running “adb.exe reboot-bootloader”. You may also boot your device into fastboot mode using key combination (specified by the hardware vendor)
  7. Monitor the “fastboot interface drivers” auto installation or install drivers manually
    1. Check device manager for driver installation
    2. Run “fastboot devices” to see if the device communicating with the PC with the fastboot interface. (B2)
    3. Incase step a or/and b fails  find and install appropriate driver, and try step a and b until (Incase fastboot is not persistent make sure appropriate driver is installed) (B2.1)

Hope these steps helps you getting appropriate access to your device

(A) Install ADB and Fastboot tools on windows

Frist of all you need to install adb and fastboot tools. These tools are primarily distributed by google as Android studio or Standalone SDK tools after installing these packagers you will find the adb tools in /platform-tools/ named adb.exe and fastboot.exe

Alternatively A simple installer could be for the XDA forum which is a “This is All-in-One installer for 3 most needed PC tools for Android. No need to download big SDK for 3 small things“. The installation steps are also provided on this site, which I followed.

To work with these tools, you need to change your present working directly to the /platform-tools/  folder or any other directory you have installed the adb/fastboot tools to.

(A1) Install android ADB interface driver:

Once the USB debugging is enabled the next step is to ensure that the right ADB drivers are installed

Before you start testing the tools you need perform the following steps

(A1.1) Prepare your phone for ADB (Enabling USB debugging on Andriod)

  1. Connect your android phone with the PC, preferably over a USB 2 port
  2. Enable Developed option and enable “usb debugging” on your android device if it is not already enabled. To do so (works on Android 4.2/Android 4.3/Android 4.4) use the following steps
    1. Go to Settings menu on your device.
    2. Go to About submenu. In some devices the About submenu will be under “More”/”General”
    3. Now scroll to “Build Number” and tap it 7 times.
    4. After tapping 7 times, you will see an alert saying “You are now a developer”/ ”Developer mode has been enabled”.
    5. Now if you go to your Settings menu, you will see the developer options submenu over there.
    6. Tap on the Developer options and then turn on USB Debugging.

**Once Connected to the usb port, it may ask you for additional confirmation to allow USB debugging with a following msg “The computer’s RSA key fingerprint is “***********************************************” always allow from this computer”. you can select always allow from this computer and tap ok.

(A1.2) Prepare your PC for ADB:

As soon as you enable the debug mode the PC will detect a new USB device (provided the drivers are not already installed) and shall try to install the drivers from windows update. If this happens automatically you are done.

(A1.3) If the ADB drivers are not installed properly

However if this process fails or the system as associated a wrong driver for your phones usb port on ADB mode, this can get a little complicated. It took me a few hours of searching to get the right driver for my Sony and OnePlus. Check device manager for any device with yellow with an explanation mark indicating incorrect driver. You need to find “android bootloader interface driver Device_Name_model”. You may start with google USB drivers for ADB or use the one comes with Android studio or Standalone SDK tools. Alternatively you may find other OEM USB drivers for adb in this link or.

For installing the drivers, you can use any of the following tutorials Manually installing Android or link this video tutorial Make sure you select “Android bootloder interface driver”. Your PC may need a reboot to get the drive working right.

(A2) Try out ADB command

To check if adb usb drivers are installed properly you can go to the command line, change our present working directory to the folder you have installed the adb tools in (if you did not do a system wide installation) and run the following command

C:\adb-tools\adb.exe devices

It will show start the adb server and show something like this

List of devices attached

YA910078AB      device

This means your adb driver is installed properly

Find the list of adb commands at adb-help

You might like also how to use adb and

(B) Working with Fastboot (Boot your mobile on fastboot mode)

even though you got your adb drivers running does not mean that your fastboot driver is installed right. To test it, you want put your mobile into the fastboot mode. Assuming you have already got your adb connectivity up and running using the previous steps you can try this command from command prompt

C:\adb-tools\adb.exe reboot-bootloader

For most device this command should automatically take your phone into fastboot mode

Alternatively you can try key combination such as pressing and power volume up button simultaneously. Please check with your hardware vendor for instruction. The simplest way would be to do a google search for “how to fastboot your device name

If your PC can’t detect the fastboot driver, your device might not stay in fastboot model or you will be unable to communicate with your device with “fastboot” tool.

(B2) Check if your mobile is on fastboot mode and drivers are installed

I suggest while you put your device on fastboot mode keep the “device manager” open and look for any driver issues (yellow Exclamation warning).

If you think your device is on fastboot and the drivers are installed (or even to check) run the following command

C:\ADB>fastboot devices

ABC10081KK&ZLP  fastboot

which means your mobile is in fastboot mode and you can pass fastboot commands to your mobile using your system tools

To exit fastboot mode try the following command

C:\ADB>fastboot.exe continue

resuming boot…

OKAY [  0.002s]

finished. total time: 0.003s

you may use key combination provided by hardware vendor to exit this fastboot mode

Now to work with fastboot tool you can start with this this help file.

(B2.1) Fatboot interface driver issues

After getting your device into fastboot mode, you may end up with wrong driver, in this case you will have no indication on the device manager, which will result in no response using the fastboot tool. e.g.

C:\ADB>fastboot.exe devices

Check device manager for any device with yellow with an explanation mark indicating incorrect driver.

either the case you need to manually install the derive driver for the fastboot interface. These drivers are usually named as “android bootloader inteface”, fastboot interface or something slimier. In my experience they could be named after the device vendor. The following steps could be an example of how to update your device driver for fastboot interface. You may find some of the fastboot driver in this link 

Now you are ready to play

Note to the user:

When I have been using multiple phones, I have faced issues with drivers when I plugged a different phones. In those cases, I had to update the drivers and point to the right driver to make it work. 

As times I also had enabled and disabled “USB debugging”  and “MTP” to make it work. To avoid frustration, Be sure to keep the “device manager” window open while working and use 

adb devices 

fastboot devices

and when needed restart the adb server

adb kill-server

adb start-server

Google searches such as the following was a great time saver.

“how to fastboot your_device_name”

“adb interface driver Device_name_Model”

“android bootloader interface driver Device_Name_model”

Thanks to  the author of all blogs and and forum posts I have reffed in my blog

Advertisement

2 thoughts on “How to work with tools like adb and fastboot on your android device (installations of Drivers and tools

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s