Wednesday 21 August 2013

How To Install ADB & Fastboot for Android Device




Install ADB & Fastboot for Android Device – How to Setup Guide


What is ADB
ADB stands for Android Debugging Bridge which is used for testing and debugging purposes by the Android developers. ADB, the command-line debugging application, comes as a standard part of the Android SDK and lets you communicate with your Android device from a computer. In short, ADB provides the bridge between your device and your computer. Knowing adb can mean the difference between a paperweight and a working phone/tablet. Several Android rooting and modification guides requires ADB and Fastboot set up on your PC.

What is Fastboot

Fastboot is a command line tool that lets you directly flash the filesystem in Android devices from a host via USB. With Fastboot, you can flash unsigned partition images. It is disabled in production devices since USB support has been disabled in the bootloader.
ADB and Fastboot worth a lot for your Android devices advanced tinkering, however, it is very easy to install ADB and Fastboot. Both of these come packed in Android SDK, so all you need is to download Android SDK and setup ADB & Fastboot and finally setting the path variables.

How to Install ADB

  1. First of all download the lasted Android SDK a.k.a. Android Developer Tools from here: Android SDK;
  2. Extract the downloaded adt-bundle-windows*.zip file. Inside the extrected folder, find the folder labeled ‘platform-tools’ (adt-bundle-windows-*\sdk\platform-tools). Since we are interested in ADB and Fastboot only, ‘platform-tools’ folder contains all the files required for ADB and Fastboot.
  3. Renaming the ‘platform-tools’ folder to something easier is also recommended, for example rename the folder to android-adb.
  4. Now copy the ‘android-adb’ folder to a convenient location on your PC e.g: root of the C: drive is usually a good idea. It makes things easier when setting up path variables or running commands. Throughout the guide we’ll assume that the adb and fastboot files are installed in c:\android-adb directory.
install-adb-fasboot-6
Note: By now ADB and Fastboot should be usable by using the complete path of the ADB command i.e:c:\android-adb\ in our case, but in order to use adb from any directory in the command-line, you’ll need to edit and add this location to Windows’s path environment variables, so you can run ADB commands from anywhere.
Recommended: make sure to create a System Restore Point so you can revert back to older settings if anything goes wrong during the process.

Edit Windows’s Path Environment Variables

Windows 7/8: Right-click on the Computer icon and click ‘Properties’. Now click on ‘Advanced System Settings’ from the left navigation pane to open the ‘System Properties’ window.
install-adb-fasboot-1install-adb-fasboot-2
Go to the ‘Advanced’ tab and click on ‘Environment Variables’ button.
install-adb-fasboot-3
Windows XP: Right-click on ‘My Computer’ and click ‘Properties’. The ‘System Properties’ window will appear, go to the Advanced tab and then click the ‘Environment Variables’ button.
Under the ‘System Variables’ section, scroll down and select ‘Path’ variable, then click Edit button.
install-adb-fasboot-4
Navigate to the very end of the ‘variable Value’, without deleting the existing entries, add a Semi-Colon (;) and then add your adb folder path (i.e. c:\android-adb). So the final addition that we did here is:
;C:\android-adb
Now Click the Ok button.
install-adb-fasboot-5
NOTE: If you have ADB & Fastboot folder at a different location, you will need to adjust the path accordingly. The semicolons allow us to separate a single entry from the previous path statement.
You have seccussfully set up and installed ADB and Fastboot on your PC globally and can easily runn ADB and Fastboot commands from anywhere in the command-prompt. To verify that ADB and fastboot are correctly installed, enable USB debugging mode on your android device and connect it to PC via USB cable, launch a command prompt window, and type:
adb devices
and hit enter button. The daemon will start up, and all connected devices will be listed. For more information on ADB and Fastboot, check out Google’s official page on ADB.

Some Common ADB/Fastboot Commands

ADB Commands

adb devices – lists which devices are currently attached to your computer
adb install  – lets you install an Android application on your phone
adb remount – Remounts your system in write mode – this lets you alter system files on your phone using ADB
adb push  – lets you upload files to your phones filesystem
adb pull  – lets you download files off your phones filesystem
adb logcat – starts dumping debugging info from your handset to the console – useful for debugging apps
adb shell  – drops you into a basic linux command shell on your phone with no parameters
adb devices – lists which devices are currently attached to your computer
adb install  – lets you install an Android application on your phone
adb remount – Remounts your system in write mode – this lets you alter system files on your phone using ADB
adb push  – lets you upload files to your phones filesystem
adb pull  – lets you download files off your phones filesystem
adb logcat – starts dumping debugging information from your handset to the console – useful for debugging your apps
adb shell  – drops you into a basic linux command shell on your phone with no parameters, or lets you run commands directly

Fastboot Commands

fastboot devices – lists which devices in fastboot mode are currently attached to your computer
fastboot boot  – boots a rom stored on your pc specified by the filename
fastboot flash  – flashes a rom stored on your pc, partition can be one of {boot, recovery, system, userdata}

No comments:

Post a Comment