Friday, May 24, 2013

How to Install ADB (Android Debug Bridge) and Fastboot on Windows computer for use with Android phone

ADB  (Android Debug Bridge) and Fastboot
PHOTO: ADB device drivers
http://1.bp.blogspot.com/-Olkjlvr-v9s/UZ8mJgZPs2I/AAAAAAAAXIo/XQnYkoksPdU/s1600/6a00d83451c9ec69e20162fbf2a463970d-300wi.jpg
http://www.pocketables.com/images/old/6a00d83451c9ec69e20162fbf2a463970d-300wi.jpg
http://www.pocketables.com/2012/07/universal-naked-driver-for-windows-cuts-out-the-requirement-for-multiple-adb-device-drivers.html



What is ADB

Last edited by AayushK; 24th November 2012 at 09:30 PM

ADB stands for Android Debug Bridge. It comes as a part of the standard Android SDK. Basically, it provides a terminal-based interface for interacting with the phone’s file system. Since Android platform is based on Linux, command-line is often required to perform certain advanced operations on the 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 the machine and the computer.


Installing ADB and Fastboot
Installing ADB and Fastboot is actually very easy:

The following guide is for Windows PCs only, but ADB/Fastboot can be installed on Linux and Mac OS X also. (You just do it differently for Linux/Mac OS X.) Also note that this guide was written on a Windows 7 computer. However, the guide will work on Windows 8/XP/Vista the same way.
Note: The tools found in the download are provided by Google, in Android SDK:
(http://developer.android.com/sdk/index.html).
The tools are extracted and uploaded for easy access, instead of having to download the whole SDK. The same tools are available if the Android SDK is download directly from Google.


  • Extract the contents directly into your C:\ partition. You should now have a folder C:\Android that looks something like this:
  • Press Win + R on your keyboard to bring up the Run dialog.
  • Once the Run box is open, type in sysdm.cpl and hit OK:
ADB  (Android Debug Bridge) and Fastboot
  • Once you hit OK, the System Properties panel should open; click on the Advanced tab:
ADB  (Android Debug Bridge) and Fastboot
  • From the Advanced tab click on Environment Variables:
  • At the Environment Variables window find where it says Path under System variables, click on it, and click the Edit button:
  • When the Edit System Variable window pops up, type in ;C:\Android at the very end and hit OK:
  • Make sure you type in exactly ;C:\Android (be sure to include the semi-colon at the beginning).
  • After clicking OK, close out all windows. Installation is completed!

Using ADB and Fastboot
Once installed, using ADB or Fastboot is as easy as opening command prompt, typing in adb xxx or fastboot xxx (with xxx being the command to run)…

ADB  (Android Debug Bridge) and Fastboot
http://1.bp.blogspot.com/-jgKvEbHubxg/UZ80GRGcS5I/AAAAAAAAXKY/bAwVwl7wz1Y/s1600/Easy+adb+execution.png
 
…and hitting Enter on the keyboard to execute the command.

Take note, however, installing ADB and Fastboot is not enough to start using it with the phones.  The relevant drivers need to be installed (http://dottech.org/android/26188/usb-adb-and-fastboot-drivers-for-windows-for-all-android-phones/) on the computer – so that the PC recognizes the phone – before ADB or Fastboot will be able to work with it. If the drivers are not yet installed, an error similar to the following will occur:


ADB  (Android Debug Bridge) and Fastboot
http://1.bp.blogspot.com/-K6Uqk2e81mU/UZ8mKE4POEI/AAAAAAAAXI8/zDR2huIcl2Y/s1600/Command+Prompt+-+to+run+adb.png


If the proper drivers are not installed, read dotTech’s article on downloads links, for USB (adb and fastboot) drivers for Windows, for all Android phones: http://dottech.org/android/26188/usb-adb-and-fastboot-drivers-for-windows-for-all-android-phones/


Uninstalling ADB and Fastboot
Uninstalling ADB, Fastboot, and the other tools is as easy, by undoing what was done during installation. In other words, delete C:\Android and all the files in it, and remove the environmental variable added earlier.


Conclusion
ADB and Fastboot is installed – now what? Now go and look for guides on modding/hacking the phone. A good place to start is by reading dotTech’s how to root guides. Another good place to look for Android hacking and slashing is XDA-Developers. If lucky, the guides found won’t require the use of ADB or Fastboot; but if they do, the installed
ADB or Fastboot are prepared and ready for use.

Originally posted by Ashraf on Jun 18, 2012. Updated Nov 16, 2012 to include newer version of ADB and Fastboot.

About the author: Ashraf
Happily married to the most beautiful woman ever, Ashraf is the founder of dotTech. Ashraf spends insane hours on dotTech (usually writing articles but sometimes doing absolutely nothing except staring). Yes he is weird, but he is also very friendly.

 

Common problems
If PC is unable to detect the "adb devices"; At mobile phone -------> Settings -------> Applications --------> Development --------> Tick - untick -  tick "USB debugging".


"Have you tried unticking, waiting a few seconds, then re-ticking the usb debugging mode setting in the phone's application development settings while the phone is connected to the PC and adb is running. This usually fixes it for me."

ADB  (Android Debug Bridge) and Fastboot
PHOTO: Tick - untick -  tick "USB debugging" at mobile phone
http://1.bp.blogspot.com/-A3Oit34v1Po/UZ8mJicUzyI/AAAAAAAAXIs/jiapJJ1eMUw/s1600/04.png
http://2.bp.blogspot.com/-8Tc5_7wQxoA/US4-tdBBNrI/AAAAAAAAAIA/6vonhIpYop4/s1600/04.png
http://www.accidentalarchitect.com/2013/02/i-have-older-nexus-s-4g-d720-and-needed.html



At the PC's, the phone should be detected. Enter the command "adb devices" at the Command Prompt and the following message will appear:
"List of devices attached
000000A8a4BB40 device


ADB  (Android Debug Bridge) and Fastboot
http://1.bp.blogspot.com/-eXHMtm6y_Ws/UZ8mLs6eG4I/AAAAAAAAXJo/Cdf5bPdM27Y/s1600/List+of+ADB+devices+detected+-1.JPG

 
To double confirm that "adb" is already working, at the PC, press WIN button + R -----> Run command: sysdm.cpl  ------> System properties  -----> Hardware Tab ------> Device Manager -----> "ADB Interface" is on top of the list. (And Network adaptors).


ADB  (Android Debug Bridge) and Fastboot
http://2.bp.blogspot.com/-4mEdA7cSXQw/UZ8mKeq9EII/AAAAAAAAXJE/T48cknvl-XU/s1600/Device+Manager+shows+ADB+Interface+-1.JPG
 

Reference