Need updated libimobiledevice to mount IOS 11 devices

Bug #1718554 reported by Philip Langdale
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
libimobiledevice (Ubuntu)
Fix Released
High
Unassigned

Bug Description

After upgrading to IOS 11, I stopped being able to mount my ipad in ubuntu.

The relevant log lines from gvfs-afc are:

gvfsd[1855]: afc: Added new job source 0x55802a00f130 (GVfsBackendAfc)
gvfsd[1855]: afc: Queued new job 0x558029ff36d0 (GVfsJobMount)
gvfsd[1855]: afc: Lockdown client try #0
gvfsd[1855]: afc: Got lockdown error '-3' while doing 'initial paired client'
gvfsd[1855]: afc: send_reply(0x558029ff36d0), failed=1 (Unhandled Lockdown error (-3))

The fix is here in the upstream github:

https://github.com/libimobiledevice/libimobiledevice/commit/5a85432719fb3d18027d528f87d2a44b76fd3e12

Revision history for this message
Philip Langdale (langdalepl) wrote :

I patched and built a package locally and confirmed the fix works.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in libimobiledevice (Ubuntu):
status: New → Confirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for the report and pointing that patch, I uploaded a backport to artful now

Changed in libimobiledevice (Ubuntu):
importance: Undecided → High
status: Confirmed → Fix Committed
Revision history for this message
Sebastien Bacher (seb128) wrote :
Changed in libimobiledevice (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
rpr nospam (rpr-nospam) wrote :

Is there a chance that we will see this backported to xenial?

Revision history for this message
William F Hammond (wfhammond) wrote :

I wish to second the request of #5 that working access to photos on iphones be kept up to date in xenial. For the credibility of xenial's LTS status this should be done.

Up to the recent time of a new device with iOS 11, I had things working with iOS 10.3 using
Martin Salbaba's ppa for the packages libimobiledevice6 and libimobiledevice-utils.

Even going for a ppa raises unnecessary system maintenance work for something as basic as retrieving photos from a phone.

My impression is that there have been repeated stumbling blocks related to the issue of whether iOS wants ssl or tls. I would like to hope that ubuntu at runtime can decide to go either way even if iOS (which should be able to go either way) cannot. (Maybe this is an oversimplification.)

Revision history for this message
William F Hammond (wfhammond) wrote :

At the github site referenced here at the top it is said:

------
"On newer iOS version, ValidatePair is not mandatory to gain trusted host status. Starting with iOS 11, the ValidatePair request has been removed from lockdownd and will throw an error. This commit adds a version check so that ValidatePair is only called on devices prior iOS 7."
------

I'm looking for clarity here. As I understand it, libimobiledevice issues a formerly required ValidatePair call, and iOS 11 throws a killing error. Is that right? Isn't it reasonable that iOS 11 could just ignore it and keep going?

That is, isn't this something that one could ask Apple to fix?

Moreover, I still fail to understand why USB access to the iPhone file system is so bizarre. There is adequate authentication when (1) the iPhone is unlocked by the user and (2) the user responds on the unlocked phone to the question "Trust this computer?". It should then be the responsibility of iOS to show the unjailed part of the file system transparently through the lightning port. (In mentioning "jail", why are the vcards behind "Contacts" not outside of jail? There can be no legitimate reason for that.)

One is left with the impression that Apple has little respect for inter-operability with anything that is not Apple. It would seem that the only Apple-supported ways to move photos from an iPhone to a Linux platform are (1) email (one photo at a time) or (2) iCloud via the web, provided that the user allows iCloud backups from the phone. (The website at icloud.com is not itself fully inter-operable. For example, it says that it does not support Android mobile devices when it is called from my Android tablet.)

Revision history for this message
William F Hammond (wfhammond) wrote :

EUREKA (maybe) !

This evening I took the iPhone update to iOS 11.3, and just out of curiosity I decided to check out the iphone as an attached device in the file manager. And I'm in. I don't know why. I did not use
idevicepair nor ifuse. If I run ideviceinfo, I still get "ERROR: Could not connect to lockdownd, error code -3".

In the file manager I found that clicking on a thumbnail gave me the photo.

Messing around in the command line, a call to "df" suggested that I look at "/run/user/1000".

Going there I found a current datestamp on its subdirectory "gvfs" and within that a sole item
with robotic name "gphoto2:host=%5Busb%3A004%2C023%5D".

Inside that there is a single directory "DCIM" (less than I used to see in iOS 10.3), but that has always been the place for photos.

Within DCIM there are subdirectories "100CLOUD" and "100APPLE". I'm not sure what that's about, but the photos in the first are older and are all of size 3264x2448. During the time period for the photos in 100CLOUD, I changed to a new phone, but the latest photos in there were taken on the new phone. In 100APPLE the photos are all of size 4032x3024.

I'm guessing that usb infra-structure invoked some gphoto infra-structure, and that libimobiledevice is not in the picture, but I don't know.

And for the moment I'm guessing that Apple has cleaned up its act with iOS 11.3.

My Ubuntu is 16.04.4 LTS, and I'm running the Mate evolute of classic gnome. In the Mate GUI connecting the phone to a usb port causes an icon to appear on my desktop. A right click on that
icon gives me an unmount option that I used before disconnecting the phone.

Revision history for this message
William F Hammond (wfhammond) wrote :

I could not replicate for my latest photos this evening what I reported in #8.

Yet by fiddling in various ways, after a reboot I was able to coax shotwell to import the photos on the iPhone. I then had command line access to those photos in the location where shotwell dropped them.

As for /run/user/1000/gvfs: the robotic gphoto name appeared there on and off, but when it was there it appeared to be empty from the command line.

As a comment on my #8, it would seem that the appearance of the robotic gphoto name in /run/user/1000/gvfs has something to do with a prior running of shotwell. (The shotwell executable in Xenial links to two gphoto runtime libraries.)

I don't know what is going on.

It's certainly less than transparent access through the lightning port to the usb file system on the iPhone.

Revision history for this message
William F Hammond (wfhammond) wrote :

My last sentence in #9 should be:

It's certainly less than transparent usb access through the lightning port to the file system on the iPhone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.