Thursday, November 13, 2014

How to make the truly universal adb and fastboot drivers for Windows

There are many internet sites out there offering so-called universal adb driver packs for Windows. Usually it's a repacked Google USB Driver package for Nexus devices with its android_winusb.inf file updated to include various USB VendorID and ProductID combinations. Why it is not truly universal? Because if your device's combination is not included - it obviously will not be supported by such driver package.

Yet Microsoft has made it quite easy to make a truly universal driver. When looking for a proper driver for the new device Windows can match not only by the HardwareID (i.e. combination of USB VendorID, ProductID and optionally InterfaceNumber) but also by CompatibleID (i.e. combination of InterfaceClassID, InterfaceSubClassID and InterfaceProtocolID) which is fortunately the same for all android adb and fastboot interfaces for both simple and composite USB devices.

A few years ago I have made such driver and I have been successfully using it with many different Android devices before I completely switched to linux environment for all my development. Here's how you can make one for yourself:

  • Download the latest Google USB driver package from the link above
  • Unzip the usb_driver folder
  • Open the usb_driver\android_winusb.inf file in a text editor (the Notepad will work)
  • Replace the [Google.NTx86] and [Google.NTamd64] sections with the lines below:

  • [Google.NTx86]
    %SingleAdbInterface% = USB_Install, USB\Class_ff&SubClass_42&Prot_01
    %SingleBootLoaderInterface% = USB_Install, USB\Class_ff&SubClass_42&Prot_03

    %SingleAdbInterface% = USB_Install, USB\Class_ff&SubClass_42&Prot_01
    %SingleBootLoaderInterface% = USB_Install, USB\Class_ff&SubClass_42&Prot_03

  • Save the file and you got yourself a truly universal adb driver!

Do not forget to update %USERPROFILE%\.android\adb_usb.ini if needed.

After installing properly modified driver the following command should say WinUSB in the Service line:

powershell "gwmi Win32_USBControllerDevice | %{[wmi]($_.Dependent)} |
?{$_.CompatibleID -like \"USB\Class_ff^&SubClass_42^&Prot_0?\"} | fl Name,DeviceID,Service"

And here is the whole inf file already modified:

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.