libwdi icon indicating copy to clipboard operation
libwdi copied to clipboard

libwdi Zadig and libusb-win32 1.3.0.1 release

Open mcuee opened this issue 2 years ago • 4 comments

Somehow libwdi/Zadig can not detect the proper version number of libusb-win32 1.3.0.0 snapshot release. Strage.

There are no issues with libusb-win32 1.2.7.3 or 1.2.7.4.

Screenshot 2023-10-10 185842

mcuee avatar Oct 10 '23 10:10 mcuee

This is invalid. I believe it has been fixed in libusb-win32 git HEAD. https://github.com/mcuee/libusb-win32/commit/241e2efc2963d9bc2672c37d40f9c9bfee6a2b99

mcuee avatar Oct 10 '23 11:10 mcuee

But it is still a bit strange how libwdi detect the libusb-win32 version. I thought it uses libusb0.sys and not libusb0.dll.

mcuee avatar Oct 10 '23 11:10 mcuee

I have to re-open this issue as it still exists with libusb-win32 1.3.0.1 release. So looks like libwdi can not recognize libusb-win32 1.3.0.x version.

@pbatard and @dontech Please take a look. Thanks.

Capture_libusbwin32

mcuee avatar Nov 08 '23 02:11 mcuee

@dontech

Please help to see if you have the same issue or not. Thanks.

mcuee avatar Jan 05 '24 10:01 mcuee

@mcuee how do you rebuild zadig? Just want to make sure I do it the same way,

dontech avatar Feb 12 '24 13:02 dontech

@dontech, @mcuee,

Sorry for not having had a chance to look into this. The issue is open so I am planning to do so, but I'm afraid this is not a high priority.

Zadig is built from GitHub actions, so if you clone the project, you should be able to just run the actions script and get the VS2022 artifacts that contain a Zadig executable. Alternatively, you can take a look at https://github.com/pbatard/libwdi/wiki/Compiling-and-debugging-libwdi-or-Zadig which is are beginner level instructions on how to install Visual Studio to build Zadig.

pbatard avatar Feb 12 '24 13:02 pbatard

@dontech

I use VS2022 and just edit config.h to point out to the right locations for my system.

Same issue if I use github action (which uses VS2022). You can checkout the following run. https://github.com/mcuee/libwdi/actions/runs/7872857879

mcuee avatar Feb 12 '24 14:02 mcuee

The issue still exists with libusb-win32 1.3.0.2 release. https://github.com/mcuee/libusb-win32/releases/tag/snapshot_1.3.0.2

mcuee avatar Feb 17 '24 14:02 mcuee

image

Unable to reproduce. Visual Studio 2022 and version 1.3.0.2

dontech avatar Feb 18 '24 16:02 dontech

I am pretty sure this is a libwdi/zadig problem. After rebuilding a few times i got this:

image

I think this is a build problem of some kind

dontech avatar Feb 18 '24 17:02 dontech

OK I found out there are 2 problems:

  1. libwdi has an obvious bug in "embedder_files.h". This causes Zadig/libwdi to use the "install-filter.exe" to get the version info instead of the real DLL it was supposed to use (the "reuse" entries point to a previous entry that is not the same).

  2. libusb-win32 has another obvious bug that causes the install-filter.exe to not have any resources, which should have contained the version info. I will fix this in libusb-win32: https://github.com/mcuee/libusb-win32/issues/64

For libwdi I have added it to my existing pull request:

@pbatard Please pull this: https://github.com/pbatard/libwdi/pull/314

dontech avatar Feb 18 '24 19:02 dontech

@pbatard I updated the workflows to match the latest libusb0, so we could get the ARM64 binaries

dontech avatar Feb 18 '24 21:02 dontech

For libwdi I have added it to my existing pull request:

@pbatard Please pull this: #314

I can confirm that PR #314 fixes this issue. Tested with latest libusb-win32 1.3.0.2 release.

  • #314

Capture_libusbwin32_libwdi

mcuee avatar Feb 19 '24 02:02 mcuee

Either this fixes it or the change in libusb0 should have fixed this. Can be closed now @mcuee

dontech avatar Feb 23 '24 09:02 dontech