Tuesday, August 5, 2014

Removing libwdi drivers

Just a quick tech note.

I needed to root my android phone and change of usb drivers was needed.
Like many of other folks, I've used the libwdi package with a "Zadig" tool for manipulating the drivers. Yeah.. I've accidentaly change the driver for my Logitech Mouse and from that moment it didn't work anymore.

The zadig author points that restoring the original windows signed driver is easy as uninstalling the device using the "Device Manager" with "Remove driver files.." option checked.
It didn't work for me as I manipulated the drivers using Zadig couple times and in my opinion the option mentioned above restores drivers to the previous one.. libusb-wind32 - libusbK - libusb-win32 and so on in my case.

So, if  you are trying to remove libwdi installed USB drivers (libusbK, libusb-win32, winusb) with zadig, and it returns error you can try the pnputil.exe tool. It's included with windows.

It's easy to achieve what you want with:

1. List all 3rd party inf packages by:
# pnputil.exe -e > somefile.txt

2. Then look for "libwdi" string in somefile.txt

Published name :            oem134.inf
Driver package provider :   libusbx.org
Class :                     Urządzenia uniwersalnej magistrali szeregowej
Driver date and version :   06/02/2012 6.1.7600.16385
Signer name :               USB\VID_046D&PID_C019 (libwdi autogenerated)

Now all you need is the command below for reach entry found:

# pnptuil.exe -d oem134.inf

PS. Make sure the devices using the drivers above are not connected and that you running commands with admin priveleges assigned. (command prompt in admin mode).

No comments: