daynix / UsbDk

Usb Drivers Development Kit for Windows
Apache License 2.0
535 stars 142 forks source link

Hide rule unstable #37

Closed xuyongjian closed 7 years ago

xuyongjian commented 7 years ago

Hi Dmitry: With the latest code, hide rule doesn't work sometimes. The device was still loaded by the system with the correct Hardware ID. I have sent the log to your email since I still cannot upload zip files.

dmitryfleytman commented 7 years ago

@xuyongjian, for some reason, I cannot parse your log. My pdb just does not fit. What is your UsbDk version and Windows version?

UsbDkTrace-unhide.etl.zip

xuyongjian commented 7 years ago

New log (win7-32bit, usbdk-1.0.16) sent. Check you email. Thanks!

dmitryfleytman commented 7 years ago

Parsed log is here.

From the log I see that device was reset for a few times. Could you provide exact steps to reproduce the problem?

Could you also collect UsbView dumps for cases when device is hidden as expected and when UsbDK has failed to hide the device?

xuyongjian commented 7 years ago

Steps to reproduce:

  1. Find a new PC that has never installed usbdk before
  2. UsbDkController.exe -i
  3. UsbDkController.exe -P 781 -1 -1 -1 1
  4. Insert device(vid=0x0781) and it is loaded successfully(unhide).
  5. Reboot the system and device still un-hidden.
  6. Uninstall and reinstall the UsbDk, then add the rule, and re-plug the device. The device hides successfully. Usbdk/usbview log has been sent to you mail.
dmitryfleytman commented 7 years ago

Parsed logs:

UsbDkTrace-hide.txt UsbDkTrace-unhide.txt

dmitryfleytman commented 7 years ago

So far the log looks totally fine, not sure what is the problem. Trying to reproduce the issue locally...

Are you installing UsbDk from the official MSI? Why do you need to run "UsbDkController.exe -i"?

dmitryfleytman commented 7 years ago

It looks like I found a simple scenario that reproduces the problem on WIn7 x64:

xuyongjian commented 7 years ago

I once installed UsbDk from the official MSI. Then I saved the "UsbDk Runtime Library" folder so that I could install it from command line the next time, which I thought faster than MSI.

dmitryfleytman commented 7 years ago

Hi, @xuyongjian ,

I think I fixed the problem you observe, could you please get this build and see if it works for you?

You'll need to enable test signing on your machine and uninstall any other UsbDk MSI packages before installing this one.

Thanks, Dmitry

xuyongjian commented 7 years ago

Hi @dmitryfleytman I tested the build on win7-32bit and win10-32bit for a few times, and glad to see that the problem solved! Thanks very much!

dmitryfleytman commented 7 years ago

Fixed by 6f383cb2b90a83f8b8764776b1c57cbceb44a3db