Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,729,145 Members 41,949 Now Online
XDA Developers Android and Mobile Development Forum

Diagnosing USB Driver and ADB issues in Windows

Tip us?
 
MaxRabbit
Old
(Last edited by MaxRabbit; 6th November 2013 at 07:06 AM.)
#1  
MaxRabbit's Avatar
Senior Member - OP
Thanks Meter 194
Posts: 711
Join Date: Oct 2010
Location: Austin
Prompt Diagnosing USB Driver and ADB issues in Windows

Are you getting errors like "device not found" or "device offline" while trying to run ADB commands? Here's a quick way to troubleshoot your problem on Windows.

Steps
1. Ensure USB Debugging is enabled in Developer Options.
2. Verify current Google USB Driver is installed and that Device Manager is using that driver.
3. Update to latest version of ADB.
  • 1. Ensure USB Debugging is enabled in Developer Options.
Enable Developer Options by going to Settings -> About Phone and tapping on "Build Number" multiple repeated times. You will be greeted with "You are a developer."

Now, under Settings -> Developer Options, ensure you check the box for "USB debugging."
  • 2. Verify current Google USB Driver is installed and Device Manager is using that driver.
You may skip this step if Device Manager lists your phone as "Android Phone -> Android Composite ADB Interface." If it does not, this is likely your root cause.

Go to the Google USB Driver page and download the latest driver directly from Google. Extract the zip file to a folder you know and will remember in the future.

Open up Device Manger in Windows with your Nexus 5 connected. Whatever your Nexus 5 is currently detected as, right click on it and select Properties. Then, in the Driver tab, hit "Uninstall." If available, select "Delete the driver software for this device." and hit "OK." It will remove the old drivers.

Restart your computer.

After restarting, reconnect your Nexus 5. It should be recognized as an unknown device in the Device Manager. (If it isn't, try the previous driver deletion steps again.)

Right click on the unknown Nexus 5 device, choose Properties, and in the Driver tab again select "Update driver." Browse your computer manually by putting in the path to the new Google USB Drivers you unzipped to a folder of your choice in the beginning of this step. Choose next and your drivers should install! You'll know everything completed successfully when you see the phone listed under "Android Phone -> Android Composite ADB Interface" in Device Manager.

This is the most finicky process, so don't be afraid to reboot your computer a time or two and repeat these steps if they don't work on the first try.
  • 3. Update to latest version of ADB.
This is a crucial step. The new version of ADB is required to work with the "USB debugging authorizations" setting.

Perhaps you know how to update ADB, in which case, just do it. However, here's a detailed manual approach to download JUST the adb suite from the SDK:
Go to the Google Android SDK website and choose "Use An Existing IDE" and click the "Download the SDK Tools for Windows." This will allow you to download only an 80 MB file rather than the whole 400 MB suite.

Install the SDK tools exe to a folder of your choosing.

Run SDK Manager and uncheck everything except for "Android SDK Platform-tools." This is the ADB and Fastboot bundle. Install that.

Navigate to your SDK Path as indicated at the top of your Android SDK Manager window. You will now see a freshly downloaded platform-tools folder containing ADB.exe, Fastboot.exe, and a host of other files. That folder is now your updated, portable ADB tools folder. You can move it anywhere you like as long as you run ADB from a command prompt window set to that directory.

After you've followed these procedures, running "ADB Devices" should trigger a prompt on your device to accept the RSA fingerprint of your computer. Accept it, and now all should be working as intended!

Questions? Ask below!
Addicted to Cyanogenmod
Stock voice recorder leave you wanting? Literally hear my review of the best Android voice recorder.
"I came here to drink milk and kick ass... And I've just finished my milk."
The Following 32 Users Say Thank You to MaxRabbit For This Useful Post: [ Click to Expand ]
 
MaxRabbit
Old
(Last edited by MaxRabbit; 6th June 2014 at 11:32 PM.)
#2  
MaxRabbit's Avatar
Senior Member - OP
Thanks Meter 194
Posts: 711
Join Date: Oct 2010
Location: Austin
Default Crowd-sourced solutions.

Windows 8 Diagnosis
Quote:
Originally Posted by Yorus
The following worked for me, since all of the suggestions mentioned here didn't work for me:
If you use a Windows 8.1 enterprise N or KN edition, install the Microsoft Media Feature Pack :
http://support.microsoft.com/kb/2929699/en
Sounds too simple to be true but work instantly for me.
Hope it works you some of the people here looking for a solution
Setting up ADB and Fastboot commands to work from ANY path (credit to original author in quote).
Quote:
Originally Posted by Chromium_ View Post
Setup, Preparation and Prerequisites
  • ADB and Fastboot Installation
  1. Download the full Android SDK here (scroll to the bottom of the page>DOWNLOAD FOR OTHER PLATFORMS>SDK Tools Only) or get a slimmed version containing only the essential components here (Thanks @El Daddy)
  2. Extract the zip and place the android-sdk-windows folder on the root of your hard drive. (the path should be like this: C:\android-sdk-windows)
    **If you chose to download the slimmed sdk skip to step 5**
  3. Only if you downloaded the full sdk: Go into the folder and run SDK Manager.exe. Install the following packages (there are a total of 4 packages):
    - Tools > Android SDK Tools, Android SDK Platform-tools
    - Extras > Android Support Library, Google USB Driver

  4. Only if you downloaded the full sdk: Go back into the android-sdk-windows directory, and you should see a new folder named platform-tools. If not, repeat the step above.
  5. Open a command prompt window and run "sysdm.cpl" (without the quotes) and a new window should popup. Go to the Advanced tab > Environmental Variables
  6. Now focus your attention to the System variables box (the lower box). Scroll down and look for the Path variable > highlight it > click Edit > go all the way to the end of the Variable value text box, and paste the following entry:
  7. Code:
    ;C:\android-sdk-windows\platform-tools
    (OR WHATEVER PLATFORM-TOOLS DIRECTORY YOU PICKED)
  8. Click OK then close all of the System Properties windows
  9. You should now be able to use adb/fastboot commands no matter what location your command prompt is in. To confirm that it is indeed working, open a command prompt window and enter "adb version" (without the quotes). If it displays "Android Debug Bridge version x.x.xx" it is working. If it is gives an error saying that adb is not a recognized command, it has not been successful. Carefully repeat the steps above if this is the case.
The importance of being careful with your command choices.
Quote:
Originally Posted by MkVsTheWorld View Post
"Be sure to use the CORRECT adb/fastboot commands, double-check the path on all commands, and double-check the existence of each file you are working with."

I hate to admit this, but I couldn't figure out why nothing was appearing in the device list when I did "adb devices", while the phone was in Fastboot. I did everything from A-Z and tore my hair out for 30 minutes until it hit me, my phone's in Fastboot. I've been messing with Android for 3+ years and made a newbie mistake lol.
Fixing MTP device not showing up after installing ADB drivers.
Quote:
Originally Posted by dbareis View Post
I'm not sure what happened but on my WINDOWS 7 (64 bit) OS I had to modify "%WINDIR%\inf\wpdmtp.inf" as shown here: "http://forum.xda-developers.com/show...&postcount=937". I then uninstall the device and drivers and performed a hardware scan to get it to work. I also added a "...PID_4EE2&MI_01" line but I am not positive that was required.

Hope that helps someone.
Quote:
Originally Posted by Whyzor View Post
You should also mention what worked for me in post #16 (& confirmed by a few others in other threads). That is to toggle Settings - Storage - USB Connection type from Camera to Mass storage & also the debugging mode on & off.
Quote:
Originally Posted by Ashcunak View Post
Op might wanna tack this onto the bottom of the main post as a last resort for folks to "start over" and be sure they have no old drivers installed.

http://www.nirsoft.net/utils/usb_devices_view.html

i had to use this program (right click run as admin if permissions are set) to remove EVERY single android related driver in order to get mine working.. turns out i had so many old ones in my system and some i couldn't remove from the device manager, the buttons wouldn't become click able..
Quote:
Originally Posted by CrazyIvan View Post
I've tried everything and cannot get the authorization prompt to pop up on my Nexus5 so when I run adb devices the phone shows up as "unauthorized". Any suggestions? This is with updated sdk and USB drivers. Device manager shows phone as "Android Phone->Android Composite ADB Interface" and "Portable Device->Nexus 5". Tried toggling between MTP/PTP, USB Debugging on/off, stopping and starting the adb server (latest version 1.0.31).

Thanks in advance!

EDIT: Finally got the ba$tard! Run this for some adb debug logging:

adb kill-server
set ADB_TRACE=all
adb nodaemon server

Go and look back at the output from the start for any errors. In my case it couldn't mkdir in c:\users\administrator, which for me doesn't exist. I changed the Windows environment variable "ANDROID_SDK_HOME" to point to "C:\users\<my account dir>", closed the DOS window, re-ran the commands and I got prompted for the permission on my phone. Yee ha! Now I can fire up hello world with the SDK on my phone. Praise be to Google search for turning up this thread that told me about the debug logging.
Quote:
Originally Posted by SonicAngel View Post
I just rooted my N5 (using the guide on this forum so I had no other drivers other than Google's SDK) and after unlocking my bootloader windows did not recognize my phone so I couldn't go further. Upon checking device manager I saw something called "AOSP on Hammerhead", a quick online search found a lot of very complicated answers (uninstall all drivers, restart, install adb drivers was one example).

Instead of all that I just right clicked "AOSP on Hammerhead", chose Update Driver, manually choose driver, went to "Android bootloader", chose the default driver from "Google inc" manually and that for some reason worked.

I figured this might help someone since the other solutions I found really were very long.
Questions? Ask below!
Addicted to Cyanogenmod
Stock voice recorder leave you wanting? Literally hear my review of the best Android voice recorder.
"I came here to drink milk and kick ass... And I've just finished my milk."
The Following 4 Users Say Thank You to MaxRabbit For This Useful Post: [ Click to Expand ]
 
KTT16
Old
#3  
KTT16's Avatar
Senior Member
Thanks Meter 213
Posts: 1,080
Join Date: Aug 2011
Location: Hayward
Quote:
Originally Posted by MaxRabbit View Post
Reserved.

Questions? Ask below!
Hey man, thanks for the tutorial, I seem to still have trouble with this. Followed all the steps, even reset the device, to no avail. Anyone else having issues?
 
MaxRabbit
Old
#4  
MaxRabbit's Avatar
Senior Member - OP
Thanks Meter 194
Posts: 711
Join Date: Oct 2010
Location: Austin
Quote:
Originally Posted by KTT16 View Post
Hey man, thanks for the tutorial, I seem to still have trouble with this. Followed all the steps, even reset the device, to no avail. Anyone else having issues?
You're welcome! What shows up in your Device Manager now?
Addicted to Cyanogenmod
Stock voice recorder leave you wanting? Literally hear my review of the best Android voice recorder.
"I came here to drink milk and kick ass... And I've just finished my milk."
The Following User Says Thank You to MaxRabbit For This Useful Post: [ Click to Expand ]
 
KTT16
Old
#5  
KTT16's Avatar
Senior Member
Thanks Meter 213
Posts: 1,080
Join Date: Aug 2011
Location: Hayward
Quote:
Originally Posted by MaxRabbit View Post
You're welcome! What shows up in your Device Manager now?
Hey thanks for the quick reply! I got it to work finally via: http://forum.xda-developers.com/show....php?t=2507905

Great tips and tutorial though..so stoked to have this phone!
The Following User Says Thank You to KTT16 For This Useful Post: [ Click to Expand ]
 
MaxRabbit
Old
#6  
MaxRabbit's Avatar
Senior Member - OP
Thanks Meter 194
Posts: 711
Join Date: Oct 2010
Location: Austin
Quote:
Originally Posted by KTT16 View Post
Hey thanks for the quick reply! I got it to work finally via: http://forum.xda-developers.com/show....php?t=2507905

Great tips and tutorial though..so stoked to have this phone!
What step exactly did you take that fixed it?
Addicted to Cyanogenmod
Stock voice recorder leave you wanting? Literally hear my review of the best Android voice recorder.
"I came here to drink milk and kick ass... And I've just finished my milk."
 
KTT16
Old
#7  
KTT16's Avatar
Senior Member
Thanks Meter 213
Posts: 1,080
Join Date: Aug 2011
Location: Hayward
Quote:
Originally Posted by MaxRabbit View Post
What step exactly did you take that fixed it?
Open a command prompt window and run "sysdm.cpl" (without the quotes) and a new window should popup. Go to the Advanced tab > Environmental Variables
Now focus your attention to the System variables box (the lower box). Scroll down and look for the Path variable > highlight it > click Edit > go all the way to the end of the Variable value text box, and paste the following entry:

Code:
;C:\android-sdk-windows\platform-tools

Click OK then close all of the System Properties windows
You should now be able to use adb/fastboot commands no matter what location your command prompt is in. To confirm that it is indeed working, open a command prompt window and enter "adb version" (without the quotes). If it displays "Android Debug Bridge version x.x.xx" it is working. If it is gives an error saying that adb is not a recognized command, it has not been successful. Carefully repeat the steps above if this is the case.
The Following 2 Users Say Thank You to KTT16 For This Useful Post: [ Click to Expand ]
 
MaxRabbit
Old
#8  
MaxRabbit's Avatar
Senior Member - OP
Thanks Meter 194
Posts: 711
Join Date: Oct 2010
Location: Austin
Quote:
Originally Posted by KTT16 View Post
Open a command prompt window and run "sysdm.cpl" (without the quotes) and a new window should popup. Go to the Advanced tab > Environmental Variables
Now focus your attention to the System variables box (the lower box). Scroll down and look for the Path variable > highlight it > click Edit > go all the way to the end of the Variable value text box, and paste the following entry:

Code:
;C:\android-sdk-windows\platform-tools

Click OK then close all of the System Properties windows
You should now be able to use adb/fastboot commands no matter what location your command prompt is in. To confirm that it is indeed working, open a command prompt window and enter "adb version" (without the quotes). If it displays "Android Debug Bridge version x.x.xx" it is working. If it is gives an error saying that adb is not a recognized command, it has not been successful. Carefully repeat the steps above if this is the case.
Ahh, your problem with my instructions then were that you weren't running ADB from inside the platform-tools folder
Addicted to Cyanogenmod
Stock voice recorder leave you wanting? Literally hear my review of the best Android voice recorder.
"I came here to drink milk and kick ass... And I've just finished my milk."
 
KTT16
Old
#9  
KTT16's Avatar
Senior Member
Thanks Meter 213
Posts: 1,080
Join Date: Aug 2011
Location: Hayward
Definitely! I seriously got frustrated for a second and forgot how to read!

Sent from my Nexus 5 using XDA Premium 4 mobile app
LG Nexus 5
ROM: Paranoid Android v4.43, Unlocked, Rooted
Kernel: Franco r57
 
JonnyRock
Old
#10  
Junior Member
Thanks Meter 0
Posts: 2
Join Date: Sep 2010
Default Not showing up as removable storage

Hi, maybe you can help me.

Last night I unlocked my N5 using CF-Root, and flashed TWRP using Flashify. However, when I plug my N5 into my home computer it doesn't ever show up under 'My Computer' with other removable storage devices. It is present in the device manager under 'Android Phone -> Google Nexus ADB Interface'.

I've tried restrarting my computer, uninstalling the drivers and reinstalling them. Developer mode is enabled and if I switch from MTP to PTP then is shows up under removable storage, but I only have access to the DCIM folder. Switching back to MTP makes it disappear.

On my work computer it shows up correctly no problem.

My personal computer has had multiple installations of WugFresh Root toolkit and ADB/SDK files for my previous Galaxy Nexus and Nexus 7 but I uninstalled most of that before setting up the N5.

Thanks!

Tags
adb, drivers, fastboot, tutorial
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes