commaai / flash

https://flash.comma.ai
5 stars 14 forks source link

Use Zadig WinUSB Driver Install instead of Google #21

Closed nelsonjchen closed 10 months ago

nelsonjchen commented 11 months ago

While it is possible to use Google's WinUSB driver to connect to a comma device, such a step requires successfully getting the device into fastboot first, connecting it to a Windows machine, and then force "Update Driver" to a driver from the package such as "Android bootloader".

This is a chicken and egg problem on the C3X. The C3X requires some sort of enumeration when determining to boot in fastboot or not. The Windows machine won't enumerate with WinUSB because it doesn't know what to do for the C3X USB PID/VID.

This impasse can be solved with Zadig. Zadig can be used to do the necessary and tricky steps of generating a WinUSB driver package for the C3X to be loaded on the PID/VID of the C3X. The Install Driver button will also do the complicated dance to get the signed driver package installed into Windows.

While there were some thoughts from adeeb on making a zip file with some batch script to do this, so far, from observations on Discord, these manual steps as described in the temporary wiki page for additional flashing issues has not been a hinderance for users who have successfully flashed via Windows:

https://github.com/commaai/openpilot/wiki/Addendums-to-C3-C3X-Flashing

LtDerbs commented 10 months ago

Guys, the Windows unbricking/reflashing instructions will not work until this PR is merged, without going through an additional set of instructions from Discord. I get that Comma3x is a dev kit but cman