How To Set Up ADB/USB Drivers & Fastboot for Android Devices (Updated 09/23/15)(Video)

So most people won’t have to use ADB (Android Debug Bridge) ever, but if you want to learn how or want to get a little more technical with your Android phone, here’s how to get it set up.

What is ADB & Fastboot?

ADB is generally used for development when trying to run applications on the phone from the computer so you can debug (hence the name) issues with your app you are creating. Let’s be real though, most of the time, it’s used for rooting Android devices.

Since ADB allows you to communicate with an attached Android phone on a development level it’s extremely handy when we want to issue commands that allow us to, for example, push files to the device and then execute those files all in an effort to root the phone.

Fastboot is similar to ADB in that it’s used for issuing commands to the attached device, but in fastboot mode it’s really more for flashing different parts of Android (i.e. updating the system with a newer version, erasing all the user data, etc.). This mode is more used for manufacturers to diagnose and fix devices with software issues, but, like with ADB, it can also be pretty instrumental in helping our rooting efforts.

We can use fastboot to flash a new recovery image that then allows us to then gain root access that way.

Long story short, when trying to root your Android device, both ADB and Fastboot are tools you’ll probably need to have all setup.

Because ADB and Fastboot are meant really for developers, they aren’t the most intuitive when it comes to setting them up. Because of this, I’m going to layout the easiest ways to get both working on the two most popular operating systems that you guys might have: Windows and Mac (sorry, Linux).

How to Setup ADB/Fastboot on Windows

I. Download and Install ADB & Fastboot

So, back in the day, you would need to download the entire Android SDK to get ADB and Fastboot to work, but thanks to some clever developers out there, you can get away with just downloading minimal versions that only setup ADB and Fastboot and leave the rest of the SDK out, for, you know, real developers.

1. Head to this developer’s page on XDA and download the 15 Second ADB Installer (download link in the first post, download whichever one he says is stable).

ADB Fastboot Installer for Windows

2. Right click the exe that downloads and select Run As Administrator.

3. When it opens, hit y and enter for each of the questions as it guides you through. (This will install ADB system wide so any user of the computer can access it and also install the drivers, which is a huge help as it can be the hardest part of all this to get to work).

4. When it’s all done, restart the computer to ensure they were installed.

5. On your phone, go to Settings > About Phone and continually tap on Build Number until it tells you you are a developer.

6. Hit Back.

7. Go to Developer Options and turn on USB Debugging.

8. Plug your device in via USB cable and wait for it to install drivers.

9. Now, on the PC, Open File Explorer and head to C: then adb and hold shift on your keyboard and right-click in a blank spot anywhere inside the folder (inside that folder you should see adb and fastboot along with a couple other files) and select Open Command Window Here.

10. Type the following into the command prompt window (hitting enter at the end of every line):

adb devices

11. If it’s a newer Android phone, a popup asking to allow the RSA keys will show up. Check Always Allow and accept it.

After that, you should see a serial number pop up, it’s the serial number of your phone. This means you are all set!

If you do not see a serial number, then we need to reinstall the drivers manually in Section II below.

II. Troubleshooting Driver Issues

Sometimes the drivers don’t install correctly and need a little coaxing to get them to work properly. Here’s common ways to do that.

Manually Tell Windows About the Drivers

1. On your computer, use the search feature (either using the search charm on Windows 8 or the search bar at the bottom of the screen in Windows 10) and search for Device Manager and then open it.

2. In the device manager. you should see an exclamation point on an item (this indicates that the drivers didn’t install for that item). Right-click that item and select Update Driver Software

3. Then select “Browse My Computer…”

4. Then select “Let Me Pick from a List…”

5. Select Android Device > Android ADB Device.

Now, unplug and plug the device back in and run the adb devices command from step 13 above and see if you get a serial number this time. If so, you are all set.

How to Setup ADB/Fastboot on Mac

ADB and Fastboot can also be installed on a Mac relatively easily thanks to another clever developer. Here’s how.

I. Download and Install ADB & Fastboot for Mac

1. Download the developer’s script from my Google Drive and save it to your desktop.

ADB & Fastboot Installer for Mac

2. Extract the newly downloaded zip file to your desktop so it creates a new folder called Android on your desktop.

3. Hit Cmd + Space bar to bring up Spotlight Search and search for Terminal and open it.

4. In Terminal, type the following with hitting enter at the end of each line:

cd Desktop/Android

./ADB-Install-Mac.sh

5. That should run the script so everything is installed and you can issue ABD/Fastboot commands from anywhere in Terminal. Let’s test it out, though.

6. On your phone, go to Settings > About Phone and continually tap on Build Number until it tells you you are a developer.

7. Hit Back.

8. Go to Developer Options and turn on USB Debugging.

9. Plug your device in via USB cable.

10. Type the following into the command prompt window (hitting enter at the end of every line):

cd Desktop/Android/Mac

./adb devices

11. If it’s a newer Android phone, a popup asking to allow the RSA keys will show up. Check Always Allow and accept it.

After that, you should see a serial number pop up, it’s the serial number of your phone. This means you are all set!

Some Common ADB/Fastboot Commands

ADB Commands

*For Mac users, simply add a ./ in front of the commands to get them to work.

adb devices – lists which devices are currently attached to your computer
adb install <packagename.apk> – lets you install an Android application on your phone
adb remount – Remounts your system in write mode – this lets you alter system files on your phone using ADB
adb push <localfile> <location on your phone> – lets you upload files to your phones filesystem
adb pull <location on your phone> <localfile> – lets you download files off your phones filesystem
adb logcat – starts dumping debugging information from your handset to the console – useful for debugging your apps
adb shell <command> – drops you into a basic linux command shell on your phone with no parameters, or lets you run commands directly

adb devices – lists which devices are currently attached to your computer

adb install <packagename.apk> – lets you install an Android application on your phone

adb remount – Remounts your system in write mode – this lets you alter system files on your phone using ADB

adb push <localfile> <location on your phone> – lets you upload files to your phones filesystem

adb pull <location on your phone> <localfile> – lets you download files off your phones filesystem

adb logcat – starts dumping debugging information from your handset to the console – useful for debugging your apps

adb shell <command> – drops you into a basic linux command shell on your phone with no parameters, or lets you run commands directly

Fastboot Commands

fastboot devices – lists which devices in fastboot mode are currently attached to your computer

fastboot boot <filename> – boots a rom stored on your pc specified by the filename

fastboot flash <partition> <filename> – flashes a rom stored on your PC, partition can be one of {boot, recovery, system, userdata}

fastboot update zip <zip filename> – updates the phone with a ROM stored on the PC.

Let me know if this worked for you in the comments below!

Related Items: , , ,

Nerd Out with Us!

Join over 30,000 others and subscribe to my occasional, not annoying, newsletter!

* indicates required
Interests
  • Paul

    i’m on a mac, and i cant do the command prompt thing
    help???

    • http://theunlockr.com TheUnlockr

      Paul,

      Use Terminal. Same thing.

  • Pingback: How To: Root Your Phone From Stock FRF91 - Page 2 - Nexus One Forum - Google Phone Forum()

  • drew

    I have all usb drives but i keep getting sgh-t939 not the serial number what am i doing wrong?

  • Kris

    I cant set up ADB fully. a box that says ”refresh sources” pops out and in the txt box it says ”Failed to fetch URL https://dl-ssl.google.com/android/repository/repository.xml, reason: HTTPS SSL error. You might want to force download through HTTP in the settings.” I have windows 7 and my phone is an HTC Legend PLEASE HELP!!!!

    • AF

      Hi, same problem as Kris…………..

    • Joshua Servin

      After the message comes up where it says it failed to fetch URL, close the window and then cancel on the next window. And now on the left, click settings. On the bottom, under “Misc” check the box that says “Force https://…”. Close the program and reboot. Hope it helps 😀

  • Muckway

    Ok, So I thought I had done this install the ADB correctly. When I ran the cmd menu and the Serial number is suppoed to show up it came up the t939 and I thought I was set. Now no matter where I plug it in it cannot read the device. on top of that it fails to install the driver (manually or automatically) even if I run SDK setup.. Help? I can no longer access my phone at all unless I take out my memory card and plug it in seperate..

  • Pingback: How to root your Samsung Vibrant or Captivate | The Android Site()

  • Pingback: Planet Android » Blog Archive » How to root your Samsung Vibrant or Captivate()

  • Pingback: How-To: Make a Goldcard and Root a HTC Desire | r3dux.org()

  • Raf

    I can’t install the drivers for my HTC.
    It is a HTC Desire, and when I plug it in it says i reqiure a disc which should have come with my phone. but no disc came with it, What should I do?

  • Pingback: How To: Unlock NAND on the HTC Evo 4G | TheUnlockr()

  • Bilson

    Hey Unlockr,
    I have a Samsung Behold 2 and running on Window Vista 32bit.
    I tried by follow the step by step but the Serial number did not show up, the USB Debugging is on and installed the driver manually and automatically, download the USBDeview and tried….still no luck! Does it matter if I have a data plan or not? Not sure what I did wrong…

    Can you or anyone provide any help on this?
    Thank You

  • Pingback: Droid X Rooted! Thanks to Birdman and friends! | SmackBox.org()

  • Pingback: Samsung Captivate (Galaxy S) Gets Rooted Too, Here’s How You Do It [AT&T’s Samsung Captivate Can be Rooted Too Just Like Any Hot Android Smartphone] » TFTS – Technology, Gadgets & Curiosities()

  • Roxanne

    How can I do all this on linux??
    I’m new to linux so I know NOTHING about it…
    HELP :\

  • Joel

    It still says “List of devices attached” and nothing below it. i followed all the steps, please help me.

  • Erick

    The behold 2 doesn’t have HTC on the USB Files..

    So do we still have to erase something?

    cause im not getting the serial number. :/

  • Erick

    Do one for behold 2 cause i don’t think everything is the same for behold as G1… >.<

  • http://perl.lt algirdas

    drivers (android-sdk) for nexus one are available at http://developer.android.com/sdk/win-usb.html

  • http://theunlockr.com/2009/10/06/how-to-set-up-adb-usb-drivers-for-android-devices/ Phill Wisniewski

    HELP ! this doesnt wok on any of my windows. p.s or my macbook. Do you need to do this to have ROMS themes ? and this guy told me not to do this it can screw up your android badly HELPPPPPP!

    • http://theunlockr.com TheUnlockr

      Phil,

      1. This cannot screw up your phone. It doesn’t touch your phone its a tool for developers to communicate with their phone and create applications…
      2. You need to click How Tis at the top of the site, then Android then your phone. Do the How To Root then How To Load a ROM. After that you can change your phones themes etc

  • Devin

    I’ve tried this process three times even after reinstalling the drivers of my phone and also redownloading the sdk file and I can’t get my computer to pull up the serial number. I am using windows xp and I did the “How To: Root my HTC Evo” before this. Will that cause the error I am having or what is it exactly I’m doing wrong? I’m just trying to get the Nand so I can download the Cyanogan ROM.

    • http://theunlockr.com TheUnlockr

      Devin,

      Make sure USB Debugging is checked ON in Settings > Applications > Development.