I upgraded my iPhone 5s to iOS 10 and could no longer retrieve photos from it. This was unacceptable for me so I worked at achieving retrieving my photos. This document is my story (on Ubuntu 16.04).
Don't forget to set up your environment before building. I typically build and install packages to my local user at $HOME/usr
.
sudo apt-get install -y build-essential git vim
Here's a peek at my .bashrc
settings:
[ ! -d "$HOME/usr/src" ] && mkdir -p "$HOME/usr/src"
export PATH="$HOME/usr/bin:${PATH}"
export PKG_CONFIG_PATH="$HOME/usr/lib/pkgconfig:${PKG_CONFIG_PATH}"
export MANPATH="$HOME/usr/share/man:${MANPATH}"
export CPATH="$HOME/usr/include:${CPATH}"
Enable GnuTLS debug logs with (increase to 99
for most verbosity):
GNUTLS_DEBUG_LEVEL=6
Install deps (found via README):
sudo apt-get install -y git-core autoconf libtool gettext autopoint automake autogen nettle-dev libp11-kit-dev libtspi-dev guile-2.0-dev libtasn1-6-dev libidn11-dev gawk gperf git2cl libunbound-dev dns-root-data bison help2man gtk-doc-tools texinfo texlive texlive-generic-recommended texlive-extra-utils
Clone GnuTLS source:
cd ~/usr/src
git clone https://gitlab.com/gnutls/gnutls.git
cd gnutls
git submodule update --init
Build GnuTLS:
make bootstrap
./configure --prefix=$HOME/usr
make && make install
Install development packages discovered through trial and error.
sudo apt-get install libbz2-dev python-dev autoconf automake libtool pkg-config libplist-dev libplist++-dev libusb-1.0-0-dev libgcrypt20-dev libgnutls28-dev libgpg-error-dev libfuse-dev
Clone the sources.
cd ~/usr/src
for x in libusbmuxd usbmuxd libimobiledevice ifuse; do git clone git@github.com:libimobiledevice/${x}.git;done
Now build in order (the order matters):
- libusbmuxd
- usbmuxd
- libimobiledevice
- ifuse
cd ~/usr/src/libusbmuxd
./autogen.sh --prefix="$HOME/usr"
make && make install
Unfortunately, sudo make install
is required because it needs to write to /lib/udev/rules.d
and /lib/systemd/system
.
cd ~/usr/src/usbmuxd
./autogen.sh --prefix="$HOME/usr"
make && sudo make install
cd ~/usr/src/libimobiledevice
./autogen.sh --prefix="$HOME/usr"
make && make install
cd ~/usr/src/ifuse
./autogen.sh --prefix="$HOME/usr"
make && make install
Create a mount point and verify the paths of the tools before executing.
$ mkdir -p ~/usr/mnt
$ type -p ifuse
/home/sam/usr/bin/ifuse
$ type -p idevicepair
/home/sam/usr/bin/idevicepair
Now attempt to mount using ifuse.
$ export GNUTLS_DEBUG_LEVEL=99
$ idevicepair pair
SUCCESS: Paired with device 37b633350ab83dc815a6a97dcd6d327b12c41968
$ ifuse ~/usr/mnt/
gnutls[2]: Enabled GnuTLS 3.4.10 logging...
gnutls[2]: Intel SSSE3 was detected
gnutls[2]: Intel AES accelerator was detected
gnutls[2]: Intel GCM accelerator was detected
gnutls[5]: REC[0x6b45c0]: Allocating epoch #0
gnutls[3]: ASSERT: gnutls_constate.c:596
gnutls[5]: REC[0x6b45c0]: Allocating epoch #1
gnutls[4]: HSK[0x6b45c0]: Keeping ciphersuite: GNUTLS_RSA_AES_128_CBC_SHA1 (00.2F)
gnutls[4]: HSK[0x6b45c0]: Keeping ciphersuite: GNUTLS_RSA_AES_256_CBC_SHA1 (00.35)
gnutls[4]: EXT[0x6b45c0]: Sending extension ENCRYPT THEN MAC (0 bytes)
gnutls[4]: EXT[0x6b45c0]: Sending extension SAFE RENEGOTIATION (1 bytes)
gnutls[4]: EXT[0x6b45c0]: Sending extension SESSION TICKET (0 bytes)
gnutls[4]: HSK[0x6b45c0]: CLIENT HELLO was queued [62 bytes]
gnutls[11]: HWRITE: enqueued [CLIENT HELLO] 62. Total 62 bytes.
gnutls[11]: HWRITE FLUSH: 62 bytes in buffer.
gnutls[5]: REC[0x6b45c0]: Preparing Packet Handshake(22) with length: 62 and min pad: 0
gnutls[9]: ENC[0x6b45c0]: cipher: NULL, MAC: MAC-NULL, Epoch: 0
gnutls[11]: WRITE: enqueued 67 bytes for 0x6b7bf0. Total 67 bytes.
gnutls[5]: REC[0x6b45c0]: Sent Packet[1] Handshake(22) in epoch 0 and length: 67
gnutls[11]: HWRITE: wrote 1 bytes, 0 bytes left.
gnutls[11]: WRITE FLUSH: 67 bytes in buffer.
gnutls[11]: WRITE: wrote 67 bytes, 0 bytes left.
gnutls[3]: ASSERT: gnutls_buffers.c:1154
gnutls[10]: READ: -2 returned from 0x6b7bf0, errno=0 gerrno=0
gnutls[3]: ASSERT: gnutls_buffers.c:367
gnutls[3]: ASSERT: gnutls_buffers.c:588
gnutls[3]: ASSERT: gnutls_record.c:1038
gnutls[3]: ASSERT: gnutls_record.c:1158
gnutls[3]: ASSERT: gnutls_buffers.c:1409
gnutls[3]: ASSERT: gnutls_handshake.c:1446
gnutls[3]: ASSERT: gnutls_handshake.c:2757
gnutls[5]: REC[0x6b45c0]: Start of epoch cleanup
gnutls[5]: REC[0x6b45c0]: End of epoch cleanup
gnutls[5]: REC[0x6b45c0]: Epoch #0 freed
gnutls[5]: REC[0x6b45c0]: Epoch #1 freed
GnuTLS error: Error in the pull function.
Failed to connect to lockdownd service on the device.
Try again. If it still fails try rebooting your device.
@samrocketman I'm not proficient in linux, but I have a question before attempting this process(I have attempted several at this point). What if the iPhone 5 running IOS 10.3.3 is disabled? When I connect it to Ubuntu 16.04, it recognizes the iPhone and mounts it with no visible icons. Is it even possible to get any data off a fully Disabled iPhone?