Setting Up ADBGeneral


  1. nuttmeg

    nuttmeg Well-Known Member

    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.
      [​IMG]
    • 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:
      [​IMG]This image has been resized. Click this bar to view the full image. The original image is sized 745x433.[​IMG]
    • 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:
    [​IMG]

    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

    Advertisement
  2. swtnss

    swtnss Well-Known Member

    Do you have the jdk download for windows xp.
  3. nuttmeg

    nuttmeg Well-Known Member

  4. swtnss

    swtnss Well-Known Member

  5. nuttmeg

    nuttmeg Well-Known Member

    swtnss likes this.
  6. swtnss

    swtnss Well-Known Member

    it said the installation package could not be opened. contact the application vendor to verify that this is a valid windows installer.
  7. swtnss

    swtnss Well-Known Member

    Now i can install the blue jay but i still dont have the jdk. i still need that, but i cant seem to be able to downlaod it. What does the bluejay do?
  8. swtnss

    swtnss Well-Known Member

    While i was installing it, it detected that i dont have the jdk installed. is there another way of installing that because on the java site and the file you sent me said it was not a valid 32 file or it was corrupted.
  9. ShinySide

    ShinySide Disabled

    swtnss and nuttmeg like this.
  10. swtnss

    swtnss Well-Known Member

  11. nuttmeg

    nuttmeg Well-Known Member

    uninstall your version 6 and than try the one above your post.
    swtnss likes this.
  12. swtnss

    swtnss Well-Known Member

    How do I uninstall it
  13. swtnss

    swtnss Well-Known Member

    wow i just uninstalled my java and now i cant install java 5 either i still get the same problem. not a win. 32 file.
  14. nuttmeg

    nuttmeg Well-Known Member



    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.
    swtnss likes this.
  15. swtnss

    swtnss Well-Known Member

    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.
  16. swtnss

    swtnss Well-Known Member

    Is there an android platform that should be installed on the sdk?
  17. ShinySide

    ShinySide Disabled

    :);)
  18. Verdigo998

    Verdigo998 Member

    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...
  19. ShinySide

    ShinySide Disabled


    Yeah you dont have to have this. Its for the more advanced users.... Hell I dont even understand it all 100% :D
  20. nuttmeg

    nuttmeg Well-Known Member

    +1

    OP Updated, added how to push files using ADB.
  21. ciabatoni

    ciabatoni Well-Known Member

    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
  22. nuttmeg

    nuttmeg Well-Known Member

    have your tried SDK platform 2.3?
  23. ciabatoni

    ciabatoni Well-Known Member

    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:
  24. ARocker

    ARocker Guides Guide

    fresnox and nuttmeg like this.

Share This Page