iOS device contents not displayed in Ubuntu

Bug #1623666 reported by NoBugs! on 2016-09-14
354
This bug affects 76 people
Affects Status Importance Assigned to Milestone
gnutls28 (Ubuntu)
Medium
Unassigned
libimobiledevice (Ubuntu)
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.

Launchpad Janitor (janitor) wrote :

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

Changed in libimobiledevice (Ubuntu):
status: New → Confirmed
per (eura) on 2016-10-06
Changed in libimobiledevice (Ubuntu):
status: Confirmed → Fix Committed
status: Fix Committed → Confirmed
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) on 2016-10-07
Changed in libimobiledevice (Ubuntu):
assignee: nobody → per (eura)
NoBugs! (luke32j) wrote :

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

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

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).

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.

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

Sam Gleske (sam-mxracer) wrote :

I am using Ubuntu 16.04.

Sam Gleske (sam-mxracer) on 2016-11-01
tags: added: xenial
Sam Gleske (sam-mxracer) wrote :

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

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
Launchpad Janitor (janitor) wrote :

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

Changed in gnutls28 (Ubuntu):
status: New → Confirmed

The affected hardware is non-core.

Changed in libimobiledevice (Ubuntu):
importance: High → Medium
Changed in gnutls28 (Ubuntu):
importance: Undecided → Medium

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

Changed in libimobiledevice (Ubuntu):
assignee: per (eura) → nobody
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).

Sam Gleske (sam-mxracer) wrote :

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

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

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?

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.

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).

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) on 2016-12-14
Changed in gnutls28 (Ubuntu):
assignee: nobody → zckhoa (zckhoa)
assignee: zckhoa (zckhoa) → nobody
J. McDonald (mcdonald-joseph) wrote :

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

Ulf Mehlig (umehlig) wrote :

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

Karli Sjöberg (karli.sjoberg) wrote :

Same here with Xubuntu 16.04 and iOS 10.2.

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.

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.

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

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.

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 ;-)

PascalC (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) on 2017-01-08
summary: - iOS10 will not connect to Ubuntu
+ iOS device contents not displayed in Ubuntu
tags: added: yakkety
description: updated
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 :-(

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) on 2017-01-09
description: updated
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.

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

@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

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...

To post a comment you must log in.
This report contains Public information  Edit
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.