• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Setting Up ADB

nuttmeg

Extreme Android User
Feb 9, 2011
7,329
2,525
Lone Star State
ADB stands for Android Debug Bridge. It comes as a part of the standard Android SDK, which you can grab here. Basically, it provides a terminal-based interface for interacting with your phone’s file system. Since Android platform is based on Linux, command-line is the only way to obtain and manipulate root access often required to perform certain advanced operations on your device using root access.

While these things can be done directly on the device itself using some terminal emulator, it will be rather difficult to execute complex commands on such a small screen. ADB provides the bridge between your machine and your computer.

How To Install ADB


Step 1: Installing the Android SDK
Note: At the time of updating this guide, the latest version of the Android SDK available is r8 and we shall be using it throughout the rest of the guide. The tools will work the same way however, even if you get a later version. In case of earlier versions though, the location of some of the tools was different and it is recommended that you get the latest available version.

The first step is to download the SDK. Use the link given at the end of this post and download the latest version of the Android SDK from there. There are versions available for Microsoft Windows, Linux and Mac OS X. In case of Windows, both an installer and a zip file are available but there isn’t any need to use the installer as a formal installation is not required.
Once you have downloaded the SDK, simply extract the compressed file to a location on your computer. In our case, we have extracted it to the root of our C drive and that makes C:\android-sdk-windows the installation location of the SDK. From here onwards, we shall be referring to this location as the ‘SDK folder’.

Step 2: Downloading the SDK Platform Tools


Previously, ADB used to be included in the SDK by default in the ‘tools’ sub-folder but now, it has been relocated to the ‘platform-tools’ sub-folder which needs to be downloaded as an SDK package. Fortunately, this is quite easy:

Just browse to the SDK folder and launch SDK Manager. When launching it for the first time, it will present you with a window to choose packages to install. The first option begins with ‘Android SDK Platform-tools’. Make sure it is checked, and uncheck all the other packages for now. You can check/uncheck a package by clicking on its name and then selecting the Accept/Reject radio button. Your window should look like this:​
Now simply click ‘Install’ and wait till the platform tools are installed. Once the process is done, you will have a ‘platform-tools’ folder inside your SDK folder. That folder will include ADB and all its dependencies.

Step 3: Setting the Path variable


Now you have ADB installed but using it this way will require you to either use the complete path of the ADB command (C:\android-sdk-windows\platform-tools\adb) or to first change directory to the platform-tools subfolder of the SDK folder each time, and this can become quite a hassle. To make ADB along with other Android SDK tools and platform tools easily accessible from anywhere at the command line, we shall add their paths to the PATH environment variable. This method will apply to Windows users only. If you are a Linux or Mac user, add the ‘tools’ and ‘platform-tools’ sub-folders of the Android SDK to your system’s PATH variable using the standard method for your operating system.

  • If you have no experience with editing system environment variables, make a System Restore point now so that you can revert back to it in case something goes wrong.
  • If you are using Windows 7, right-click the ‘Computer’ icon and click ‘Properties’. Now click ‘Advanced System Settings’ from the options in the left pane to bring up the ‘System Properties’ window. Windows XP users will directly get this window when they right-click ‘My Computer’ and click ‘Properties’.
  • In the ‘System Properties’ window, click the ‘Environment Variables’ button on the ‘Advanced’ tab.
    Pathchange.png
  • Find ‘Path’ in the ‘System variables’ section and double-click it to edit it.
  • Make sure NOT to delete the existing entry in ‘Variable value’ or it will mess up things on your computer. Just add the following string to the end of it, including both the semi-colons: ;c:\android-sdk-windows\tools;c:\android-sdk-windows\platform-tools If you have extracted the SDK’s contents to another directory, make sure to use that one for your PATH variable.
After adding the string, this is what my Path variable looks like:
C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;%SystemRoot%\system32;%SystemRoot%;%SystemRoo t%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowe rShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\Java\jdk1.6.0_23\bin;C:\Program Files (x86)\Java\jdk1.6.0_23\bin;C:\android-sdk-windows\tools;C:\android-sdk-windows\platform-tools Don’t worry if yours does not include some of the other text – what is important is the way the new entry should be added to the existign one, and the way the previous entries MUST be left unchanged. Notice that the semi-colons are necessary to separate each path variable entry from the next and previous ones. Once you have added the path, your machine may require a reboot.

In case you messed up while editing the Path variable and ended up deleting the previously existing entries, just restore the System Restore point you made and retry, being more careful this time.

Step 4: Installing the USB drivers


Finally, you need to install the USB drivers. You may or may not need to perform this step, depending on your device. If you are using a device that ships with stock Android operating system such as the Nexus One, this will be necessary. In case of other devices that ship with their custom version of Android and some tools to sync the device with the PC, such as devices from HTC that ship with HTC Sync or devices by Samsung that ship with Samsung’s own software, the suitable driver for your device will be automatically installed with that software package.

  • The first step will be to download the USB drivers. To do this, launch SDK Manager from the SDK folder and click on ‘Available packages’ in the left pane.
  • Expand ‘Third party Add-ons’ followed by ‘Google Inc. add-ons’ and check ‘Google Usb Driver package’, as shown in this image:
    wol_error.gif
    This image has been resized. Click this bar to view the full image. The original image is sized 745x433.
    Android-SDK-USB-Driver.png
  • Click ‘Install Selected’ and in the window that pops up, click the ‘Accept all’ radio button followed by the ‘Install’ button. Wait patiently while the USB drivers are downloaded and installed in the Android SDK.
  • The drivers for both 32 bit and 64 bit systems will now be present in the SDK folder under ‘usb_driver\x86′ and ‘usb_driver\x64′ sub-folders respectively.
Now that the USB drivers have been downloaded, you can install them to your computer as follows:

  • On the device, go to home screen, press Menu, select Applications > Development, and enable USB Debugging.
  • Now connect your phone to the PC via USB. New hardware installation should kick in, and it will start looking for the drivers.
  • Manually point the drivers to the folder suitable for your operating system and let them install.
  • Once drivers have installed, you can verify successful installation by going to Device Manager. Your phone should be showing under ‘ADB Interface’, like in this example:
DevManagerImage.png


HOW TO PUSH FILES

Prerequisites have...
A:android-sdk-windows installed
B: (on your phone) go to menu>settings>applications>developement and make sure usb debugging is checked.
C: the file you are pushing must be placed in the tools folder of adb so if you are pushing file "build.prop.txt" this needs to be downloaded/copy and pasted in C:\android-sdk-windows\tools
1: go to run and type cmd (or just open your command prompt)
2: cd C:\android-sdk-windows\tools
3: adb remount
4: adb devices *if everything is set up right this should output a serial number*
5: adb push FFFFFFF.FFF /#####/###### *i hope my notes help here you need to put the file name in for the F(s) and in the pound signs you put the destination on the devices example adb push build.prop.txt /system/bin
6. repeat step 3 for multiple files
7. adb reboot this is how you finish
 
Upvote 0
How do I uninstall it



  1. Click Start, click Control Panel, and then double-click Add or Remove Programs.
  2. In the Currently installed programs box, click the program that you want to remove, and then click Change or Change/Remove.
  3. Follow the instructions that appear on the screen to make the changes that you want.
 
  • Like
Reactions: swtnss
Upvote 0
  1. Click Start, click Control Panel, and then double-click Add or Remove Programs.
  2. In the Currently installed programs box, click the program that you want to remove, and then click Change or Change/Remove.
  3. Follow the instructions that appear on the screen to make the changes that you want.
So i deleted the java and reinstalled it with java 7 and was even able to install the jdk. now when i go to install the sdk platform, it says revision 9, but it didnt download.
 
Upvote 0
Pip2kk said:
How to push files to your SD Card with ADB


USB Debugging Enabled booted into ROM
or Booted into a custom recovery image with the SD Card mounted
SD Card
USB Cable
Instructions

Install ADB

Download the Android SDK Manager Installer and run the executable.

IMPORTANT: If you are told you need to download anything related to java, you will have to follow those instructions before continuing.
Take note of the installation directory, we will need that later.
Make sure you select to Start SDK Manager (to download system images, etc.)

When you run the SDK Manager it will automatically check for SDK updates. That's normal.

At the Choose Packages to Install screen, you only need to have Android SDK Platform-tools checked. Select Install.

NOTE: You can leave the question marks alone.
You may be presented with a pop up window saying, A package that depends on ADB has been updated. Do you want to restart ADB now?
Select Yes.

You may now close the SDK Manager.

Push File

Take the file you want to Push to your SD Card and place it inside

INSTALL_DIRECTORY\android-sdk\platform-tools\

NOTE: You were to take note of the Install Directory when you installed the SDK Manager.

NOTE: On my PC, the installation directory was c:\program files (x86)\android

Open a command prompt. (ex. WinKey+R, Type cmd, Press Enter.)

Change directory to INSTALL_DIRECTORY\android-sdk\platform-tools\.

NOTE: You were to take note of the Install Directory when you installed the SDK Manager.

NOTE: On my PC, the installation directory was c:\program files (x86)\android

You may now use the command adb push FILENAME /sdcard/ to push the file to your Huawei Ascend. (or really any other Android phone)

Contributors

Pip2kk

:);)
 
Upvote 0
Is this something I really need in order to connect to my computer wirelessly? I don't intend to do any developing but everything I read says that this is a development tool... It is starting to get very confusing...


Yeah you dont have to have this. Its for the more advanced users.... Hell I dont even understand it all 100% :D
 
Upvote 0
I dwlded the latest JDK, however I selected the sdk tools platform however I went through clicking each box to see what they contained and none of the had anything saying ADB, Correct me if Im Wrong, But I have the Huawei Mercury and when I hook up via usb and click debugg there is a file that is titled ADB DRIVERS, Now does that mean I dont need it to say that in the SDK Tool Platform??? Also I see a bunch of different platforms, should I be selecting 1 along with the tools platform, If so which 1 bc my Mercury is 2.3.5. and I dont see that in the list. PLEASE GET BACK ASAP, FOR I DONT HAVE MUCH TIME>>> ThanX
 
Upvote 0
have your tried SDK platform 2.3?

NO, I didnt. Im actually still at the install page for the sdk, but I was wondering instead of just checking the sdk tools, do I also have to check a android platform like 2.2 / 2.3? in the description it says check sdk tools and thats it. thats why I asked if the driver file that is already loaded on my phone after usb connection is the adb drivers I need to make this root successfull...:eek:
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones