Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

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

OP TECK

13th August 2012, 04:16 AM   |  #1  
TECK's Avatar
OP Axivo Developer
Flag Montreal
Thanks Meter: 286
 
10101010101010101010
779 posts
Join Date:Joined: Jul 2011
More
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.
Last edited by TECK; 5th December 2012 at 01:36 AM.
The Following 39 Users Say Thank You to TECK For This Useful Post: [ View ]
13th August 2012, 09:04 AM   |  #2  
TECK's Avatar
OP Axivo Developer
Flag Montreal
Thanks Meter: 286
 
10101010101010101010
779 posts
Join Date:Joined: Jul 2011
More
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
Last edited by TECK; 24th August 2012 at 08:34 AM.
The Following 12 Users Say Thank You to TECK For This Useful Post: [ View ]
14th August 2012, 05:22 AM   |  #3  
ac3theone's Avatar
Senior Member
Brooklyn, NY
Thanks Meter: 151
 
819 posts
Join Date:Joined: Jan 2012
Donate to Me
More
Quote:
Originally Posted by TECK

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
14th August 2012, 06:18 AM   |  #4  
TECK's Avatar
OP Axivo Developer
Flag Montreal
Thanks Meter: 286
 
10101010101010101010
779 posts
Join Date:Joined: Jul 2011
More
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.
The Following User Says Thank You to TECK For This Useful Post: [ View ]
19th August 2012, 04:34 AM   |  #5  
cortez.i's Avatar
Senior Member
Flag north texas
Thanks Meter: 219
 
1010
2,359 posts
Join Date:Joined: Dec 2005
More
Quote:
Originally Posted by TECK

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.
Last edited by cortez.i; 19th August 2012 at 04:37 AM.
20th August 2012, 07:24 PM   |  #6  
TECK's Avatar
OP Axivo Developer
Flag Montreal
Thanks Meter: 286
 
10101010101010101010
779 posts
Join Date:Joined: Jul 2011
More
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.
Last edited by TECK; 20th August 2012 at 07:29 PM.
The Following 2 Users Say Thank You to TECK For This Useful Post: [ View ]
20th August 2012, 07:33 PM   |  #7  
infazzdar's Avatar
Senior Member
Thanks Meter: 232
 
1,140 posts
Join Date:Joined: Dec 2010
Donate to Me
More
This is a splendid guide!
Absolutely what all new Androiders need.

Sent from my Transformer TF101 using Tapatalk 2
11th September 2012, 10:30 PM   |  #8  
Junior Member
Thanks Meter: 1
 
23 posts
Join Date:Joined: 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.
Last edited by slivingston; 11th September 2012 at 10:32 PM.
2nd October 2012, 05:49 PM   |  #9  
bozint's Avatar
Member
Flag Skopje
Thanks Meter: 8
 
77 posts
Join Date:Joined: May 2012
More
Quote:
Originally Posted by TECK

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.
2nd October 2012, 06:49 PM   |  #10  
geoffcorey's Avatar
Senior Member
Thanks Meter: 479
 
2,157 posts
Join Date:Joined: Apr 2010
More
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

The Following User Says Thank You to geoffcorey For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes