Class based USB PNP Driver?


I’m have a popular Android screen recorder app
( and

For security reasons standard Android apps can’t record the screen so a
computer based activation stage is required. I have a multi-platform
activator written in Java and packaged with JWrapper (which has worked
quite well). On Mac and Linux the activator works without much trouble,
but Windows has been quite painful. After a few months of work it now
seem to work on everything from XP to 8.1 that I’ve tested it on and it
seems to work for most people most people who download it, but there’s
still quite a few issues that people have that I’m hoping some of you
might be able to help with

On Windows I need to install a WinUSB driver to access the ADB service
on the Android device. As far as I know every Android vendor uses the
Google supplied driver, which is this:

I’ve a modified version of this containing over three thousand of
VID/PID pairs that I’ve harvested for all the different Android devices
which have tried to activate my software on Windows (yes, really …).

On most devices the the ADB interface is a composite one, but this is
not always true (and sometimes it depends on the USB setting of the
device). However as far as I know it’s always Class 0xff, SubClass 0x42,
Protocol 03.

For various reasons (more on this below) I’d like the replace my three
thousand VID/PID pairs with a pattern like this:

%SingleAdbInterface% = USB_Install, USB\Class_FF&SubClass_42&Prot_03

… but when I try and sign the .inf file with Inf2Cat I get:

B2.6.4.9: All Universal Serial Bus(USB) devices must have VID and PID
sections in the PnP Device ID string. Third-party USB function drivers
must not install through a compatible ID match.

I don’t need to WHQL certify the driver, but I do need it to be signed.
I have a Comodo Code Signing certificate which I am have been able to
successfully cross sign with.

I’ve had a pretty good go at reverse engineering a Inf2Cat compatible
.cdf file I can use to generate a catalog file using MakeCat but the
file hashes generated by MakeCat are different to the ones generated by
Inf2Cat. The .cdf I’m using is:


So is it possible to sign this .inf file? Does anyone have have any
ideas on how to generate a Inf2Cat compatible .cdf file or otherwise
install a class based PNP driver for ADB?

In trying to work out what is going on I generated standard sha1sum
hashes for the files but they didn’t match the ones that either Inf2Cat
or MakeCat were generating so I don’t know what is going on there. If
you’re curious the class pattern driver is here:

One of the other big problems I’m seeing is that my ADB driver is
sometimes being selected as the driver for the top level composite
interface instead of the USB Generic Parent Driver (Usbccgp.sys). When
this happens the composite interface is never enumerated and of course
nothing works. This is one of the reasons why I’m keen to move to the
Class / SubClass / Protocol pattern. Any ideas why this might be happening?