Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,770,879 Members 43,989 Now Online
XDA Developers Android and Mobile Development Forum

[HOWTO] Install Google SDK and ADB drivers in Windows 7

Tip us?
 
TECK
Old
(Last edited by TECK; 5th December 2012 at 12:36 AM.)
#1  
TECK's Avatar
Axivo Developer - OP
Thanks Meter 279
Posts: 779
Join Date: Jul 2011
Location: Montreal
Default [HOWTO] Install Google SDK and ADB drivers in Windows 7

I'm posting this guide because my Galaxy Nexus I9250 I purchased from Google Play would not to recognize in any way, shape or form the official Google drivers provided into Android SDK. Obviously, if you installed any Samsung drivers, you will have to uninstall them. Personally, I always connect the device to my PC and let Windows Update find the best driver. In this way, the basic Windows interface is handled by Microsoft drivers:



Google SDK 64bits Setup
This is a quick howto for those who actually want to setup their SDK properly in Windows 7 64bits. I saw a lot of craziness on the Internet so I wanted to share how I set a proper 64bits development environment.

Android SDK: http://developer.android.com/sdk/ (installer_r21-windows.exe)
Java JDK: http://www.oracle.com/technetwork/ja...ase/downloads/ (jdk-7u5-windows-x64.exe)
Eclipse Classic: http://www.eclipse.org/downloads/ (eclipse-SDK-4.2-win32-x86_64.zip)

First, download the 64bits software versions, not 32bits. Android SDK is the only 32bits package but it will work fine with 64bits development tools, if you know what you are doing. Obviously, if you are on a 32bits OS download the 32bits software versions. We are discussing a 64bits setup, so let's move on.

Install Java JDK and only if you run a 64bits OS, set a JAVA_HOME variable with value "%ProgramFiles%\Java\jdk1.7.0_05" into Environment Variables (adjust the value with whatever version you downloaded):



Reboot your PC to enable all the settings done above.
Next, install Android SDK. You only need to download Android SDK Tools, Android SDK Platform-tools and Google USB Driver, if you just want to play with the phone. If you plan to develop apps, install also the API of your choice and Eclipse Classic (yes, that is the recommended version by Google devs).

To make available everywhere your platform tools (adb, fastboot, etc.), add your platform-tools directory to Path:



Myself, I installed the SDK in "C:\Program Files (x86)\Android\sdk" directory, so my path looks like:
Code:
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;%ProgramFiles(x86)%\Android\sdk\platform-tools
Technically, you need to add the ";%ProgramFiles(x86)%\Android\sdk\platform-tools" location at the end of your current path.

Reboot your PC to enable all the settings done above.
Now, on with the fun part. There are 2 drivers needed for Google Nexus, the Composite ADB and Bootloader (Android 1.0).

Android Composite ADB Interface Driver
First, enable USB Debugging in your phone:



Plug your USB cable, you will notice in Device Manager the failed driver notice:



Right-click on it and select "Update Driver Software...", then "Browse my computer for driver software". Don't bother browsing to your ADB USB driver location, it will not install the proper driver. Instead, click on "Let me pick from a list of device drivers on my computer" button:



Make sure "Show All Devices" is selected and click on Next button:



With the list of devices displayed, click on Have Disk button:



Browse to your Google Driver location, mines is set in "C:\Program Files (x86)\Android\sdk\extras\google\usb_driver":



Pick the "Android Composite ADB Interface" driver and click on Next button:



You will be asked to accept the driver installation, do it and be done with this part of drivers setup:



Android Bootloader Interface Driver
Make sure USB Debugging is still enabled in your phone. With the USB cable connected, manually boot into Bootloader mode by powering down your phone and restarting it with all 3 buttons pressed (Volume Up + Volume Down + Power). You will notice in Device Manager the new unrecognized Android 1.0 device. Follow the same steps explained above and when you reach the driver selection, choose "Android Bootloader Interface":



To test the setup, run few basic commands:
Code:
adb devices
adb reboot bootloader
fastboot reboot


You are done, enjoy the official USB drivers from Google.
Floren Munteanu
Axivo Inc.
The Following 38 Users Say Thank You to TECK For This Useful Post: [ Click to Expand ]
 
TECK
Old
(Last edited by TECK; 24th August 2012 at 07:34 AM.)
#2  
TECK's Avatar
Axivo Developer - OP
Thanks Meter 279
Posts: 779
Join Date: Jul 2011
Location: Montreal
Default Quick Root Command references

Nexus Images: https://developers.google.com/androi...s/images#mysid
CWM: http://www.clockworkmod.com/rommanager/
Superuser: http://hosted.androidsu.com/superuser/
SuperSU: http://download.chainfire.eu/205/SuperSU/

Root Device
1) Unlock the bootloader (if locked):
Code:
adb reboot bootloader
fastboot oem unlock
2) Install Supersuer + Root (match the file names with the ones downloaded):
Code:
adb push Superuser-3.1.3-arm-signed.zip /sdcard/
adb reboot bootloader
fastboot boot recovery-clockwork-6.0.1.0-maguro.img
Flash Superuser: On device, select "install zip from sdcard", then "choose zip from sdcard" and select "Superuser-3.1.3-arm-signed.zip". Confirm install, then "+++++Go Back+++++" and "reboot system now".

3) Lock the bootloader (optional):
Code:
adb reboot bootloader
fastboot oem lock
Stock Device
1) Unlock the bootloader (if locked):
Code:
adb reboot bootloader
fastboot oem unlock
2) Install the image files (match the file names with the ones downloaded).
Commands are listed inside flash-all.sh shell script, validate them:
Code:
adb reboot bootloader
fastboot flash bootloader bootloader-maguro-primelc03.img
fastboot reboot-bootloader
fastboot flash radio radio-maguro-i9250xxlf1.img
fastboot reboot-bootloader
fastboot -w update image-takju-jro03c.zip
3) Lock the bootloader:
Code:
adb reboot bootloader
fastboot oem lock
Backup Device
Code:
adb backup -apk -shared -all -f backup.ab
Floren Munteanu
Axivo Inc.
The Following 12 Users Say Thank You to TECK For This Useful Post: [ Click to Expand ]
 
ac3theone
Old
#3  
ac3theone's Avatar
Senior Member
Thanks Meter 142
Posts: 774
Join Date: Jan 2012
Location: Brooklyn, NY

 
DONATE TO ME
Quote:
Originally Posted by TECK View Post
Nexus Images: https://developers.google.com/android/nexus/images
CWM: http://www.clockworkmod.com/rommanager/
Superuser: http://hosted.androidsu.com/superuser/

Root Device
1) Unlock the bootloader (if locked):
Code:
adb reboot bootloader
fastboot oem unlock
2) Install Supersuer + Root (match the file names with the ones downloaded):
Code:
adb push Superuser-3.1.3-arm-signed.zip /sdcard/
adb reboot bootloader
fastboot boot recovery-clockwork-6.0.1.0-maguro.img
Flash Superuser: On device, select "install zip from sdcard", then "choose zip from sdcard" and select "Superuser-3.1.3-arm-signed.zip". Confirm install, then "+++++Go Back+++++" and "reboot system now".

3) Lock the bootloader (optional):
Code:
adb reboot bootloader
fastboot oem lock
Stock Device
1) Unlock the bootloader (if locked):
Code:
adb reboot bootloader
fastboot oem unlock
2) Install the image files (match the file names with the ones downloaded).
Commands are listed inside flash-all.sh shell script, validate them:
Code:
fastboot reboot-bootloader
fastboot flash bootloader bootloader-maguro-primelc03.img
fastboot reboot-bootloader
fastboot flash radio radio-maguro-i9250xxlf1.img
fastboot reboot-bootloader
fastboot -w update image-takju-jro03c.zip
3) Lock the bootloader:
Code:
adb reboot bootloader
fastboot oem lock
This is nice I wish this was around 2 weeks earlier when I got this phone this would have made setting up a lot easier. This deserves to be sticky

Sent from my Galaxy Nexus using Tapatalk 2
Phones:
-HTC Mytouch 4g Slide
-Samsung Galaxy S2 T-989
-Samsung Galaxy Nexus GT- I9520
-Boost Mobile Samsung Transform Ultra
 
TECK
Old
#4  
TECK's Avatar
Axivo Developer - OP
Thanks Meter 279
Posts: 779
Join Date: Jul 2011
Location: Montreal
I added also a quick Howto for the Android SDK setup in Windows 64bits. Lots of crazy info out there on the Internet so I said might as well post it so others can do it right in their computers.
Floren Munteanu
Axivo Inc.
The Following User Says Thank You to TECK For This Useful Post: [ Click to Expand ]
 
cortez.i
Old
(Last edited by cortez.i; 19th August 2012 at 03:37 AM.)
#5  
cortez.i's Avatar
Senior Member
Thanks Meter 207
Posts: 2,309
Join Date: Dec 2005
Location: north texas
Quote:
Originally Posted by TECK View Post
I added also a quick Howto for the Android SDK setup in Windows 64bits. Lots of crazy info out there on the Internet so I said might as well post it so others can do it right in their computers.
glad i came across this post. I'm going to use your instructions to return my daughter's GSM Galaxy Nexus to stock JB so we can determine if the proximity sensor is bad or if it's due to the other JB ROMs i've put on her phone. right now, the proximity sensor does not turn the screen off when she places the phone to her ear during phone calls.

question: i prefer not to overwrite the CWM recovery, so i'm planning to remove the recovery.img from the image-yakju-jro03c.zip file before updating via fastboot. next i'll reboot to recovery and flash the superuser zip file to gain ROOT access. my question is this: will removing the recovery img cause the update via fastboot to fail? thanks to anyone who replies to my question.
d.cortez || HTC One (M8) || SGN 3 || Nexus 7 (LTE)
"My life has no purpose, no direction, no aim, no meaning, and yet I'm Happy. I can't figure it out. What am I doing right?" --Snoopy
 
TECK
Old
(Last edited by TECK; 20th August 2012 at 06:29 PM.)
#6  
TECK's Avatar
Axivo Developer - OP
Thanks Meter 279
Posts: 779
Join Date: Jul 2011
Location: Montreal
I would simply flash the entire stock image without skipping any files. Then temporarily flash back the CWM, just to keep the phone stock.
Code:
adb reboot bootloader
fastboot boot recovery-clockwork-6.0.1.0-maguro.img
This will not write CWM to the phone, but rather use it once to bypass the stock recovery. Personally, I'm only interested to root the device and will not install custom ROM's. But even if you do install custom ROM's, you rarely need CWM... and if you do, you will work near your computer where you have access to adb.
Floren Munteanu
Axivo Inc.
The Following 2 Users Say Thank You to TECK For This Useful Post: [ Click to Expand ]
 
infazzdar
Old
#7  
infazzdar's Avatar
Senior Member
Thanks Meter 232
Posts: 1,140
Join Date: Dec 2010

 
DONATE TO ME
This is a splendid guide!
Absolutely what all new Androiders need.

Sent from my Transformer TF101 using Tapatalk 2
Droid X -- Transformer -- Galaxy Nexus
If I helped you, consider donating!
Feel free to PM me with any questions!
 
slivingston
Old
(Last edited by slivingston; 11th September 2012 at 09:32 PM.)
#8  
Junior Member
Thanks Meter 0
Posts: 22
Join Date: Jun 2012
Did everything you said and got to the point where I was testing those commands, and it says devices attached but my device isnt listed. I was still in boootloader and fastboot usb was attached. is that correct? any ideas? I do have CM9 installed and there are plenty of options regarding root access.
 
bozint
Old
#9  
bozint's Avatar
Member
Thanks Meter 8
Posts: 72
Join Date: May 2012
Location: Skopje
Quote:
Originally Posted by TECK View Post
To test the setup, run few basic commands:
Code:
adb devices
adb reboot bootloader
fastboot reboot
Mate, when I type "adb devices" I am getting an error saying that "'adb' is not recognized as an internal or external command, operable program or batch file"

I installed Android SDK and Java SE JDK and it all went well. I installed the drivers and when in fastboot mode, I get "Samsung Galaxy Nexus BootLoader Interface" in Device Manager, which I think is what I should be getting.

Would you know what is it that I am missing? Could it be something that I haven't installed from the Android SDK? Thanks again for the tutorial.
Nexus 4 16GB 4.4.3 (KTU84L). SuperSU Rooted v1.94.
Baseband: 2.0.1701.02
Bootloader: MAKOZ30d
Kernel: Stock
Recovery: TWRP 2.7.0.0
 
geoffcorey
Old
#10  
geoffcorey's Avatar
Senior Member
Thanks Meter 477
Posts: 2,157
Join Date: Apr 2010
You need to change to the directory in which you installed the SDK
So like:
cd <insert directory here and remove the arrow brackets>

Sent from my Galaxy Nexus using Tapatalk 2
"If we amplify everything, nothing is heard."

The Following User Says Thank You to geoffcorey For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes