iPhone backup in Fedora?

Hey everyone,

I recently learned how to use idevicebackup2 to backup my iPhone in Linux. It works great in Ubuntu. I can pair my phone and perform an encrypted backup without issues.

However, I simply cannot get it to work in Fedora. I have all the necessary utilities installed: libimobiledevice-utils, usbmuxd, etc. However, I keep getting the same error message:
“Could not perform backup protocol version exchange, error code -1”.

It seems like many other Linux users have experienced this and have been able to make it work by “building” the tool from source? I’m not very tech savvy, so I honestly have no idea how to do that… Can anyone help?

I don’t know why it works so well in Ubuntu but not Fedora, as Fedora’s repository seems to be up to date.

Thanks for reading.

I think this might be because the version in most repos is too old. I noticed on Archlinux they build directly from git with libimobiledevice-git. Seems this project doesn’t do regular releases, so that means you’ll need to compile from git checkout.

You’ll first you would need to satisfy the dependencies:

dnf groupinstall "Development Tools"

Don’t try and use usbmuxd from Fedora, as it, and it’s dependencies are too old to be compiled against the master repo, as this post points out.

As for the other packages, you’ll need:

dnf install gcc-c++ libtool libusb1 libusb1-devel python python-devel cython openssl openssl-devel

Then the compile instructions should work:

git clone https://github.com/libimobiledevice/libplist
git clone https://github.com/libimobiledevice/libimobiledevice-glue
git clone https://github.com/libimobiledevice/libusbmuxd
git clone https://github.com/libimobiledevice/libimobiledevice
git clone https://github.com/libimobiledevice/usbmuxd
cd libplist
make && sudo make install
sudo ldconfig
cd ..
cd libimobiledevice-glue
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./autogen.sh
make && sudo make install
sudo ldconfig
cd ..
cd libusbmuxd
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./autogen.sh
make && sudo make install
sudo ldconfig
cd ..
cd libimobiledevice
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./autogen.sh --enable-debug
make && sudo make install
cd ..
cd usbmuxd
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var --runstatedir=/run
make && sudo make install
sudo killall usbmuxd

It is a bit annoying, ideally they would have an official COPR repository they push to.

It might be worth looking into toolbox so you don’t clutter up your system with files that weren’t installed by an RPM.

1 Like

Thanks so much, @dngray. I will give this a shot and let you know how it goes!

A GUI that runs idevicebackup2 would have my vote for app of the year! :grin:

Hey @dngray . Wanted to let you know that your instructions worked like a charm!

I was able to easily backup my iPhone to Fedora and have now completely eliminated Windows from my PC.

Thanks again for your help!