Skip to content
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

Not work on windows #3

Closed
AlynxZhou opened this issue Sep 24, 2021 · 12 comments
Closed

Not work on windows #3

AlynxZhou opened this issue Sep 24, 2021 · 12 comments

Comments

@AlynxZhou
Copy link

I am implementing HID over AOAv2 for scrcpy, and I found libusb does not work on Windows (related info is https://libusb-devel.narkive.com/vENuKzdR/getting-the-serial-number-of-the-camera-fails), it cannot open Android device and read infos. Then I found this project which starts android accessory first, and I've built this on Visual Studio 2019, run it. Got the same error that it cannot open device:

 > .\linux-adk.exe -N -d 04E8:6860
Looking for device 04e8:6860
Unable to open device...
Closing USB device

04E8:6860 is for my Galaxy S9+, did you test it for your phone on windows? How do you manage to make libusb work on Windows?

Plus, C macro for Windows is _WIN32, not WIN32.

@gibsson
Copy link
Owner

gibsson commented Sep 24, 2021

Maybe you need to open your terminal as administrator but here linux-adk for Windows works fine.
Can't reproduce on my end.

@AlynxZhou
Copy link
Author

Still not work.

> .\linux-adk.exe -N -d 04E8:6860
Looking for device 04e8:6860
Unable to open device...
Closing USB device

Is there any other operation you do before run it?

@gibsson
Copy link
Owner

gibsson commented Sep 24, 2021

No, actually I confirm that on my end it works fine without admin rights:

linux-adk.exe -d 18d1:4ee7
Looking for device 18d1:4ee7
Device supports AOA 2.0!
Limiting AOA to version 1.0!
Sending identification to the device
 sending manufacturer: Google, Inc.
 sending model: DemoKit
 sending description: Demo ABS2013
 sending version: 2.0
 sending url: https://github.com/gibsson
 sending serial number: 0000000012345678
Turning the device in Accessory mode

Note that this is my libusb revision: f38f09da98acc63966b65b72029b1f7f81166bef

@AlynxZhou
Copy link
Author

maybe it's vendor related? I don't have other phones to test...

1 similar comment
@AlynxZhou
Copy link
Author

maybe it's vendor related? I don't have other phones to test...

@gibsson
Copy link
Owner

gibsson commented Sep 24, 2021

Nah, the whole point of ADK is not to be vendor specific. But is your phone properly recognized in Windows Device Manager?
If not that's probably why libusb can't access it.
Then if it's recognized, are you use you're trying with the same version of libusb?

@AlynxZhou
Copy link
Author

Nah, the whole point of ADK is not to be vendor specific. But is your phone properly recognized in Windows Device Manager?
If not that's probably why libusb can't access it.
Then if it's recognized, are you use you're trying with the same version of libusb?

I have a Samsuna Android Device (or something similiar).

@gibsson
Copy link
Owner

gibsson commented Sep 24, 2021

If you're not answering my questions I can't help you.

@AlynxZhou
Copy link
Author

I mean it's recognized in Device Manager.

I'll try this version tomorrow.

@gibsson
Copy link
Owner

gibsson commented Sep 30, 2021

Do you have an update? If not I'll close this issue as can't repro.

@AlynxZhou
Copy link
Author

Please close it because I am on vacation and cannot try it, I'll reopen if I can try and reproduce it.

@gibsson
Copy link
Owner

gibsson commented Oct 3, 2021

Sounds good, thanks for your feedback

@gibsson gibsson closed this as completed Oct 3, 2021
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

No branches or pull requests

2 participants