Getting your iPhone to play nice with Ubuntu

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:

  1. Unplug the device from your computer
  2. Unlock the device’s screen
  3. Plug it back in
  4. Type the following into a terminal:
    idevicepair unpair && idevicepair pair
    
  5. If you get something like: SUCCESS: Unpaired with device 796f6ae4498ac15d0980fa007a2
    SUCCESS: Paired with device 796f6ae4498ac15d0980fa007a2
  6. You should then be able to see your phone like a drive on your computer.
  7.  

    You might also like
    Alfresco on Ubuntu – Complete Installation Guide
    In an earlier post, I had outlined the process of installing Alfresco on a 32-bit Ubuntu server. This walkthrough documents the steps required to get Alfresco going on a 64-bit ...
    READ MORE
    Manually Installing Alfresco on Ubuntu Server
    I had to install Alfresco recently on a 32 bit server. Since Alfresco does not provide a 32 bit installer any more, I had to put everything together manually, and ...
    READ MORE
    Nexus 7
    I have had the pleasure of using a Nexus 7 for the past few days, and while it is a fantastic tablet all around, there is one minor roadblock I ...
    READ MORE
    Block entire countries on Ubuntu server with Xtables and GeoIP
    Anyone who has administered even a moderately high traffic server will have noticed that certain unwelcome traffic such as port scans and probes tend to come from IP addresses belonging ...
    READ MORE
    Alfresco on Ubuntu – Complete Installation Guide
    Manually Installing Alfresco on Ubuntu Server
    Connecting the Google Nexus 7 to Ubuntu /
    Block entire countries on Ubuntu server with Xtables

Leave a Reply

Your email address will not be published. Required fields are marked *


− 3 = six

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>