iOS device contents not displayed in Ubuntu

Bug #1623666 reported by NoBugs!
504
This bug affects 111 people
Affects Status Importance Assigned to Milestone
Libimobiledevice
Fix Released
Unknown
gnutls28 (Ubuntu)
Confirmed
Medium
Unassigned
libimobiledevice (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

Plug in iOS device, and it doesn't show the documents on it.

Please package the recent fix in libimobiledevice*:

Vauge discussion that mentions using the latest git HEAD*:
https://github.com/libimobiledevice/libimobiledevice/issues/327

*This discussion is quite vague. One comment points out "iOS 10 devices don't allow SSLv3 anymore but require at least TLSv1", but not how or if that has been fixed in libimobiledevice git HEAD.

This ppa packages the git version and may resolve the issue:
https://launchpad.net/~martin-salbaba/+archive/ubuntu/ppa+libimobiledevice/+packages

There are several other upstream reports related to this problem.

Partial success patch (idevicepair only) trying to keep GnuTLS:
https://github.com/libimobiledevice/libimobiledevice/issues/413

Failure with GnuTLS, Success with OpenSSL:
https://gitlab.com/gnutls/gnutls/issues/145

Ubuntu packages libimobiledevice with "--disable-openssl":
https://github.com/libimobiledevice/ifuse/issues/32

Duplicate bug 1638177 suggests to repackage libimobiledevice using OpenSSL to avoid this problem, as per comment 27 below.

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
per (eura)
Changed in libimobiledevice (Ubuntu):
status: Confirmed → Fix Committed
status: Fix Committed → Confirmed
Revision history for this message
per (eura) wrote :

About 10 days ago Apple send out information for Iphone user to upgrade to iOS10, so this affect all Iphone user for 5S and above. How like to access there files on the phone.

per (eura)
Changed in libimobiledevice (Ubuntu):
assignee: nobody → per (eura)
Revision history for this message
NoBugs! (luke32j) wrote :

@Per when you fix this will it be backported to Ubuntu 16.04?

Revision history for this message
per (eura) wrote :

Sorry for the miss-understanding I slip on the keyboard last night it was dark when I change the status
Changed in libimobiledevice (Ubuntu):
status: Confirmed → Fix Committed
status: Fix Committed → Confirmed

Ignore this Sorry / Per

Revision history for this message
Charles (clmoore3rd) wrote :

Also appears to affect Ubuntu 14.04 Trust Tahr. I was previously able to connect my iPhone 5S and browse the file system, now it gives the error message "Unable to access """ Unhandled Lockdown error (-16).

Revision history for this message
Sam Gleske (sam-mxracer) wrote :

I actually discovered the root cause. GnuTLS doesn't work with iOS. Rebuilding the package using OpenSSL resolves this issue.

Revision history for this message
Sam Gleske (sam-mxracer) wrote :

The libimobiledevice package for Ubuntu was built with --disable-openssl which forces GnuTLS. GnuTLS does not work with the recent iOS10 update.

Solution: rebuild the package so that it links against OpenSSL again. This will resolve issues connecting to iOS 10 devices.

I tested the latest development version of GnuTLS (@ commit 1e84b90feed97ee458b7113665300e6bc444798f of master HEAD) and it does not work with iOS 10 devices.

Upstream issue reference: https://github.com/libimobiledevice/ifuse/issues/32

Revision history for this message
Sam Gleske (sam-mxracer) wrote :

I am using Ubuntu 16.04.

Sam Gleske (sam-mxracer)
tags: added: xenial
Revision history for this message
Sam Gleske (sam-mxracer) wrote :

I reported the issue to the GnuTLS project - https://gitlab.com/gnutls/gnutls/issues/145

Revision history for this message
Nikos Mavrogiannopoulos (nmavrogiannopoulos) wrote :

I believe that is a libimobiledevice issue which restricts ciphersuites/protocol versions. Please verify by trying the patch for libimobiledevice at:
https://gitlab.com/gnutls/gnutls/issues/145#note_17677611

Changed in libimobiledevice (Ubuntu):
importance: Undecided → High
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in gnutls28 (Ubuntu):
status: New → Confirmed
Revision history for this message
Alberto Salvia Novella (es20490446e) wrote :

The affected hardware is non-core.

Changed in libimobiledevice (Ubuntu):
importance: High → Medium
Changed in gnutls28 (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Alberto Salvia Novella (es20490446e) wrote :

Only assign yourselves to bugs just before starting working on them.

Changed in libimobiledevice (Ubuntu):
assignee: per (eura) → nobody
Revision history for this message
Sam Gleske (sam-mxracer) wrote :

Nikos, I will try your patch this evening and report back (it is morning for me right now so I must work).

Revision history for this message
Sam Gleske (sam-mxracer) wrote :

Nikos, patch didn't work. I commented in https://gitlab.com/gnutls/gnutls/issues/145

Revision history for this message
Sam Gleske (sam-mxracer) wrote :

This issue has been resolved after working with upstream maintainers.

See https://gitlab.com/gnutls/gnutls/issues/145

For the resolution see https://github.com/libimobiledevice/libimobiledevice/issues/413

Revision history for this message
J. McDonald (mcdonald-joseph) wrote :

So if this is resolved, could someone provide an answer that doesn't require a PhD in computer science to figure out?

Revision history for this message
Sam Gleske (sam-mxracer) wrote :

J McDonald, I recommend you learning more about public key infrastructure. Essentially, encryption and security have different options available to it (called algorithms and parameters to said algorithms). libimobiledevice, using the GnuTLS library, specified incompatible options for it to work in iOS 10. When it was built with another library (OpenSSL instead of GnuTLS), it worked.

TL;DR Ubuntu used GnuTLS version of libimobiledevice which had the bug and said bug has was fixed in libimobiledevice.

Revision history for this message
J. McDonald (mcdonald-joseph) wrote :

Sam Gleske, with all due respect, that is not an really an answer. I am an end user, not a code developer, but I understood the basics of the problem with the package being built with GnuTLS instead of the correct version of OpenSSL. You are also incorrect with respect to libimobiledevice being fixed within the Ubuntu 16.04 repositories. The most recent version still has this bug and I confirmed that it still does not work either in Ubuntu 16.04 or the related Mint 18.

A patch was suggested as a solution, but the linked patch provided no clear, understandable (at least to me, an end user) description of how to install it. I did find a very helpful solution here:
https://answers.launchpad.net/ubuntu/+source/libimobiledevice/+question/402748

which provided a link to a ppa with updated versions of libimobiledevice for Ubuntu 14.04 and 16.04 using OpenSSL at the following URL: https://launchpad.net/~martin-salbaba/+archive/ubuntu/ppa+libimobiledevice

I installed the version from the PPA, unpaired and paired the phone, and confirmed that it works at least in my case (Mint 18 & Ubuntu 16.04, iPhone 5c, and iOS10.1).

Revision history for this message
Ivan Koldaev (pixus-ru) wrote :

J McDonald, thank you for pointing to the PPA!
I was patiently waiting more than month for official update, but free space on my iPhone running out, so I have to finally copy these photos :)

zckhoa (zckhoa)
Changed in gnutls28 (Ubuntu):
assignee: nobody → zckhoa (zckhoa)
assignee: zckhoa (zckhoa) → nobody
Revision history for this message
J. McDonald (mcdonald-joseph) wrote :

Unfortunately, the subsequent iOS updates to 10.1 and 10.2 broke this again.

Revision history for this message
Ulf Mehlig (umehlig) wrote :

same here with Ubuntu 16.10 and iOS 10.2 (14C92). The ppa cited above does not install on yakkety.

Revision history for this message
Karli Sjöberg (karli.sjoberg) wrote :

Same here with Xubuntu 16.04 and iOS 10.2.

Revision history for this message
per (eura) wrote :

Just confirm iOS 10.2 will not work with LinuxMint 18.1 together with Martin Salbaba s ppa
can’t see my photos just part of the documents on the Iphone
so back to scratch ;-( when the iOS 10 was release in September.
Working with iOS 10.1 and lower.

Revision history for this message
Brad Lucier (lucier) wrote :

I'm not an expert, but it seems that the pace of Apple's OS changes and the updates needed by the libimobiledevice team to keep up with them might mean that one cannot rely on either Ubuntu's packaging of libimobiledevice or a separate ppa, but must just build things from the git repository, if you know how.

This worked for me:

    19 16:35 git clone https://github.com/libimobiledevice/libimobiledevice.git
    20 16:35 cd libimobiledevice
    21 16:35 ./autogen.sh --prefix=/usr/local/libimobiledevice
    22 16:36 make
    23 16:36 sudo make install

At this point I changed my LD_LIBRARY_PATH to include /usr/local/libimobiledevice/lib at the front, so ifuse, etc., will load the new library instead of the pre-installed one. I use tcsh so that command looks like

setenv LD_LIBRARY_PATH /usr/local/libimobiledevice/lib:

Then the following worked (after some fidgeting, rebooting my iPod Touch, etc.):

    37 16:44 idevicepair pair
    38 16:45 ifuse /media/iPod/

At least I can load my music into Rhythmbox, etc.

Revision history for this message
per (eura) wrote :

This will work with LinuxMint18,1 and iOS 10.2 I just follow the instructions https://gist.github.com/samrocketman/70dff6ebb18004fc37dc5e33c259a0fc now I can access my folders on my Iphone ;-) Thank you Sam

Revision history for this message
Adam Szmigin (smidge) wrote :

In case this helps the non-gurus, I needed to do a fraction more than Brad Lucier's suggestions, but a lot less than samrocketman's suggestions, in order to get things working with my wife's iOS 10.2 device on Linux Mint 18:

1) Install dependencies for compilation
$ sudo apt install build-essential git
$ sudo apt install automake libtool pkg-config libplist-dev libplist++-dev python-dev libssl-dev libusb-1.0-0-dev libfuse-dev

2) Clone libimobiledevice, build, install
$ cd ~/path/to/my/build/dir
$ git clone https://github.com/libimobiledevice/libimobiledevice.git
$ cd libimobiledevice
$ ./autogen.sh --prefix=/usr/local/libimobiledevice
$ make
$ sudo make install

3) Configure the dynamic linker
$ echo "/usr/local/libimobiledevice/lib" | sudo tee /etc/ld.so.conf.d/000-libimobiledevice.conf
$ sudo ldconfig

Just cloning and compiling libimobiledevice from the git sources will not build tools like ifuse, and it seems it is not necessary to do so, provided the dynamic linker is set up correctly. Apparently, using ldconfig is preferred to setting LD_LIBRARY_PATH on Ubuntu and LM, so I hear. You can see if it's doing the right thing by looking at ldd.

It should show something like this:
$ ldd `which ifuse` | grep libimobiledevice
  libimobiledevice.so.6 => /usr/local/libimobiledevice/lib/libimobiledevice.so.6

If ldd shows something like this, the linker is not finding your rebuilt libs:
$ ldd `which ifuse` | grep libimobiledevice
  libimobiledevice.so.6 => /usr/lib/x86_64-linux-gnu/libimobiledevice.so.6

Hope this helps until a strategic solution is in place.

Revision history for this message
per (eura) wrote :

This will also works with Martins ppa and LinuxMint18 and iOS 10.2

sudo mkdir /media/iPhone
sudo chmod 777 /media/iPhone

ifuse /media/iPhone/

Than when will you access your folders on the phone ;-)
when finish just unmount

fusermount -u /media/iPhone

next time when you like to access your phone just write ifuse /media/iPhone/

Hope this will helps ;-)

Revision history for this message
P (p92) wrote :

Temporary workaround from comment #27 works on kubuntu 16.10 to access manually the iphone6S folders under ios10.2 .

Sadi Yumuşak (sa-yu)
summary: - iOS10 will not connect to Ubuntu
+ iOS device contents not displayed in Ubuntu
tags: added: yakkety
description: updated
Revision history for this message
Sadi Yumuşak (sa-yu) wrote :

I've just noticed that I have essentially the same problem after making a new bug report at https://bugs.launchpad.net/ubuntu/+source/libimobiledevice/+bug/1654833 which I've now marked as duplicate.

This bug affects both iOS 9.3.5 (iPad) and iOS 10.2 (iPhone) since upgrading to Ubuntu 16.10 (64-bit) probably including a new version of this libimobiledevice package (libimobiledevice6 version 1.2.0+dfsg-3ubuntu1)

Attempting to implement the workaround suggested here I've got stuck at the very first step:
The command "./autogen.sh --prefix=/usr/local/libimobiledevice" displayed this error message:

configure: error: Package requirements (libusbmuxd >= 1.0.9) were not met:
No package 'libusbmuxd' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix.
Alternatively, you may set the environment variables libusbmuxd_CFLAGS and libusbmuxd_LIBS to avoid the need to call pkg-config.

I have the files "/usr/lib/x86_64-linux-gnu/libusbmuxd.so.4" (a symlink) and "/usr/lib/x86_64-linux-gnu/libusbmuxd.so.4.0.0" but I don't know how to make them accessible by this script.
I also have the file "/usr/lib/pkg-config.multiarch" which includes "x86_64-linux-gnu" so I guess pkg-config should know where to look for :-(

Revision history for this message
Sadi Yumuşak (sa-yu) wrote :

Update: The workaround mentioned in comment #27 worked perfectly:
https://gist.github.com/samrocketman/70dff6ebb18004fc37dc5e33c259a0fc
I have even wrote a small script (posted there) which helps mounting/unmounting an iOS device from the Unity Launcher :-)
Thanks a lot Sam!

quequotion (quequotion)
description: updated
Revision history for this message
J. McDonald (mcdonald-joseph) wrote :

I attempted following the instructions in #28 and I only got this far:

  $ cd ~/path/to/my/build/dir
  $ git clone https://github.com/libimobiledevice/libimobiledevice.git
  $ cd libimobiledevice
  $ ./autogen.sh --prefix=/usr/local/libimobiledevice
  $ make

and then I got the following message:

  make: *** No targets specified and no makefile found. Stop.

I have no idea what this means.

Revision history for this message
Karli Sjöberg (karli.sjoberg) wrote :

Have confirmed #27 works on a Xubuntu 16.04 VM. Would be so glad if package maintainers could repackage towards newer versions, which obviously work, in contrast to what is packaged today.

Thanks in advance!
Karli Sjöberg

Revision history for this message
Jeff Kowalski (jeff-kowalski-m) wrote :

@Sadi Yumuşak (sa-yu) #31:
I had the same problem you documented, and found it was because of a conflicting pkg-config. In my case, I had one installed in ~/.linuxbrew/bin/pkg-config, which was picked up in my PATH before /usr/bin/pkg-config. The solution was to temporarily rename the one in my linuxbrew so that the one in /usr/bin was used.

@J. McDonald (mcdonald-joseph) #34:
You list the commands you've used, but not their output. I suspect that the output of autogen.sh is similar to what sa-yu experienced in his note. The specific error you're seeing from make means that the input file that it expects by default, which is named Makefile, cannot be found. It is the autogen.sh script which produces that Makefile. Its failure is likely due to a problem similar to what sa-yu describes.

@Adam Szmigin (smidge) @28: #28
Fine instructions. I confirm that they work on Linux Mint 18.1 x64.
Just for clarity, readers should know that the command "$ cd ~/path/to/my/build/dir" shouldn't be taken literally. Instead, it's shorthand for a couple commands like
$ mkdir -p ~/build/libimobiledevice
$ cd ~/build/libimobiledevice

Revision history for this message
J. McDonald (mcdonald-joseph) wrote :

Jeff Kowalski - Thanks for the help. I don't have a ~/.linuxbrew/ hidden directory, so I suppose it is hiding somewhere else. I suppose that I could try searching for pkg-config to see where it might be located. This is so far down in the weeds that I'm not counting on getting my photos off my phone anytime soon...

Revision history for this message
seanlano (seanlano) wrote :

#28 and then #29 work perfectly for me, connecting an iPhone with iOS 10.2 to my laptop with Ubuntu 16.04 running on it.

Revision history for this message
pla (pierre-laurier) wrote :

Linux Mint 18 Cinnamon 64-bit
iPhone iOS 10.2.1

#28 and #29 worked for me.

Thanks a log guys !

Revision history for this message
J. McDonald (mcdonald-joseph) wrote :

#29 worked for me using 1.2.0+git20161018-3salbabix27xenial as long as I did the following:

fusermount -u /media/iPhone

and then

ifuse /media/iPhone/

After that, I was able to access the entire filesystem on my iPhone 5c/iOS 10.2 and finally import my photos. It's a bit clunky but it works. I will be glad when this is fixed and an update issued.

Revision history for this message
Pat Migliaccio (patmigliaccio) wrote :

#28 & #29 did the trick for me as well after a small hiccup.

To get the ./autogen.sh script working for libimobiledevice, I first needed to install libusbmuxd.

  $ cd ~/path/to/my/build/dir
  $ https://github.com/libimobiledevice/libusbmuxd.git
  $ cd libusbmuxd
  $ ./autogen.sh
  $ make
  $ sudo make install

Then proceeded successfully with #28 and #29.

Linux Mint 18.1 Cinnamon 64-bit
iPhone SE iOS 10.3.1

Revision history for this message
Fawad Raza (fwd079) wrote :

#27 on Unbuntu 16.04 doesn't work anymore, gives same "package not met" error:

configure: error: Package requirements (libusbmuxd >= 1.0.9) were not met:
No package 'libusbmuxd' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix.
Alternatively, you may set the environment variables libusbmuxd_CFLAGS and libusbmuxd_LIBS to avoid the need to call pkg-config.

Revision history for this message
Michael Harden (michaelharden1a) wrote :

I'm using 17.04 and I can't access the pictures I get folder contains pictures then a message folder is empty, I have a IPhone 7

Revision history for this message
John Cupitt (jcupitt) wrote :

This worked for me on 17.04 with an iphone 6s and ios 10.3.3:

1. git clone https://github.com/libimobiledevice/libimobiledevice.git
2. cd libimobiledevice
3. sudo apt-get install libusbmuxd-dev libplist-dev libplist++-dev

I then had to add a number of packages to get libimobiledevice to configure cleanly, you might need more than this.

4. ./autogen.sh --prefix=/home/john/libimobiledevice

Check the output of autogen carefully and add any missing packages. I'm building to a directory in my home directory, you'll want to substitute "john" for your username.

5. make
6. make install
7. export LD_LIBRARY_PATH="/home/john/libimobiledevice/lib:$LD_LIBRARY_PATH"

Here I added that directory to my library path, so subsequent commands in this shell will use the new libimobiledevice.

8. ~/libimobiledevice/bin/idevicepair pair

This will fail first time and ask you to tap "Trust" on the phone screen. Try again and you should see a SUCCESS message.

9. mkdir x
10. ifuse x
11. ls x

And I see lots of directories, including DCIM with all my photos in.

P (p92)
tags: added: zesty
Revision history for this message
P (p92) wrote :

This is still not natively fixed in zesty even with ubuntu backport and updates.

The workaround works but no applications like digikam can access automatically to IOS 10+ iphones anymore.

Can someone at ubuntu do something to fix this definitly on the official release please ?

Changed in libimobiledevice:
status: Unknown → Fix Released
Revision history for this message
Chris Cheney (ccheney) wrote :

For whatever reason while trying to backup an iPhone 6s+ 10.3.3 before upgrading to 11.0 I can't see the photo mount in mate fuse at all but if I use idevicepair and ifuse from the command line it lets me copy the files. I'm not sure if this is related to the issue others have reported above.

Revision history for this message
Chris Cheney (ccheney) wrote :

I should note that the above is while using the regular packaged versions of idevicepair / ifuse.

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

#47: When you say you are using the regular packaged versions, am I correct in thinking that you are speaking about an updated Ubuntu 17.04?

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

I've had success with newly installed 16.04.3 LTS following steps 8 - 11 given in #44 after installing the October 2016 ppa for 16.04 from Martin Salbaba. That is, my first 3 steps were:

  sudo add-apt-repository ppa:martin-salbaba/ppa+libimobiledevice
  sudo apt-get update
  sudo apt-get dist-upgrade

After retrieving my photos and before disconnecting the iPhone, I suggest

  idevicepair unpair
  fusermount -u x (where x is the "mount point").

One more note: I was running the Mate Desktop. When I connected the (unlocked) iPhone, the program "Shotwell" appeared. I did not want to use it. The alternate selection was Caja (Mate's file manager similar to Nautilus), but Caja was not seeing the phone. (The command lsusb was seeing the phone.) I selected "unmount" in the requester offering "Shotwell" just in case Shotwell did have access before I proceeded to use idevicepair.

I seem to have a solution that is satisfactory for me -- especially because I want to have command-line access to the photos, and using idevicepair and ifuse makes the mounted location of the photos quite explicit to me since I specify the mount point.

I do think, however, that many LTS desktop users will want something such as what Mate purports to offer.

I also completely fail to understand why Apple thinks that lightening port access to the small user portion of the iPhone filesystem requires either SSL or TLS. (Might this be explained by an alternate route "through the air"?)

Revision history for this message
J. McDonald (mcdonald-joseph) wrote :

Update to #39 - iPhone 5C with iOS 10.3 replaced with iPhone SE/iOS 11.03. I'm back where I started from - no connectivity. I can mount the phone but nothing is visible.

Revision history for this message
J. McDonald (mcdonald-joseph) wrote :

I'm using Linux Mint 18.2 Cinnamon.

Revision history for this message
J. McDonald (mcdonald-joseph) wrote :

More specifically, I was able to successfully pair the phone. It took a couple of iterations (entering password on phone, etc.). The problem seemed to be lockdownd when trying to mount:

$ ifuse /media/iPhone/
Failed to connect to lockdownd service on the device. Try again. If it still fails try rebooting your device.

Revision history for this message
J. McDonald (mcdonald-joseph) wrote :

I am also using the martin-salbaba/ppa+libimobiledevice ppa

Revision history for this message
Chris Cheney (ccheney) wrote :

reply #48

Yes packaged version in main archive, using Ubuntu Mate 17.10 now and its still not showing the photos mount in Caja (like nautilus). I can see the Documents mount though.

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

Following up to my #49:

I'm working with Ubuntu 16.04.4 LTS.

The Martin Salbaba ppa had been working for me with an iphone 5 and iOS 10.3

Recently I went to a new phone running iOS 11, and I fail to get to photos with ifuse after an apparently successful "idevicepair pair". Ifuse complains about "lockdownd".

The libimobiledevice packages show version 1.2.0+git20161018-3salbabix27xenial.

The ifuse package shows version 1.1.2-0.1build3.

At bug 1718554, there is the suggestion of a procedure for re-building from source. It is said that this will fix the problem. I have not tried it. I would rather have an updated package rather than blindly follow building-from-source instructions.

Question: Is the Martin Salbaba ppa the standard location for the libimobiledevice6 and libimobiledevice-utils packages? If not, where?

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

Continuing #55:

Given the change with libimobiledevice between iOS 10.3 and iOS 11+,
I decided to take a look at shotwell.

The curious thing is that shotwell
displays correct thumbnails for all photos on the iphone. That is curious
because AIUI the jpegs generated by the iphone camera contain embedded
thumbnails using exif. But shotwell fails to import a single photo, even one
at a time.

For each photo the shotwell log contains a line like this:

IMG_0002.JPG
   error message: [-107] Error retrieving file object for
         /store_feedface/DCIM/100APPLE/IMG_0002.JPG: Unknown error

Yet it gets a thumbnail.

How does it get a thumbnail without getting the photo?

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

It appears to me that upon my move this date to iPhone's iOS 11.3 Apple may have finally given us transparent usb file system access to our photos. See Bug # 1718554, no. 8.

Revision history for this message
Christopher Snowhill (kode54) wrote :

Yes, but this does not grant transparent access to the Documents folders of installed applications. Pairing and libimobiledevice are still needed for that.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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