How to Install ADB on Windows, Linux, and macOS

Install ADB on Windows Linux macOS

This tutorial will help you easily install ADB and launch it on your Windows, Linux, or macOS machine.

What is ADB?Android Debug Bridge is a command-line tool that has been a part of Android SDK and development tools for a long long time. The tool allows your PC to communicate with your Android device and perform several actions. Some common adb commands include adb devices, adb reboot, etc. We will come to them later in this article.

Install ADB on Windows Linux macOS

A list of few tutorials that require you to install ADB and Fastboot on your PC:

Table of Contents

Install ADB on Windows, Linux, and macOS

When we or most other out there say that “You need to install ADB on your PC“, we generally mean all the major platform tools that are part of the Android SDK. However, we consider ADB for the fact that it is one of the tools that is of paramount importance, not only for developers but also for advanced users who would want to tweak their Android. So that’s what we are here for. To help you install ADB and Fastboot, or install Android SDK tools or setup platform tools, you may call it by different ways, but the process that follows is the same all around.

Now, to install ADB on your computer is just the first half of the story. The next chunk is to be carried on your Android device to make it work. Rubbish? No. It is equally important to adjust the settings on your device to make the connection successful between the PC and device. So we will have it all covered below.

Make Your Android Device Ready

In order to install ADB and use it, your device must first have the USB debugging option enabled. If you already have it or know how to do it, then you may skip this section and move on to the next.

  1. Go to the device ‘Settings’ and scroll down until you see ‘About phone’ (Up to Android 7.0 Nougat) or ‘System’ -> ‘About Phone’ (Android 8.0 Oreo or above).
    Enable USB Debugging Android
  2. Find the “Build number” field and start tapping on it continuously for 7 times until you see the “You are now a developer!” toast notification on the screen.
  3. Now go back to settings and access “Developer options”. On Android Oreo and above, you will find it in ‘Settings’ -> ‘System’.
  4. Scroll down until you find the “USB debugging” option and switch ON the toggle. When prompted, select “OK“.
    USB Debugging
  5. That’s it, you have just enabled USB debugging on your Android. Now head over to install ADB and establish a connection between your device and PC.

Install ADB on Windows

  1. Download the platform-tools package for Windows: Link
  2. We are going to need a location on the PC where the files could remain untouched, yet easily accessible. So extract the content of the downloaded “platform-tools-latest-windows.zip” file to C:\adb.
    Install ADB on Windows - Files
  3. So when you view this folder, you will see something like in the image above.
  4. Go to the folder where the files are present (Example: C:\adb).
  5. On an empty space inside this folder, press the SHIFT key and right-click. Select “Open command window here” or “Open PowerShell window here” from the menu that appears.
    Open PowerShell on Windows
  6. Now, connect your Android device to the PC using USB cable and enter the following command to initiate the ADB connection.
    adb devices
  7. Just as you enter the command, your phone will be prompted by a message to allow a USB debugging connection.Allow USB debugging Android
  8. Also, during this time, the command prompt will return the device serial number with “unauthorized” message. Once you agree to the prompt, you are good to go. You may also select the “Always allow from this computer” option so that you will not have to go through this process again.
  9. Finally, you should enter the “adb devices” command again and you will have instant ADB connection between your PC and device.

You have now been able to install ADB on Windows PC and have also established a successful connection between your PC and device.

Install ADB on Linux

  1. Download the platform tools package for Linux: Link
  2. Extract the content of the downloaded “platform-tools-latest-linux.zip” file to a suitable location of your choice. We prefer the Desktop.
  3. So open a Terminal window and direct it to the folder where the ADB and other binaries are present.
    cd /location/to/the/folder/
  4. Example:
    cd /Desktop/adb/
  5. Now connect your Android device to the PC via USB cable and enter the following command in the Terminal window:
    ./adb devices
  6. The first time you enter this command, the Terminal window will return the device serial along with the “unauthorized” message.
    Allow USB debugging Android
  7. You shall also instantly see a message prompt on your device screen asking to allow USB debugging connection with the PC. So just allow it.
  8. Finally, enter the “./adb devices” command again and you will be able to establish a successful connection between your PC and device over ADB.

You have now been able to install ADB on Linux.

Install ADB on macOS

  1. Download the platform tools package for macOS: Link
  2. Extract the content of the downloaded “platform-tools-latest-darwin.zip” file to an easily accessible location on your PC, inside a folder named “adb” (For ease of access).
  3. We prefer to have it on Desktop. So now, all the platform tools package content i.e. the binaries will be present in “/Desktop/adb/”.
  4. Go to the Launchpad and open Terminal.
  5. You will now need to direct it to the location where ADB and other binary files are present. So enter the following command:
    cd /location/to/the/folder/
  6. Example:
    cd /Desktop/adb/
  7. Now that your Terminal is directed to use this location, you can connect your device to the PC via USB cable.
  8. Enter the following command to initiate an ADB connection with your Android device.
    ./adb devices
  9. As soon as you enter the command, the device will be prompted with a message to allow USB debugging. The Terminal will also display the device serial along with an “unauthorized” message.
    Allow USB debugging Android
  10. So agree to the message and allow the connection. Then enter the “adb devices” command again to have a successful connection between your PC and device over ADB.

There you go! You have been successful to install ADB on macOS. Now that you’re done with installing, follow our tutorial on how to use ADB and Fastboot from any directory on your PC.

We make use of ADB and Fastboot in a lot of our day-to-day tutorials. So if the next time there is one that requires this, then you will already have your device and PC ready for the job.

You may now proceed to use other commands as well. If you want to get yourself familiar with other ADB commands, kindly read the documentation. That’s it, you have been successful to install ADB on your Windows, macOS, or Linux PC. You also have your device now having a perfect connection with your PC over ADB.

Was it helpful? Let us know through the comments.

Comments

    1. Glad you found this helpful. I am also thinking of improving this tutorial with more relevant information.

  1. Still waiting for the message to prompt ” allow a USB debugging connection. ”

    I’m on the Mi A3 ( 6/128 ) version, what to do ? …

    1. You might not be getting the mentioned prompt for the following reasons:
      1) USB Debugging isn’t enabled
      2) Or, your computer could not recognize the phone. To confirm, go to the ‘Control Panel’ > ‘Device Manager’ and check if there’s a error sign in front of the device name.

  2. Hello,

    The command – cd /Desktop/adb/ isn’t working for me, it keeps saying no such file or directory.

    1. Hi. Where exactly did you extract the downloaded platform-tools zip package on your PC?

  3. hello author i am stuck at CSC FASTBOOT MODE on phone. ASUS ZEN MAX PRO M1.
    adb installed, it detected on adb command. but when i go to fastboot mode it seems the phone is not detected.
    showing .
    i have used powershell as well as cmd on windows 10.
    any suggestion??????.
    i have done this method earlier. but it is not working now. didn’t understand.

    1. Hi Sanjib. Please try the following:

      1) Go to Control Panel > Device Manager and keep it open.
      2) Connect your Asus Zenfone Max Pro M1 (while in Fastboot Mode) to the PC
      3) As soon as you connect the phone, the device manager window will refresh and show your connected device.

      Let me know if you see a yellow exclamation mark beside the device. Please try and provide a screenshot if possible.

    2. Namaste,

      Do you have any idea how to install USB driver for Poco M3 on windows xp?

    3. Namastey. Is the computer not detecting the phone over MTP or is it ADB/fastboot connection that’s the issue?

      Have you tried checking Control Panel > Device Manager while your POCO M3 is connected? If it’s an issue with incorrect/corrupt drivers, you should be able to find that out there.

    1. Hi David. I am glad that you were able to resolve all your problems on your own.

      And thanks for pointing that out. Windows PowerShell users would need to add “.\” and Linux/macOS users would need “./”.

  4. Hi Dhananjay,

    C:\adb\platform-tools_r29.0.2-windows\platform-tools

    Is the path on my computer, I’m running PowerShell in that folder, but it doesn’t recognize the term “adb”, I don’t understand.

    Your help would be appreciated.

    Regards, David

    1. Hi Sahil. While using adb or fastboot in PowerShell, prepend all commands with “.\” (Without the quotes). For example, the adb reboot bootloader should look like:
      .\adb reboot bootloader

    2. I copy and pasted exactly what you put however PowerShell will not except it as a command, what should I do?

  5. Hi Dhananjay,

    I don’t understand these instructions, I got stuck on downloading the platform-tools package for Windows, I then unpacked it and clicked on the adb.exe file, it did something, but I’m not sure what that was, as the window that popped up as I did that went away a fraction of a second later. Did I even install something? What did I do?

    How do I actually install the ADB so that I can move forward with removing all the junk from my S10e?

    Your help is appreciated.

    Regards, David

    I wish to clean my new S10e from

  6. When i run adb devices or fastboot devices it does nothing and device is not recognized probably.
    I used the 15 seconds adb setup on win 7 64 bit.
    I want to enable camera2api on Zenfone Max Pro and would like to get help from you in doing so..

  7. I still get the error of “adb : The term ‘adb’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
    spelling of the name, or if a path was included, verify that the path is correct and try again.
    At line:1 char:1
    + adb devices
    + ~~~
    + CategoryInfo : ObjectNotFound: (adb:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException” even though i am opening powershell in the same place as adb.exe and fastboot.exe

    1. Hello Leroyious, are you using Windows on a Virtual Machine?

      Also, please try the following command instead: ./adb devices

      Let me know if it solves anything.

    2. hello buddy. i tried typing ./adb devices and its showing ,

      List of devices attached
      * daemon not running; starting now at tcp:5037
      * daemon started successfully

      but nothing is appearing on my phone as you say. please help !

    3. Please mention which device you’re using. You might need to install proper drivers for your phone first.

    4. Hi . I tried typing ./adb devices and its showing ,

      List of devices attached
      * daemon not running; starting now at tcp:5037
      * daemon started successfully

      but nothing is appearing on my phone as you say. please help !

      My device is -nexus6p

    5. Hi. Please go to Settings > System > Developer options. In there, make sure that the ‘USB debugging’ toggle is turned ON.

    6. I putadb in and I get back. It is not recognized as an internal or external command operable program or batch file

    7. Hi Kurt. Are you sure that you opened the CMD/PowerShell in the same folder where the ADB/Fastboot files are present?

  8. Hi Friend,

    I get the below quote in my cmd window,
    adb server version (31) doesn’t match this client (39); killing…

    List of devices attached
    adb server version (31) doesn’t match this client (39); killing…
    * daemon started successfully
    ************* device

    is this an error “adb server version (31) doesn’t match this client (39); killing…”
    ?

    1. Hi Fahad, it seems like the ADB binaries on your PC are old. The device you’re trying to make the connection with, requires the latest updated Android SDK tool binaries to function properly.

      There could also be another reason for this error. Did you previously install ADB/Fastboot using another method on the PC such as minimal ADB/Fastboot? If that’s the case, then the PC is recognizing two different versions of the tool and thus the mismatch error that you’re seeing.

      Solution:
      1) Make sure that there is only one ADB/Fastboot installation on the PC. Check the PATH entries on your Windows PC.
      2) If you’re sure that there is only one, then make sure to update the tools to the latest package.

  9. Hi Tim, please reach to me on my personal email: dhananjaygbhardwaj[at]gmail.com

    I saw the error in the screenshot you shared, and it seems to be pretty odd. Have never seen that in years of my experience with ADB/fastboot.

    1. Hi Cassie. First, make sure that you’re using the Windows tools package and not Linux. Then, you will also have to make sure that you have changed the PowerShell directory to the folder where the Windows tools ZIP file was extracted.

      If it still confuses you, then just follow the Windows-specific instructions above. And ping back here.

  10. For windows the command is “.\adb devices”, otherwise you will get the error for “term adb is not recognized”

    1. Hi Joe, the command on Windows “adb devices” works flawlessly. Just make sure that you have opened the command prompt/PowerShell window in the same folder (e.g. C:\adb), where the adb.exe, fastboot.exe, and other binary files are present.

  11. How can i enable the USB debugging if i dont know the google account nor password to unlock the phone and go into the settings? I am doing this method to erase all data because the regular hard reset factory mode wont erase the “use the google account previously used to sign into this phone” part. Help please!!???

    1. The thing you’re talking about is “Factory Reset Protection”, which is a security feature imposed on Android. There’s no way to enable USB debugging until and unless you have completely booted into the OS.

      I am sorry, but I won’t be able to help much in this further.

    2. hey, i remember all the passwords and everything but my nexus 6p is in bootloop and i have followed your tutorial on that which led me to this page, now my 6p won’t turn on o how do i eable usb debugging?

    3. Hi Manan. USB debugging could only be enabled when the phone is booted in the OS. BTW, what exactly are you trying to do with USB debugging?

  12. Thx for this tutorial.

    Small edit: on Mac, you need to run “./adb devices” for the binary to be executed.

  13. Well explained tutorial, with all steps and screenshots in order to be all in the good way. Great job.

    1. I m not able to do with Windows. Some errors are coming.

      PS C:\adb> adb devices
      adb : The term ‘adb’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
      spelling of the name, or if a path was included, verify that the path is correct and try again.
      At line:1 char:1
      + adb devices
      + ~~~
      + CategoryInfo : ObjectNotFound: (adb:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException

    2. Hello Nitin, kindly share a screenshot of the Command-Prompt/PoweShell window and also that of the C:\adb folder. You can do that via imgur.com or any other alternative.

    3. I have the same issue and same error:
      adb : The term ‘adb’ is not recognized as the name of a cmdlet

      I dont see how the issue was resolved.

    4. If you still stuck at – ‘adb’ is not recognized; then

      – please set windows environment variable pointing to plateform-tools folder where adb exe resides.
      – then add that environment variable into PATH variable.

Leave a Reply

Your email address will not be published. Required fields are marked *