Skip to content

[WIP: needs install.bat] ci: add windows installer #256

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 11, 2025

Conversation

oopsbagel
Copy link
Collaborator

This branch builds the serial binary and rayhunter-check on Windows.

This branch modifies the serial binary, lib's RuntimeMetadata::new(), and conditionally builds lib/diag_device.rs in order to build those artifacts for Windows.

Windows does not support nusb::Device.control_out_blocking

Claim the interface before writing as required on Windows.
- conditionally build diag_device.rs only for unix
- use build time target for runtime metadata on unix
@oopsbagel oopsbagel changed the title ci: add windows installer [WIP: needs install.bat] ci: add windows installer Apr 7, 2025
@oopsbagel
Copy link
Collaborator Author

https://github.com/oopsbagel/rayhunter/actions/runs/14321594079

serial-macos-arm/serial:          Mach-O 64-bit arm64 executable, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL|PIE|HAS_TLV_DESCRIPTORS>
serial-macos-intel/serial:        Mach-O 64-bit x86_64 executable, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL|PIE|HAS_TLV_DESCRIPTORS>
serial-ubuntu-24/serial:          ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=e74ee8195a063df80c950337a629617ab4dcc9ba, for GNU/Linux 3.2.0, stripped
serial-windows-x86_64/serial.exe: PE32+ executable for MS Windows 6.00 (console), x86-64, 5 sections

% wine serial-windows-x86_64/serial.exe 
usage: Z:\...\serial-windows-x86_64\serial.exe [<command> | --root]

Someone with an Orbic and an active windows install (maybe even just a VM?) will have to test to make sure the serial binary actually does root the device.

@cooperq
Copy link
Collaborator

cooperq commented Apr 8, 2025

siiiiiick I will test this out!

@cooperq
Copy link
Collaborator

cooperq commented Apr 11, 2025

Serial script seems to work on windows at least as far as running, unforutnately running any command I get a driver error:

Error: detach_and_claim_interface(1) failed

Caused by: 
        Could not determine driver for interface

This should theoretically be fixed by installing a driver which could be done in the install.ps script so I will look into it.

@cooperq
Copy link
Collaborator

cooperq commented Apr 11, 2025

upon installing the driver the error changes to

Caused by:
    Interface driver is "Modem", not WinUSB

@oopsbagel
Copy link
Collaborator Author

oopsbagel commented Apr 11, 2025

I think it's failing to detach, not claim or use.
edit: nope not true, detach_and_claim_interface should be the same as claim_interface on windows.

@oopsbagel
Copy link
Collaborator Author

Backtraces may be helpful, recompiling with .expect() instead of .context()

@cooperq
Copy link
Collaborator

cooperq commented Apr 11, 2025

Requires a generic WinUSB Driver install which can be accomplished by the tool downloaded from https://zadig.akeo.ie/ but works once that is installed.

Copy link
Collaborator

@cooperq cooperq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@cooperq cooperq merged commit 30e5438 into EFForg:main Apr 11, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants