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.
You need to modify 3 things in order to make Google USB driver work for any android phone on any Windows:
android_winusb.inf
fileadb_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:
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
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.