Google Android USB Driver and ADB

123,772

Solution 1

You need to modify 3 things in order to make Google USB driver work for any android phone on any Windows:

  1. Add your device's ID to android_winusb.inf file
  2. Digitally sign the modified driver
  3. Add your device's vendor ID to adb_usb.ini whitelist (no longer required)

and here are the details:

1. Add your device's ID to android_winusb.inf file

the format to add is:

;Comment usually the device name
%SingleAdbInterface% = USB_Install, USB\; here you put VID and PID
%CompositeAdbInterface% = USB_Install, USB\; same as above but add the MI

before I go on, VID is the USB Vendor ID.

How to get the vid and pid : they are in drivers you are merging; but if you don’t have a driver for the device you can get it by opening device manager; then right-click the device – select properties-in new dialog go to Details tab >in property drop menu select hardware ids. for example you see something like:

hid

USB\VID_2207&PID_0000&REV_0222&MI_01
USB\VID_2207&PID_0000&MI_01

take this value for composite adb device and remove MI for single adb device, you get

;MSI WindPad Enjoy 7 plus
%SingleAdbInterface%        = USB_Install, USB\VID_2207&PID_0000
%CompositeAdbInterface%     = USB_Install, USB\VID_2207&PID_0000&REV_0222&MI_01
;

copy this 2 line TWICE , once to [Google.NTx86] section and another to [Google.NTamd64] section

REPEAT for every device you want to support

Now an optional edit for [Strings] Section: edit

[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”

To:

[Strings]
ProviderName                = “Google, Inc.”
SingleAdbInterface          = “MSI ADB Interface”
CompositeAdbInterface       = “MSI Composite ADB Interface”
SingleBootLoaderInterface   = “MSI Bootloader Interface”
WinUSB_SvcDesc              = “MSI USB Driver”
DISK_NAME                   = “MSI WinUsb installation disk”
ClassName                   = “MSI Tablet”

2. Digitally sign the modified driver:

Although the original google usb driver was signed by google , modifying android_winusb.inf will prevent installing it on windows 8 showning an error message hasherror

The hash file is not present in the specified catalog file. The file is likely
corrupt    or the    victim of tampering.

This is only in Windows 8. Windows 7 or earlier do not show this error message. You have to regenerate catalog file (probably with Windows SDK) and sign

Workaround: A workaround for internal tesing is to diable windows signature verification : either temporarily or permanently:

temporarily:

Go to left upper or lower corner of screen to open charms bar and click settings charm.

choose Change PC settings

choose General

Scroll down, and click ‘Restart now’ under ‘Advanced startup’.

Click ‘Troubleshoot’. Click ‘Advanced Options’ Click ‘Windows Startup Settings’ Click Restart.

or

run cmd and type:

shutdown -o -r -t 0

then after restarting choose ‘Disable driver signature enforcement‘ from the list . install your driver before restarting.

Permanently:

press Window+Q

search for cmd

right click cmd

choose run as administrator from action bar

type in cmd:

bcdedit -set loadoptions DISABLE_INTEGRITY_CHECKS
bcdedit -set TESTSIGNING ON

3. Add your device's vendor ID to adb_usb.ini whitelist (no longer required):

adb used to have a hard-coded whitelist of supported Vendor IDs. If your device's vendor was not on the list - the adb was ignoring it completely. To make adb recognize such devices users had to manually add their vendor IDs to %USERPROFILE%\.android\adb_usb.ini - one ID per line.

in the command line:

echo 0x2207 >> "%USERPROFILE%\.android\adb_usb.ini"

Fortunately, Google has removed the VendorID filtering in more recent adb versions. So this step is no longer required.

Finally you can test installation by :

adb kill-server
adb start-server
adb devices

and enabling debugging in developer options on android device

This should restart ADB Server and list devices. If driver is working ok, the device should be listed.

Solution 2

Locate the following file

C:\Users\[your name]\.android\adb_usb.ini

And make the following changes:

# ANDROID 3RD PARTY USB VENDOR ID LIST -- DO NOT EDIT.
# USE 'android update adb' TO GENERATE.
# 1 USB VENDOR ID PER LINE.
0x2207

I added 0x2207 to the file. This number is part of the hardware id, which can be found under the device's hardware information.

Mine was:

USB\VID_2207&PID_0010&MI_01

(I tried executing android update adb, but it did nothing.)

Solution 3

Can you give us a better description and an example of what you are doing? Because all i have to do is put the line in there for the device and then save the file. Now just reconnect the device and it works.

I usually use something similar to this line:

;
;some name for the phone (this seems to be arbitrary)
%CompositeAdbInterface%     = USB_Install, THE_HARDWARE_ID

What i do, is:

  1. plug the device into the computer.
  2. Go to your device manager.
  3. Right click on the device that you plugged up.
  4. Go to properties. Then select Hardware Ids.
  5. Then get that value that is listed there.
  6. Now add it to the line you created in the android_winusb.inf.
  7. Unplug the device and plug back in
  8. Go back to the device manager
  9. Right click on the device and click update or install driver
  10. Select search your computer for the driver
  11. Select the directory Your_Android_SDK_Directory/extras/google/usb_driver/
  12. Press ok

That seems to always work for me, is that what you are doing? Or does this even help?

Solution 4

  1. modify android_winusb.inf
  2. Sign the driver
  3. modify adb

I also instaled generic adb driver from http://adbdriver.com/ and it works.

Solution 5

Driver for Huawei was not found. So I've been using the universal ADB driver:

  • Download this:
  • Extract ADBDriverInstaller and Run the file. Make sure you have connected your device through USB to your computer.
  • A window is displayed.
  • Click Install.
  • A dialog box will appear. It will ask you to press the Restart button.

Before doing that read this link:

(The above. in brief, says to press Restart button in the dialog box. Select Troubleshoot. Select Advance Option. Select Startup Setting. Press Restart. After system's been restarted, on the appearing screen press 7)

  • When PC has been Restarted, Run the ADBDriverInstaller file again. Select your device from the options. Press install.

And it's done :)

Share:
123,772
pqu3
Author by

pqu3

Updated on November 05, 2020

Comments

  • pqu3
    pqu3 over 3 years

    I am looking for guidance or a definitive answer on the following. I want to use the Google Android USB Driver and modify the android_winusb.inf to support any number of Android devices. I was able to add an HTC Evo tablet successfully, but when I try to add LG (Optimus) or Samsung (Indulge, Admire) the driver seems to install fine, but ADB does not see it.

    Can you make the Google Android Driver work for any Android phone? If so... how?

    I have tried many permutations of %SingleAdbInterface% and %CompositeAdbInterface% with the variations of Vendor and Product ids.

  • pqu3
    pqu3 about 12 years
    I have an application that talked to android devices through ADB and I do not want to manage the installation of n drivers. Nor do I want the user to have to worry about installing multiple drivers.
  • pqu3
    pqu3 about 12 years
    I tried the method above for the phone I listed and didn't work. I tried with the HTC Evo and it did. No luck with Samsung or LG.
  • prolink007
    prolink007 about 12 years
    I am not sure what to do beyond this point. This always works for me and i can not re-produce the problem.
  • Vrashabh Irde
    Vrashabh Irde almost 12 years
    What do you do after adding the lines? How does it recognize and install the driver?
  • Vrashabh Irde
    Vrashabh Irde almost 12 years
    After adding the lines what do you do? Do you restart or do you reconnect the device and it recognizes?
  • Sankar V
    Sankar V about 11 years
    Hi! Welcome to stackoverflow. But what is the use of adding an answer which already provided?
  • edisonthk
    edisonthk almost 11 years
    Thank you so much, it saved lot of my time. I forgot that windows 8 needs to disable the signature before install the device. Happy code
  • MuhammadAnnaqeeb
    MuhammadAnnaqeeb almost 11 years
    @edisonTHK You are Welcome!
  • DortGen
    DortGen over 10 years
    Works for WideFly Wireless POS PDA (WF360) folks.. Thank you prolink007, i gave you upvote..
  • MKaama
    MKaama over 8 years
    The answer is poor, but the linked universal driver is great, really universal! Likely, it performs the first two operations automatically.
  • h0ru5
    h0ru5 over 8 years
    Kudos for the answer! does anybody have more info about signing drivers on windows? it seems since win10 you need a EV certificate...?
  • Alex P.
    Alex P. over 7 years
    item#1 is unnecessarily overcomplicated (see ktnr74.blogspot.com/2014/11/… ) and item#3 is outdated (it was not a bug but a feature anyway) so item#2 was the only useful part
  • Basant
    Basant about 6 years
    thank you so much, reference link is sworking for me, +1 for reference link.