-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Socket API mismatch between libimobiledevice and libusbmuxd #1248
Comments
MarSoft
added a commit
to MarSoft/libimobiledevice
that referenced
this issue
Dec 9, 2021
In sync with idevice_from_mux_device, line 384. Without this fix, data size 128 (the common value) is treated as -128, resulting in incorrect allocation. Related to libimobiledevice#1248 but doesn't fully fix it.
MarSoft
added a commit
to MarSoft/libimobiledevice
that referenced
this issue
Dec 9, 2021
In sync with idevice_from_mux_device, line 384. Without this fix, data size 128 (the common value) is treated as -128, resulting in incorrect allocation. Related to libimobiledevice#1248 but doesn't fully fix it.
nikias
pushed a commit
that referenced
this issue
May 2, 2022
In sync with idevice_from_mux_device, line 384. Without this fix, data size 128 (the common value) is treated as -128, resulting in incorrect allocation. Related to #1248 but doesn't fully fix it.
Without it restore mode device was not detected in my case |
If there is a problem, you can force a USB connection, and the WIFI forwarding is handled by the driver. |
I pushed commit a172604 which would just take the buffer that we get from libusbmuxd. It's the platform-dependent address that should just allow to connect. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Important note: this error happens on 64-bit Windows with iTunes installed.
The code in
libimobiledevice
expects thatlibusbmuxd
will provideconn_data
for networked devices in the following format:Now, if we peek into
libusbmuxd
code, it has different logic:usbmuxd
gave us in plist data forNetworkAddress
;And looking ad the data provided by
iTunes
implementation ofusbmuxd
, it looks as follows (for IPv4 addresses):So we try to interpret first byte of address family (
0x02
) as data size, and second byte of address family (0x00
) as address family value. This leads toUnsupported address family 0x00
error message, and makes it impossible to connect iDevices over network.Possible solution:
libusbmuxd
to include data size as a first byte;libimobiledevice
to look for IP address data at the right offset (5, not 2: skip 1 byte for length and 4 bytes for family).Possible workaround is proposed in libimobiledevice/libusbmuxd#95 (comment) - we can patch
libusbmuxd
to report Networked devices as if they are USB ones, forcinglibimobiledevice
to proxy connections to them viausbmuxd
(as it was before 2c83cae). I don't like this particular workaround implementation tough because it makes impossible to distinguish between networked and USB devices for client code.The text was updated successfully, but these errors were encountered: