top | item 24806885

iOS 14 USB tethering broken on Linux: looking for docs and contact at Apple

126 points| pabs3 | 5 years ago |corsac.net

50 comments

order
[+] marcan_42|5 years ago|reply
Wow, this brings back memories. I hacked on this and other iPhone support on Linux back in the day, including on getting music sync support working, back when I myself used an iPhone.

At the time I wrote usbmuxd, which implements the sync (not tethering) part of the protocol. I can now say that I had a bit of behind the scenes help from an Apple engineer; his tips helped work out some corner cases that would've been quite hard to track down otherwise. This friend sadly passed away a few years ago.

Unfortunately, Apple has always been (publicly) hostile to third party support for their devices. For example, they insist on "signing" music databases with algorithms based on their FairPlay DRM implementation, to stop non-iTunes software from syncing music to them. I reverse engineered one variant of this (which was based on a white-box AES implementation and a lot of obfuscated junk) but they kept changing the algorithm. This went into libgpod and libimobiledevice.

[+] threeseed|5 years ago|reply
Make sure you also file a Radar at: http://bugreporter.apple.com

They do get triaged just not necessarily actioned depending on priorities etc.

[+] saagarjha|5 years ago|reply
I suspect you meant https://bugreport.apple.com/, which is also accessible via rdar:// on consumer iOS devices. Sadly, the redirect service that has been running their ever since it was replaced by Feedback Assistant seems to not be working at the moment :(
[+] xvector|5 years ago|reply
URL doesn’t work for me, but you can also just type “applefeedback://“ in Safari to create a ticket.
[+] hendry|5 years ago|reply
I usually rely upon https://aur.archlinux.org/packages/libimobiledevice-git/ via https://wiki.archlinux.org/index.php/IOS

I'm using the wifi hotspot since wired rarely works for me.

    $ sudo idevicepair pair
    No device found.
with an iPhone running 14.0.1 over USB-C
[+] yread|5 years ago|reply
It gets broken every major release, sometimes even more often :(
[+] jeffbee|5 years ago|reply
Why do people use the USB tether? The WiFi hotspot always works perfectly, it's an open protocol etc.
[+] fenwick67|5 years ago|reply
USB tether is one less wireless signal to worry about. If you're tethering for a long time you're probably plugging your phone into your laptop anyway, to charge it.
[+] qcoh|5 years ago|reply
Three reasons for me:

* It disconnects more than once per day, requiring me to enable the wifi hotspot again on the phone

* The phone gets very hot

* It is slower than usb tethering: In my measurements, I get about 4MByte/s over USB and around 2MByte/s with wifi, though I'm not too confident in the results. According to the mobile provider, I should get 10.

EDIT: A fourth one is that the wifi hotspot leaks my first name and phone brand to everyone in the vicinity.

[+] rektide|5 years ago|reply
> Why do people use the USB tether? The WiFi hotspot always works perfectly, it's an open protocol etc.

My mobile is an Android device, but I believe these reasons all still apply:

* lower power consumption for both devices with wifi off

* significantly lower & more stable ping. i drop from ~44ms with a lot of jitter (a significant number of 120ms pings) to mostly stable <35ms, with a very occasional high ping.

* better-re-sharing. if i am hosting a bunch on a phone, with USB i can bring a mobile travel router with me that has much better range & works with many more users. (it's possible that wifi extender mode may emulate some of this advantage, but it would almost certainly double the jitter problem)

[+] ce4|5 years ago|reply
Very good question! :-)

You can use your mobile as a Wifi-to-USB dongle and dont have to care about wireless credentials which is very nice. This is not possible with a wifi hotspot because in Hotspot mode you cannot use your wifi in parallel.

I do use that with a mobile router that supports Android's usb-cdc-ethernet adapter to forward hotel wifis when i only have one code for a single device (mac address). Or when the wifi gadget you want to use doesnt work with the captive portal. Fast and hassle free.

[+] kkaranth|5 years ago|reply
When tethering to a desktop without WiFi. And assuming wifi-usb dongles are not an option. (They can be a little finicky on certain Linux versions)
[+] mjrbrennan|5 years ago|reply
Personally the wifi version of wireless hotspot was always finicky for me on Linux, requiring a few restarts of the hotspot and the computer wifi to get synced up.

Wired tethering always worked instantly. Well, until now sadly :(. I tried to do this the other day and I just figured something was bugged, but I didn’t realise it is an iOS14 issue. Guess I am stuck with the wifi hotspot for now when I am out and about.

[+] asicsp|5 years ago|reply
I use a desktop. USB tether works well (I have android phone, not apple) for me. Why bother setting up wifi and buy additional device to make it work with my desktop?
[+] yread|5 years ago|reply
I use it to get a console for mobile safari. It does the weirdest things - like truncating input fields if they are too long
[+] tlrobinson|5 years ago|reply
Bummer, I just picked up a nice little cheap GL.iNet travel router ("Mango" and "Slate" are popular models) that works (worked?) with USB tethering on iOS (presumably pre-iOS 14).

I'm sure WiFi tethering will still work with it, but it's nice to remove one potentially flaky connection from the equation.

[+] villgax|5 years ago|reply
Vice versa Android USB tethering is broken on MacOS
[+] saagarjha|5 years ago|reply
Apple is probably not going to help for this, sadly. I am fairly sure the details of tethering are considered to be private API and when something like that breaks (having likely been created by reverse engineering originally) they just don’t care. That being said, perhaps you’ll get some support from some skills do reverse engineers to help update that code!
[+] teruakohatu|5 years ago|reply
There is space for "we will tell you how to works but no guarantees" between "private api" and "open spec".
[+] jojobas|5 years ago|reply
Does Linux even exist for Apple? They are where Microsoft was 15 years ago in that respect.
[+] tomjakubowski|5 years ago|reply
Many if not most of their backend services run on Linux, which you can tell from their job postings.
[+] threeseed|5 years ago|reply
Apple has been using Linux for at least a decade.

Online Store and iTunes Store used to both run on it.

These days I imagine everything does since they use Kubernetes for Siri, Maps etc.

[+] CSDude|5 years ago|reply
I went to summer house to work and got my old Linux with me. For 10 days, I was out of internet bc wifi driver (obscure brand) was also broken. It was very frustrating, now I know why!
[+] paulcarroty|5 years ago|reply
Heh, I remember when tried to tether my iphone wifi connection to Linux desktop first time and didn't know it's not supported by design, LTE-only.
[+] mariuolo|5 years ago|reply
How about running Windows in a VM and utilising Wireshark to analyse the protocol?
[+] nanoscopic|5 years ago|reply
If you manage to get anyone from Apple to speak with you send them my way also. I am the author of IOS support for DeviceFarmer ( previously OpenSTF ). Part of that support involves getting video of the screen over the USB connection which uses the same undocumented pathways that libimobiledevice uses. I've been attempting to find someone at Apple to support the open source efforts for nearly a year to no avail.

What I would like Apple to support is fetching the raw h264 stream in a documented fashion, rather than forcing one to use AVFoundation and get pre-processed frames/data. Only allowing decoded video makes it impossible to scale. ( having many devices connected to a single mac all streaming video )

It would also be awesome if they would open up and document all the protocols and operations that the lockdown protocol supports. I doubt that will ever happen though.

[+] dingaling|5 years ago|reply
Doesn't there come a point where you just say "screw Apple" and leave their devices unsupported?

They're deliberately opaque and obtuse. If people choose to buy their devices then they should accept the consequences of that choice.