It has been well over a year since I last used an ‘i device’, but had an opportunity to do so today after buying a cheap iPhone with a broken screen after struggling without a phone for a week. The last device iDevice I used was an iPod touch, and I remember having trouble getting it to play nicely with my OS of choice, Ubuntu, as Apple does not provide a version of iTunes for Linux. For a brief moment, I considered installing iTunes through Wine, but decided it wasn’t worth the risk of wrecking my finely tuned dev machine.
Hoping things would have changed since, I naively plugged the phone in, but nothing happend. I turned to my wise old friend, Google for advice. Sure enough, the first few results all suggested installing iTunes with Wine (with some people strongly advicing against the idea).
After digging around a bit, I stumbled upon this awesome opensource project called libimobiledevice which aims to add support for these devices on the Linux desktop, without using proprietary / closed source software. From the project’s website:
libimobiledevice is a software library that talks the protocols to support iPhone®, iPod Touch®, iPad® and Apple TV® devices. Unlike other projects, it does not depend on using any existing proprietary libraries and does not require jailbreaking. It allows other software to easily access the device’s filesystem, retrieve information about the device and it’s internals, backup/restore the device, manage SpringBoard® icons, manage installed applications, retrieve addressbook/calendars/notes and bookmarks and (using libgpod) synchronize music and video to the device. The library is in development since August 2007 with the goal to bring support for these devices to the Linux Desktop.
To install the library, you simply add the ppa, update your sources list and finally install it with aptitude.
apt-add-repository ppa:pmcenery/ppa apt-get update apt-get install libimobiledevice2 gvfs libimobiledevice-utils ifuse
After everything installs, you have to restart your Desktop session (by logging out / logging back in) then connect your i device to your computer. Open up a terminal and type ‘ideviceinfo’. If it prints out information on your device, congratulations, your phone is connected. You should now be able to transfer your media using a program like Rythmbox or Banshee.
If you still get an error such as “Unable to mount iPhone. Unhandled Lockdown error (-5)” or something similar, try the following:
- Unplug the device from your computer
- Unlock the device’s screen
- Plug it back in
- Type the following into a terminal:
idevicepair unpair && idevicepair pair
- If you get something like: SUCCESS: Unpaired with device 796f6ae4498ac15d0980fa007a2
SUCCESS: Paired with device 796f6ae4498ac15d0980fa007a2
- You should then be able to see your phone like a drive on your computer.