1. Are you ready for the Galaxy S20? Here is everything we know so far!

ADB Guide (updated 2014/11/11)

Discussion in 'FAQs' started by El Presidente, Nov 10, 2011.

  1. El Presidente

    El Presidente Beware The Milky Pirate!
    VIP Member Thread Starter

    Note: see post #2 below for the most current download and instructions for the mini-sdk (i.e., sdk-tools.zip file--the download can be found at the end/bottom of post #2).


    If you're just here to grab rooting tools, go the easy way - read this, but install the Mini-SDK as shown in the post after this one. The full SDK shown here is absolute overkill for most every rooter.

    Windows drivers are in the post after that.

    All credit for this goes to scary alien! Go click the Thanks button on one of his posts to show your appreciation.

    (LOL, El Presidente, just saw this (12/25/2011)...you are too kind, sir! Thank you for that nice note...SA)

    The adb (Android Debug Bridge) is a useful utility, often used for root-related operations.

    To use the adb utility, you'll need to:

    1. install the Android SDK (Software Development Kit) and its platform-tools package

    2. for Windows PCs, you'll need to have the adb USB device drivers specific to your Android device; for Apples Macs, this is not a stumbling block, but often is for Windows machines; finding and installing the adb USB device drivers for Windows is beyond the scope of this tutorial, please see post #4 below

    Details and options for installing the Android SDK and the adb utility follow below:

    Manual / Standard Method
    - download the Android SDK from here: Android SDK | Android Developers

    - choose the download package for your particular platform

    - if you are using Windows and chose the .exe installer, you'll be prompted to select a Destination folder (for example, the c:\android-sdk-windows folder)
    -if you are not using Windows or downloaded a .zip or .tgz package, extract the android-sdk_r##-windows.zip to a new folder or the top of the C:\ drive; if you use Winzip or WinRAR, you can do an "Extract Here" and the files will be extracted to the c:\android-sdk-windows folder

    - either run "tools\android.bat" from the Windows Command (DOS) prompt or double-check the "tools\android.bat" from Windows Explorer; here's the screen that will be displayed:
    - when the "Android SDK and AVD Manager" launches, click on the "Available packages" entry in the left-hand pane/column.
    - click on the arrow that's to the left of the "Android Repository" line to expand the list of packages available for download
    - check the box to the left of "Android SDK Platform-tools, revision #"
    - click on the "Install Selected" button at the bottom right of the window
    - another window will be displayed, showing the package(s) that you've selected to install; go ahead and click the "Install" button
    - the Android SDK Platform-tools will now be installed (progress will be shown)
    - click the "Close" button when the package is finished installing
    - the "adb.exe" utility will have now been installed in the "c:\android-sdk-windows/platform-tools" folder

    - the complete, current documentation for the (adb) Android Debug Bridge can be found here:

    Android Debug Bridge | Android Developers

    - before you can actually use the adb utility with your Android device, you'll need to turn on USB debugging on your Android device

    - launch the Settings application and navigate to Applications -> Development and make sure the checkbox for USB debugging is selected/checked
    - connect your Android device to your PC using the appropriate USB cable

    - to use the adb utility, start a Windows Command Prompt (DOS window) and change (cd) to the platform-tools directory under the Android SDK's installation folder (i.e., where the adb.exe utility resides); here are some sample commands:

    Code (Text):
    1. # first, change our directory to where adb.exe is installed
    2. #
    3. c:\> [B][COLOR=Blue]cd c:\android-sdk-windows\platform-tools[/COLOR][/B]
    4. #
    5. # test to see if the adb daemon can communicate with our Android device:
    6. #
    7. c:\android-sdk-windows\platform-tools> [B][COLOR=blue]adb devices[/COLOR][/B]
    8. #
    9. # display the help for the adb utility
    10. #
    11. c:\android-sdk-windows\platform-tools> [B][COLOR=blue]adb help[/COLOR][/B]
    12. #
    13. # open a shell session on our Android device
    14. #
    15. c:\android-sdk-windows\platform-tools> [B][COLOR=blue]adb shell[/COLOR][/B]
    16. #
    17. # list the files in the Android device's /sdcard folder
    18. #
    19. c:\android-sdk-windows\platform-tools> [B][COLOR=blue]adb shell ls -a -l /sdcard[/COLOR][/B]
    20. #
    21. # install the "android-app.apk" application to the Android device
    22. #
    23. c:\android-sdk-windows\platform-tools> [B][COLOR=blue]adb install android-app.apk[/COLOR][/B]
    24. #
    25. # retrieve a file from the Android device to the local PC
    26. #
    27. c:\android-sdk-windows\platform-tools> [B][COLOR=blue]adb pull /sdcard/downloads/myfile.txt myfile.txt[/COLOR][/B]
    28. #
    29. # send a file from the local PC to the Android device
    30. #
    31. c:\android-sdk-windows\platform-tools> [B][COLOR=blue]adb push myfile.txt /sdcard/downloads/myfile2.txt[/COLOR][/B]
    32. #
    33. # display the Android device's system log (press control-C key
    34. # combo to terminate)
    35. #
    36. c:\android-sdk-windows\platform-tools> [B][COLOR=blue]adb logcat[/COLOR][/B]
    If you have problems establishing a connection via adb (i.e., "adb devices" does not "see" your Android device), its likely you forgot to enable USB debugging or you do not have the adb USB drivers properly installed. Don't worry, you won't be the first or last to have had either of these problems. Please consult with the experts in your device's all-things-root sub-forum for help in identifying and installing the proper adb USB drivers.

    Mini-SDK (contains adb and fastboot utilities for Windows, Mac, and Linux)

    Please see the next post in this thread for the Mini-SDK.


    How to update your PATH environment variable to include adb and your Java installation
    (courtesy of txwolf1980)
    Note: This will vary from OS to OS. This guide is for Windows 7.

    1. After you have installed SDK, make a note of where it is installed (I have mine directly on the root of the C\: drive, for simplicity). Then click your start button, and right click 'computer'.

    2. Click properties

    3. On the left pane, click "advanced system settings"

    4. Click "environment variables" on the pop up that comes up

    5. Next, look on the second pane in the second pop up that shows up (system variables) and scroll down to path.

    6. Highlight it, and click on "edit"

    7. Move the cursor to the end of the text, making sure you don't delete anything, and add a semi-colon. Next, without any spaces type the following, modified to your computer.


    Now, since I have mine set directly on my C\: drive, there is no other folder in there. But, if you have yours set up in your Program Files folder, it would look something like this

    C:\program files\android\android-windows-sdk\platform-tools

    As I said, you need to modify the PATH you enter to fit your computer.

    The next step is to do the same with Java.

    So, add the semi-colon, then the path. In my case it's

    C:\Program Files\Java\jdk1.7.0\bin\java.exe

    Unless you've changed the directory, it will probably be similar for you. But, make sure of the version you are running.

    Once you have set the new paths, click ok, then OK on the enviornment variables window, and apply on the system properties window.

    At this point, you no longer have to cd to platform-tools to use adb or java. This also allows you to use 3rd party script tools such as apk manager.

    Hope that helps!


    change log:

    2011-11-12 scary alien: 1) minor edits, 2) additional instructions, 3) include example images
    2011-11-25 scary alien: replace attachments with better imageshack links
    2011-12-02 scary alien: include link to alternative, pre-packaged adb/SDK installation
    2011-12-04 scary alien: include another, mini-SDK alternative installation option
    2011-12-05 scary alien: add Mac and Linux adb and fastboot utilities to sdk-tools.zip
    2011-12-07 scary alien: adding information for updating PATH environment variable (courtesy of txwolf1980)
    2013-05-21 EarlyMon: removed mini-SDK

    also, here are the original attachments/thumbnails:

    Attached Files:

    #1 El Presidente, Nov 10, 2011
    Last edited by a moderator: Oct 9, 2016

    1. Download the Forums for Android™ app!


  2. EarlyMon

    EarlyMon The PearlyMon
    VIP Member

    The Mini-SDK

    During the course of rooting, you'll likely be instructed to go grab the Android SDK.

    You very likely don't need that.

    If you go and download the whole Android SDK shebang and get a platform tools folder, you'll have everything to begin development in Android. And a big waste of space on your hard drive if you're not into that.

    Use our forums' Mini-SDK (below) and unzip that to C:\sdk-tools under Windows
    - or -
    ... under an sdk-tools folder inside your home directory or Documents Mac or Linux.

    Then, wherever you see instructions telling you to go to "platform tools" - just use your sdk-tools folder and you're all set.

    Pro Linux users can install adb and fastboot without our Mini-SDK, please read the whole post before proceeding.
    If you're using a temporary Linux via Live USB or Live CD, then our Mini-SDK is for you.


    • Version.txt
    • Windows:
      • adb.exe
      • AdbWinApi.dll
      • AdbWinUsbApi.dll
      • fastboot.exe
      • md5sums.exe
    • Linux:
      • adb-linux
      • fastboot-linux
    • Mac OS X:
      • adb-mac
      • fastboot-mac
    • sdk.sh
      • installer for Linux and Mac OS X only
      • To use: sh sdk.sh
    Good for both 32/64-bit Windows or Linux, 64-bit OS X. (The only 32/64-bit differences are elsewhere in the full SDK - adb and fastboot are the same regardless. Now aren't you glad you're using the Mini-SDK so you don't have to care? :))

    Note that the md5 checksum utility is included in Linux and Mac OS X but added here for Windows.

    On Windows, the commands from inside the sdk-tools directory are:

    adb rest of command line

    fastboot rest of command line

    md5sums filename

    For Linux or Mac OS X, please run the installer first -

    • unzip sdk-tools.zip, double-clicking in your file explorer or Mac Finder is ok on the zip file
    • In a terminal window inside the sdk-tools folder:
      • sh sdk.sh

    On a Mac from within the sdk-tools folder, to use -

    ./adb rest of command line

    ./fastboot rest of command line

    md5 filename (see note following Linux)

    On Linux from within the sdk-tools folder, to use -

    sudo ./adb rest of command line

    sudo ./fastboot rest of command line

    md5sum filename (see note following)

    Note - on Mac/Linux, adb and fastboot are added to your path by the installer. Thereafter, the ./ file location qualifier won't be needed in new terminal windows.

    Windows users please refer to post 1 to get the Mini-SDK into your path, substitute "C:\sdk-tools" as the proper path. You don't need to worry Java or the JDK with the Mini-SDK.

    Pro Tip for Linux Users -

    Note to 64-bit Fedora users or others using distros based on that -
    HOWTO Setup Android Development - FedoraProject

    yum install glibc.i686 glibc-devel.i686 libstdc++.i686 zlib-devel.i686 ncurses-devel.i686 libX11-devel.i686 libXrender.i686 libXrandr.i686​
    For Debian based systems like Ubuntu, if 64-bit, do -

    sudo apt-get update
    sudo apt-get install ia32-libs-multiarch​
    Thanks to @palmtree5 for the catch on the 32/64-bit Linux!​

    • If you're not doing just a one-time or temporary install from a Live USB or Live CD of Linux, you do NOT need the Mini-SDK
    • You can get adb and fastboot from your distribution support repository
    • You must have a contempory Linux installation - NOT Ubuntu 12 or Fedora 17/18 - for those, use our Mini-SDK - otherwise:
    • For Ubuntu and other Debian repository users, install in terminal:
      • sudo apt-get install android-tools-adb android-tools-fastboot
      • If the packages are not found, add the Ubuntu Phablet Team:
        • Code (Text):
          1. sudo apt-add-repository ppa:phablet-team/tools && sudo apt-get update
    • For Fedora 19/20/21 and similar -
      • sudo yum install android-tools
    • And on either platform, follow you standard practice to perform an update after any package installation
    • Definitely see above for 32/64-bit library package installs!!
    • If you go this route, you'll still need to sudo the commands - but it won't matter what directory you're in. The above commands are still correct, just don't worry about having an sdk-tools folder.
    • For Mac Homebrew users:
      • Yes, you can get the Homebrew repository instead
        • brew install android-tools
      • No, unless you're really in to Homebrew, you're just fine with the Mini-SDK instead. Seriously.
    See the next post for Windows drivers!

    Hope this helps! :)


    March 27-28, 2015 - Updated Linux install directions.

    Updated to platform-tools revision 21 pulled from SDK Tools Revision 23.0.5 (October 2014) on 2014/11/11 - with a great many thanks to iowabowtech and Brian706 - tested Lollipop/Nexus ready

    Updated sdk.sh and instructions on May 18, 2014. And we really need to update this to the latest sdk for everyone.​

    Updated May 20, 2013 to reflect the February 13, 2013 sdk.
    *nix nstaller added for Mac and Linux.

    The installer removes all foreign SDK files for your os from its own distribution.

    The installer copies to platform files to the generic adb and fastboot but retains adb-platform and fastboot-platform for legacy instructions.

    October 9, 2016 (scary alien) - updated w/new Windows versions

    Attached Files:

    #2 EarlyMon, Jan 2, 2013
    Last edited by a moderator: Oct 9, 2016
  3. EarlyMon

    EarlyMon The PearlyMon
    VIP Member

    Having trouble finding the right drivers?

    Maybe this will help -

    OEM USB Drivers | Android Developers

    Edit - March 27, 2015

    Since this guide was written, Koush (extraordinary Android dev) has attacked the Windows adb/fastboot driver problem in a big way.


    Scroll down a little, and go for the big link that says to Download Windows Installer.

    Also - having a good backup before starting to root is a good idea.

    For many devices, that will be Helium Backup from the Play Store.


    And when you go to install the PC part, Helium will also help you with individual adb driver installations (these predate Koush's universal installer, included for convenience and reference here).


    To learn more about Helium, see also -


    For further help with adb/fastboot drivers, please ask in your device's All Things Root forum.

    The nature of Windows drivers and the wealth of Android devices makes it impossible to answer driver questions here.

    Don't ask - we can't help here - sorry.

    For Linux and Mac users -

    You don't need to install any drivers, nor do they exist for your PCs.
    #3 EarlyMon, Nov 27, 2013
    Last edited: Mar 27, 2015
  4. Angelo Lim

    Angelo Lim Lurker

    Whats the password for the zip file??
    #4 Angelo Lim, Feb 10, 2015
    Last edited by a moderator: Feb 10, 2015
  5. EarlyMon

    EarlyMon The PearlyMon
    VIP Member

    There isn't one. It's just a zip file.
    Masterchief87 likes this.
  6. LeonJ

    LeonJ Lurker

    Do I need to connect device via usb before downloading?
  7. El Presidente

    El Presidente Beware The Milky Pirate!
    VIP Member Thread Starter


    Download, unzip, then connect your device.
    Masterchief87 likes this.
  8. Hook

    Hook Ever since DU... ;-)

    I still have revision 21. Does this need to be updated now that I'm on Android 6.0 before I get into rooting and stuff? Will this be updated soon or should i just pull down the full SDK? By the way, when I checked just now with the 2014 files, fastboot devices worked just fine. Can I just take an "If it ain't broke, don't fix it" attitude. ;)
    argedion likes this.
  9. selene1195

    selene1195 Lurker

    im using htc desire x , android 4.1.1 and my cellphone isn't showing any updates whatsoever, plus with os windows 10 is it still possible ?
  10. argedion

    argedion The TechnoFrog

    adb wont update your phone. I'm not sure what your asking here. as far as the win 10 question I'm assuming your asking if the mini sdk will work with it I'll have to let someone with Windows tell you that. My assumption would be yes
  11. scary alien

    scary alien not really so scary
    VIP Member

    Little bump here to note that I've updated post #2's attachment (sdk-tools.zip) to use include the new versions of the Windows adb and fastboot utilities.

    Hook, lusanhero and El Presidente like this.
Similar Threads - ADB Guide updated
  1. Boowho
  2. Søren Tarp
  3. binar
  4. xtianrogelio
  5. kumaranil13k
  6. kumaranil13k
  7. Rasil1127
  8. 2tryagain
  9. 2Wild
  10. Owen Lewis

Share This Page