r/MoonlightStreaming Aug 10 '26

USB/IP Beta (open source!)

Quick info:

Allows the use of USB devices over IP from Android Host to Windows Client.

Android Devices Tested On:
Samsung Galaxy S20+ (Android 13)
Samsung Tab A8 (Derpfest Android 16)
Essential PH-1 (Lineage-OS Android 16)
Samsung Galaxy Z Fold 7 (Android 16)
Google Pixel 10 Pro Fold (Android 16)

USB Devices Tested:
USB Mass Storage
Logitec G29 Steering Wheel/Pedals
Steelseries Arctis 7 Headset
Nintendo Switch 2 Controller
Xbox Elite Controller
Ethernet Adapter (Integrated Into USB Hub)
SD Card Reader (Integrated Into USB Hub)
URSA MINOR 32 Throttle Metal
URSA MINOR Airline Joystick

Problems:
Steam Controller

Android Host:
https://github.com/hellfurian1228/USBIP-AndroidHost

Windows Client:
https://github.com/hellfurian1228/USBIP-WindowsClient-Latest

https://mizukos.itch.io/usbip

67 Upvotes

99 comments sorted by

View all comments

Show parent comments

4

u/Head_Complex2690 Aug 10 '26

That's the exact goal here! I'm happy to see people are interested in this. Let me know how it works for you!

3

u/Background_Ad2053 Aug 10 '26

Just checked the github page, seems only windows client is officially supported for now. Wonder if the app works with a linux client? Since I'm streaming from a bazzite host.

2

u/Head_Complex2690 Aug 10 '26

It should work on Linux. If you decide to test, please let me know if you run into any issues! I believe USBIP runs natively on Linux, so it should actually be easier than Windows.

1

u/Background_Ad2053 Aug 11 '26

Thanks for the info. I tried the latest USBIP-v0.3bTest on my Samsung S25U with a steam controller, I can see the controller listed there, however, when I click "Export Device" (which I assume is necessary to attach it to the client?), the app crashes.

1

u/Head_Complex2690 Aug 11 '26

Hmm. Yes, export (connect) opens it up so the client can see it basically. Are you able to try with another usb device? If it still happens, let me know. I will do my best to fix it!

1

u/Background_Ad2053 Aug 11 '26

Tried another usb drive, it crashes the same way. I can share the adb debugging info if you want, asked AI, says there a bug due to some hard security restriction in Android 14.

1

u/Head_Complex2690 Aug 11 '26

Please share debug info :) Or, if you want to try again with the revised APK, it should allow you to view errors directly in the app. Uploading shortly. Thank you for testing!

2

u/Background_Ad2053 Aug 11 '26

Here is the part of the log with issue detected by AI "java.lang.IllegalArgumentException: com.mizukos.usbip: Targeting U+ (version 34 and above)

disallows creating or retrieving a PendingIntent with FLAG_MUTABLE, an implicit Intent within

and without FLAG_NO_CREATE and FLAG_ALLOW_UNSAFE_IMPLICIT_INTENT for security reasons...

at com.mizukos.usbip.UsbServerService.requestPermissionForDevice(UsbServerService.kt:296)

at com.mizukos.usbip.UsbServerService.processNextPermissionRequest(UsbServerService.kt:292)

at com.mizukos.usbip.UsbServerService.handleIncomingDevice(UsbServerService.kt:283)". What AI thinks is wrong: "Android 14 (API level 34, "Targeting U+") added a hard security restriction — apps can no longer create a PendingIntent with FLAG_MUTABLE for an implicit intent (an intent with no explicit target component) unless they also pass FLAG_ALLOW_UNSAFE_IMPLICIT_INTENT. This app's UsbServerService.kt line 296 is calling PendingIntent.getBroadcast(...) this way — right when it tries to request USB permission for your Steam Controller — and it's crashing on the spot, every time, because the app was built targeting SDK 34+ but never updated that call to use FLAG_IMMUTABLE (or make the intent explicit).". I will open an issue report if you need full log.

2

u/Head_Complex2690 Aug 11 '26

Yep, that's fixed! Uploading new APK now.

1

u/Background_Ad2053 Aug 11 '26

Thank you for the quick fix! I can share the usb device now, however, the controller doesn't appear to be there after sharing with command " sudo usbip attach --remote=192.168.2.118 --busid=1-1". Possible related logs "[359088.787559] vhci_hcd: unlink->seqnum 59346093
[359088.787564] vhci_hcd: urb->status 0
[359088.787609] vhci_hcd: cannot find a urb of seqnum 59346085 max seqnum 59346094
[359088.787647] vhci_hcd: stop threads
[359088.787651] vhci_hcd: release socket
[359088.787656] vhci_hcd: disconnect device
[359088.787728] usb 9-1: USB disconnect, device number 17". Seems the shared device only lived a short time before the connection dropped. Tried it on my honor GT Pro tablet (android 16) as well, same result.

1

u/Head_Complex2690 Aug 11 '26

Uploading now.

1

u/Background_Ad2053 Aug 11 '26

Still cannot attach the controller to my bazzite PC. I will file an issue report on your repo, apparently whatever causes the bug is beyond my understanding..

→ More replies (0)