google / google/gousb

Can't detach kernel driver. Invalid param [code -2] for iOS 16 devices

Open
#115 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
932
Forks
136
PR merge metrics
No merged PRs in 30d

Description

Hello,

I'm running an application that mirrors iphone screen via usb cable to my linux desktop.
The application in question is a modified [quick time video hack](https://github.com/Karazum/quicktime_video_hack)

Essentially, when a iphone is connected to a linux machine, it determines which usb configuration is for audio-video mirroring and when you run the application it will attempt to switch to that usb configuration

invokes usbDevice.Config(device.QTConfigIndex which
invokes d.ctx.libusb.detachKernelDriver(d.handle, uint8(iface.Number)))

but it fails when it attempts to detachKernelDriver with the following error:
{"error_message":"failed connecting to usb","original_error":"Can't detach kernel driver of the device vid=05ac,pid=12a8,bus=5,addr=21 and interface 3: **libusb: invalid param [code -2**]"}

Additional useful information:
- autodetach is enabled
- linux version: ubuntu 22.04
- usbmuxd version: 1.1.2
- go version: 1.20.1
- gousb version:
- steps to reproduce:
- git clone https://github.com/Karazum/quicktime_video_hack.git
- go build -o qvh
- plug in iphone with iOS 16 or more (iOS below 16 works)
- qvh devices (to check if the device is available)
- qvh gstreamer

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.