可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
As of the time of this writing, Google does not provide a USB driver (for Windows) for the Nexus 5. The usual link (http://developer.android.com/sdk/win-usb.html) shows Windows USB drivers for several of the Nexus's line. However, the "Nexus 5" is not included. Note that the Nexus "S" (letter-S, not number-5) IS supported.
Also, from this site, the latest version of the current download is version-8, July-17-2013. When I compare this with its predecessor, version-7, the files are the same.
Until Google fixes this, what are we to do? How can we debug and develop for the Nexus 5?
回答1:
I have a solution.
I updated the file android_winusb.inf to reflect the VID and PID of the Nexus-5. Now it loads the generic driver and supports ADB in Eclipse.
Note, after any previous attempts you may have made, go to Device Manager and update the driver for the "Nexus 5" (showing with a yellow exclamation mark).
You have to navigate over to the USB driver directory, which on my machine was:
C:\Users\Xxxxxxxxx\android-sdk\extras\google\usa_driver
In that directory, edit file android_winusb.inf in both the x86 and amd64 sections and insert one line:
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4EE1&MI_01
This was enough for me to get this to work.
Here is the content of my file:
;
; Android WinUsb driver installation.
;
;
;
; Includes FIX for the Nexus-5 ADB,
; --- jonovos ---
; --- petuniaPlatypus ---
; --- 2013-11-07 ---
;
; By snooping on the USB for the Nexus-5,
; it is known that the VID = 18D1 and PID = 4EE1.
; With this, we insert them into the GENERIC sections bwlow.
;
;
[Version]
Signature = "$Windows NT$"
Class = AndroidUsbDeviceClass
ClassGuid = {3F966BD9-FA04-4ec5-991C-D326973B5128}
Provider = %ProviderName%
DriverVer = 07/09/2013,8.0.0000.00000
CatalogFile.NTx86 = androidwinusb86.cat
CatalogFile.NTamd64 = androidwinusba64.cat
[ClassInstall32]
Addreg = AndroidWinUsbClassReg
[AndroidWinUsbClassReg]
HKR,,,0,%ClassName%
HKR,,Icon,,-1
[Manufacturer]
%ProviderName% = Google, NTx86, NTamd64
[Google.NTx86]
;Google Nexus One
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_0D02
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_0D02&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_4E11
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4E12&MI_01
;Google Nexus S
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_4E21
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4E22&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_4E23
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4E24&MI_01
;Google Nexus 7
%SingleBootLoaderInterface% = USB_Install, USB\VID_18D1&PID_4E40
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4E42&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4E44&MI_01
;Google Nexus Q
%SingleBootLoaderInterface% = USB_Install, USB\VID_18D1&PID_2C10
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_2C11
;Google Nexus (generic)
%SingleBootLoaderInterface% = USB_Install, USB\VID_18D1&PID_4EE0
;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-new-line-added:
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4EE1&MI_01
;;;;;;;;
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4EE2&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4EE4&MI_02
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4EE6&MI_01
[Google.NTamd64]
;Google Nexus One
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_0D02
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_0D02&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_4E11
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4E12&MI_01
;Google Nexus S
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_4E21
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4E22&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_4E23
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4E24&MI_01
;Google Nexus 7
%SingleBootLoaderInterface% = USB_Install, USB\VID_18D1&PID_4E40
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4E42&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4E44&MI_01
;Google Nexus Q
%SingleBootLoaderInterface% = USB_Install, USB\VID_18D1&PID_2C10
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_2C11
;Google Nexus (generic)
%SingleBootLoaderInterface% = USB_Install, USB\VID_18D1&PID_4EE0
;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-new-line-added:
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4EE1&MI_01
;;;;;;;;
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4EE2&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4EE4&MI_02
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4EE6&MI_01
[USB_Install]
Include = winusb.inf
Needs = WINUSB.NT
[USB_Install.Services]
Include = winusb.inf
AddService = WinUSB,0x00000002,WinUSB_ServiceInstall
[WinUSB_ServiceInstall]
DisplayName = %WinUSB_SvcDesc%
ServiceType = 1
StartType = 3
ErrorControl = 1
ServiceBinary = %12%\WinUSB.sys
[USB_Install.Wdf]
KmdfService = WINUSB, WinUSB_Install
[WinUSB_Install]
KmdfLibraryVersion = 1.9
[USB_Install.HW]
AddReg = Dev_AddReg
[Dev_AddReg]
HKR,,DeviceInterfaceGUIDs,0x10000,"{F72FE0D4-CBCB-407d-8814-9ED673D0DD6B}"
[USB_Install.CoInstallers]
AddReg = CoInstallers_AddReg
CopyFiles = CoInstallers_CopyFiles
[CoInstallers_AddReg]
HKR,,CoInstallers32,0x00010000,"WdfCoInstaller01009.dll,WdfCoInstaller","WinUSBCoInstaller2.dll"
[CoInstallers_CopyFiles]
WinUSBCoInstaller2.dll
WdfCoInstaller01009.dll
[DestinationDirs]
CoInstallers_CopyFiles=11
[SourceDisksNames]
1 = %DISK_NAME%,,,\i386
2 = %DISK_NAME%,,,\amd64
[SourceDisksFiles.x86]
WinUSBCoInstaller2.dll = 1
WdfCoInstaller01009.dll = 1
[SourceDisksFiles.amd64]
WinUSBCoInstaller2.dll = 2
WdfCoInstaller01009.dll = 2
[Strings]
ProviderName = "Google, Inc."
SingleAdbInterface = "Android ADB Interface"
CompositeAdbInterface = "Android Composite ADB Interface"
SingleBootLoaderInterface = "Android Bootloader Interface"
WinUSB_SvcDesc = "Android USB Driver"
DISK_NAME = "Android WinUsb installation disk"
ClassName = "Android Device"
回答2:
I just wanted to bring a small contribution, because I have been able to debug on my Nexus 5 device on Windows 8, without doing all of this.
When I plugged it, there wasn't any yellow exclamation mark within Device Manager. So for me, the drivers were OK. But the device was not listed within my Eclipse DDMS. After a little bit of searching, it was just an option to change in the device settings. By default, the Nexus 5 USB computer connection is in MTP mode (Media Device).
What you have to do is:
- Unplug the device from the computer
- Go to Settings -> Storage.
- In the ActionBar, click the option menu and choose "USB computer connection".
- Check "Camera (PTP)" connection.
- Plug the device and you should have a popup on the device allowing you to accept the computer's incoming connection, or something like that.
- Finally, you should see it now in the DDMS and voilà.
I hope this will help!
回答3:
This worked for me:
- Download the Nexus 5 Drivers from Google USB Driver
- Extract the ZIP contents and place all files in a single folder on your desktop.
- Connect your device to your computer.
- Launch the Device Manager on your PC.
- Now you should see the Nexus 5 listed in the hardware list.
- Right-click the ‘Nexus 5′ line and then click on Update Driver Software.
- Next, click the ‘browse my computer’ option.
- In the new window, click on ‘Browse…’ button.
- Go to folder unzipped at step 2. Select the folder where you extract the USB drivers. Click Next.
- Make sure to tick the subfolder box too.
- Now, the Windows installer will search for Nexus 5 drivers. Click Install when asked for permission.
- Wait for the process to complete and then check the Device Manager list to confirm that the installation was successful.
Source: Download and Install Google Nexus 5 USB Drivers (ADB / Fastboot)
回答4:
My Nexus 5 is identyfied by the id = USB\VID_18D1&PID_D001.
Use the Google USB drivers, and modify file android_winusb.inf
. Find the lines:
;Google Nexus (generic)
%SingleBootLoaderInterface% = USB_Install, USB\VID_18D1&PID_4EE0
And add below:
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_D001
Repeat it, because there are two sections to modify, [Google.NTx86]
and [Google.NTamd64]
.
If you continue with problems, try this:
Connect your Nexus 5, go to Device Manager, find the Nexus 5 on "other" and right click. Select properties, details, and in selection list, and select hardware id. Write down the short ID, and modify the line with:
%CompositeAdbInterface% = USB_Install, YOUR_SHORT_ID
回答5:
I found a solution in How I fixed the MTP issues on Nexus 7.
Another way of fixing this on Windows 8: This problem may happen, because you have the Google ADB driver from the Android SDK installed. Windows will pick the ADB driver over the MTP driver, even when USB debugging is turned off on the Nexus 7. It also comes back when you upgrade from Windows 8 to Windows 8.1. To fix this:
- Plug the Nexus 7 in and make sure USB mode is set to MTP
- Run devmgmt.msc
- Locate the ADB driver, which may be under "Android Devices" or "ADB Devices"
- Right-click on it and select "Update driver software"
- "Browse my computer for driver software"
- "Let me pick from a list of device drivers on my computer"
- With "Show compatible hardware" checked you should see two drivers under "Model":
- "Android ADB Interface"
- Either "MTP USB Device" or "Composite USB Device"
- Select "MTP/Composite USB Device" (that is, the one that isn't "Android ADB Interface") and click Next.
- The device should now appear as an MTP device.
It was confirmed working with the Nexus 7 2013 as well.
回答6:
I installed the LG United Mobile Driver, and I was finally able to get ADB to recognize my device.
回答7:
I had similar problems as people here with Nexus 5 on Windows 7. No .inf file edits were needed, my computer was stuck on an old version of the Google USB drivers (7.0.0.1). Windows 7 refused to install the newer version even if I tried to manually select the directory or .inf file. Had to manually delete specific cached .inf files in WINDOWS\inf folder, follow directions here: http://code.google.com/p/android/issues/detail?id=62365#c7
Also be sure USB debugging is turned on in developer options. There's a trick to expose the developer options, click 7 times on the build number at the bottom of the "About Phone" information!
回答8:
There are multiple hardware revisions of Nexus 5. So, the accepted answer doesn't work for all devices (it didn't work for me).
Open Device Manager, right click and Properties. Now go to the "Details" tab
And now select the property "Hardware Ids".
Note down the PID and VID.
Download the Google driver
Update the android_winusb.inf with above VID and PID
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&**PID_4EE1**
Now in Device Manager, find Nexus 5, and update the driver software, and browse to the location where you downloaded.
The driver should be installed, and you should be see the device in ADB.
回答9:
I had the same problem too. In the Device Manager all drivers were OK, but Eclipse couldn't find the device. Even after updating the Google USB drivers with the SDK Manager.
The problem was that I didn't have the developer options enabled. For that I came here, How to Enable Developer Options on the Nexus 5 & KitKat.
Then I had to manualy update the Google USB drivers, see Download and Install Google Nexus 5 USB Drivers (ADB / Fastboot).
After that, my installation of Eclipse recognized my device.
回答10:
I was lost at first as well but found a fairly easy solution. Please note that I did all this on Windows 7 after enabling Developer Options and USB debugging on my Nexus 5 (on 4.4.2), then connecting it to my PC via USB.
If you go to the download link - http://developer.android.com/sdk/win-usb.html - you'll notice at the bottom in step 4, the installation location of the driver. If you then navigate to Devices and Printers from Control Panel and find your device, right-click and go to properties, then click the Hardware tab at the top, click the device displayed that is having issues, click properties, then Change settings. Next, select Update driver, choose the location manually, and choose the directory Google noted as the installation directory, which they noted as \extras\google\usb_driver\
This fixed the problem for me and my Nexus 5 now appears in DDMS.
回答11:
This answer is for those with windows 8.1N! (and maybe all N versions)
The short answer is install Media Feature Pack for N and KN versions of Windows 8.1
Big thanks to Matej Drolc that had it solved in hit blog post here.
回答12:
While Nexus 5 owners wait for a dedicated driver, you could try this driver, which is the one for the LG G2, from LG Electronics' website, since usually USB drivers are not limited to one particular model. This one, for example, seems like a generic USB driver. You are prompted to download the same one for quite a few models on LG Electronics' website.
I hope this helps you ;)
回答13:
The one from Google USB Driver worked fine for me on two machines (Windows 7 x64 on both). Once Windows failed to auto-install the driver, I just right-clicked on the phone in Device Manager, chose "update driver" and gave it the path that I'd unzipped that driver into.
回答14:
After trying the other solutions I was able to send ADB commands to the phone as long as it was booted into Android. However, when the phone was in recovery mode I encountered a new problem, and I would like to contribute my experience here.
While booted into Android the phone installed in Windows as a device named "Nexus 5". After the phone was powered down and booted into recovery mode, the phone was still installed as "Nexus 5", but ADB could not detect the device. I had to manually force the driver from "Nexus 5" to the Google USB driver provided with the SDK or available from Google USB Driver.
The .inf file has three devices available. I used "Android Composite ADB Interface" and everything seems to be working.
回答15:
I am on Windows 8.1, and I tried everything from the other answers and nothing worked. Finally, I decided to try "Pick from a list of drivers" and found "LGE Mobile Sooner Single ADB Interface" under "ADB Interface". ADB.exe was finally able to find the Nexus 5 and sideload 4.4.1.
I hope this helps.
回答16:
Everything else here failed for me initially (it kept coming up as an MTP device no matter how many times I uninstalled and restarted).
However, by going and enabling USB debugging, it worked. Just do this:
- Uninstall the Nexus 5 driver
- Disconnect from the computer
- Enable developer options, see How to Enable Developer Options on the Nexus 5 & KitKat.
- Enable USB debugging: Go to Settings -> Developer Options -> USB Debugging
- Reconnect
- It will probably fail to install all drivers. Go update the drivers as described in other answers.
回答17:
Are you sure it's a driver problem? A device that isn't detected probably has a hardware or firmware problem. If it isn't detected, you won't hear the USB device detected chime. It might not be serious, e.g. some "USB" cables are really only charging cables. Try a USB cable that you know works for data, e.g. the one that came with the phone or one you use for connecting an external hard drive.
回答18:
I'm running Windows 7 Ultimate N version and my Nexus 5 showed up with a yellow exclamation mark in Device Manager and none of the solutions here worked.
I verified that the phone reported itself as:
USB\VID_18D1&PID_4EE1
Which doesn't work with the current (v11) of the Google USB driver.
But after enabling Developer Options and USB debugging on the phone it identified itself as:
USB\VID_18D1&PID_4EE2&MI_01
USB\VID_18D1&PID_4EE2&REV_0232&MI_01
Which installs just fine.
So just enable Developer Options on your phone and retry the device install.