-
Notifications
You must be signed in to change notification settings - Fork 212
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
FEATURE REQUEST: RSD tunnel on Linux (iOS >= 17.0, < 17.4) #566
Comments
start-quic-tunnel
with device connected via usbmuxstart-quic-tunnel
on linux returns ERROR Device is not connected
Currently, Linux is missing driver support for the changes Apple made to the USB ethernet implementation for iOS 17. We have been cooperating with other cool kids on the community's Discord server to be able to work with Linux also. I hope these changes can be made public soon and part of an official release for the mainline kernel - Which I will definetly tweet about when this happens. Till then, all I can offer is to wait patiently 🙏 |
Gotcha, I'll join the community then! Thanks for the info. Please feel free to either close the issue or keep it open until this is done :) |
What's process of ios 17 linux support ? any update? Thanks a lot! |
Is it supported on Linux @doronz88 ? Please drop me any updates! |
Haven't seen any commit regarding it on linux kernel. |
start-quic-tunnel
on linux returns ERROR Device is not connected
start-tunnel
on linux returns ERROR Device is not connected
Since some were asking for a clear guide, I'll summarise the steps required to make the tunnel work on linux:
That's it! everything should work |
How can this be used in an Ubuntu Docker container? such like https://hub.docker.com/_/ubuntu |
Would this be for libimobiledevice than pymobiledevice3? |
I've tried applying the patch to my computer (kernel, as well as usbmuxd), and didn't have any issues doing that. I can see the device using Can somebody give me a sanity check, because I'm not exactly sure what I'm doing wrong here. Starting docker container
installing pymobiledevice3
running commands
|
start-tunnel
on linux returns ERROR Device is not connected
I tried outside container and met the same issue, have you resolved? @eyJhb |
As someone who uses this wonderful repository (pymobiledevice3) for handling iOS 17 devices on Linux (Ubuntu) extensively I will share some of my knowledge.
This is a NetworkManager keyfile, it usually needs to be put in After you have all that set up, pymobiledevice3 should have no problem connecting to iOS>17 devices. |
Wow @jordus100 thanks for the very detailed guide! |
@jordus100 thanks a lot for the information, I put the config file ethusb-ios.ncconnection with your quoted contents (just delete the ";" mark in [match] section) in /etc/NetworkManager/system-connections with permissions 600, and sudo reboot ubuntu, but after running command nmcli, the iphone device still displayed as is not connected: enx9a0daf5f4670: disconnected my ubuntu version is 24.04, here is my steps:
you mentioned "to enable the idevice_debug_ncm driver in build config", and how to do that? I'm not sure how to confirm the driver is working well, expecting your reply, thanks a lot! |
@haryshi if the driver is working properly, you should see two network devices named enx* after connecting the iPhone. One of them should be connected with the standard |
@haryshi I have kind of run into a perhaps similar issue to that of yours, please check the output of |
Couldn't this patch file be made into a kernel module? |
It could be but as far as I'm aware no one is working actively on it right now. update: I've started tinkering with it |
Sorry for the late reply, I'm really busy this week but I'll be happy to do that when I find time. Amongst other things, I'm resolving a couple of iOS 17 Linux related issues so maybe I'll post an update if I find out something important. |
@jordus100 I succeed to connect to ios 17 device with your guide finally, thanks again, the key point is to enable the driver before build the kernel: after reboot of correct setting of /etc/NetworkManager/system-connections, the 'nmcli' command should display iPhone 17 device sth. like this: @jordus100 I have another question, have you tried pymobiledevice3 in a docker? how to make the device workable in a docker container? It seems to need additional settings. |
@haryshi I'm glad you found success! Thanks for writing down the part about the kernel config, I also set it before building but was a bit confused and I didn't know what exactly it was that made it work and I also forgot what I edited. |
Hello, I followed @jordus100 instruction and now I got the following entry in
but I see that both of them are using idevice_debug_ncm driver. My issue is the fact that when connected to the first one the tunnel is still not working:
If I'm connecting to second connection (enxf64711ccb19a) I get the following error:
Any idea what I did wrong? |
@jordus100 After I use but , our further goal is to mount multiple ios devices and map them to different docker containers through <Thank you very much!>
|
That's great news about the Docker container working, thanks for sharing! As for mapping individual devices, I haven't looked into it at all. |
|
FYI authors of go-ios have written a Go program that will create interfaces directly from USB devices without a kernel module. See https://github.com/danielpaulus/go-ios/tree/89f480768e8c3311da72c3ef50a2d19547bf2761/ncm |
@nanoscopic I tried |
I'm not familiar enough with the project or a Linux user myself. If any of you manages to get this to work well, feel free to submit a PR 😃 |
Unless you are giving the container full system access, I'm pretty sure it won't work from a container. You don't need to run it as root. On Linux you can just give it permissions to make make/manage utuns and that should be sufficient. |
@lnguyen234 I use the debian image(FROM debian:bullseye-slim), it works fine. You just need to download the usbmuxd from git and build the binary. The container needs to set privileged: true and network_mode: "host". Finally, remember to install ifconfig. |
Hi guys! |
Can anyone here update if maybe latest linux kernel simply resolved that issue as a builtin fix? |
Well, the latest kernel is not really an option for Synology 😅 |
Frida apparently worked around this by writing a user-space implementation... perhaps we could steal it?
|
go-ncm is a user-space implementation |
Is it open source? Does the license permit that? Does it compile to its own standalone binary? Does it handle the removal of QUIC in 18.2 or does it affect it? |
Also, this sounds like linux kernel 6.11 already bundled the required fix for it to work. Can anyone running Linux please confirm this? |
It's open source. It's within the go-ios project at this point but produces a separate standalone binary. With a bit of effort it can and should be ported out and placed within it's own repo and live apart from go-ios. QUIC is irrelevant and is something that uses the utuns that go-ncm produces when needed. There is a slight issue in that you have to use sudo the way go-ncm works currently, but that is not necessary. User space utuns without root are doable. You need to have something running as root ( or with just permission to manage utuns ) to manage the utuns, but it doesn't need to be the same thing running the ncm code. Edit: It's further possible to not have utuns at all and talk directly to the USB devices by implementing a soft tcp stack. Go-ios does this but I wouldn't really recommend it as it just adds needless and pointless complexity. |
Oh so it's only the NCM module which is great to have as a standalone executable :) |
It's not really advertised that it is available as a standalone binary. Go-ios now uses the code in it directly and doesn't use the separate binary. I think Daniel likely only left the code for producing the 'go-ncm' binary in there for me. If you look at the Makefile the logic for building it is in there. Edit: If not, I'd suggest making an issue on the go-ios project asking about it or get in contact with Daniel directly. The issue being the preferred method as he is usually somewhat busy. |
@danielpaulus Another consumer of go-ncm potentially coming your way. |
Submitted danielpaulus/go-ios#538 |
There is no released binary for it, lazy me added only a makefile. I‘ll add it 👍 |
This works well with Frida. (some tweaking might be needed with networkd / NetworkManager like setting link-local and auto-up interface). |
Test environment
OS: Ubuntu 20.04.1 LTS
Target: tvOS 17.0
I have connected my device via usbmux:
And the device is reachable in my network (E.G. if I ping it, I see it).
If I try to run
sudo python3 -m pymobiledevice3 remote start-quic-tunnel
I get
__main__[2707] ERROR Device is not connected
.I'm a bit stuck over here. I tried to run
python3 -m pymobiledevice3 bonjour browse
to check what I'm getting returned, the output isI have the feeling I'm missing something very basic over here, but still I'm stuck. How I can then make
start-quic-tunnel
work, if I can, on Linux? Many thanks.The text was updated successfully, but these errors were encountered: