Jailbreaking the iPad - in Ubuntu

July 2010

(For more resources on Ubuntu, see here.)

What is jailbreaking?

Jailbreaking an iPhone or iPad allows you to run unsigned code by unlocking the root account on the device. Simply, this allows you to install any software you like - without the restriction of having to be in the main Apple app store. Remember, jailbreaking is not SIM unlocking. Jailbreaking voids the Apple-supplied warranty.

What does this mean for developers?

The mass availability of jailbreaking for these devices allows developers to write apps without having to shell out Apple's developer fees. Previously a one-off payment of $300 US, an "official" developer must now pay $100 US each year to keep the right to develop applications.

What jailbreaks are available?

Arguably the most advanced jailbreak available now is called Spirit. Though unlike a few others, which can now hack iOS 4.0, Spirit differs in a few key features. Not only is Spirit the first to be able to jailbreak the iPad, but this jailbreak also allows an "untethered" jailbreak - you won't have to plug it into a computer every boot to "keep" it jailbroken. Support for jailbreaking iOS 4.0 is coming soon for Spirit.

There are tutorials on jailbreaking using Spirit, like this one, but they generally skip over the fact that there's a Linux version, and only talk about Windows and/or OS X.

Jailbreaking the iPad

A very simple process, you can now jailbreak the iPad very quickly thanks to excellent device support and drivers in Ubuntu. Please note that from now on, you should only plug in the device to iTunes 9 before 9.2, or better still, just use Rhythmbox or gtkpod to manage your library.

  1. Install git if you haven't already got it:

    sudo apt-get install git

  2. Clone the Spirit repository:

    git clone http://github.com/posixninja/spirit-linux.git

  3. Install the dev package for libimobiledevice:

    sudo apt-get install libimobiledevice-dev

  4. Enter the Spirit directory and build the program:

    cd spirit-linux

  5. I've noticed that though Ubuntu has excellent Apple device support, and you can mount these devices just fine, that the jailbreak program won't detect the device without iFuse. Install this first:

    sudo apt-get install ifuse

  6. Now for the fun! Plug in your iPad (you'll see it under the Places menu) and run the jailbreak:


    You'll see output similar to this:

    INFO: Retriving device list
    INFO: Opening device
    INFO: Creating lockdownd client
    INFO: Starting AFC service
    INFO: Sending files via AFC.INFO: Found version iPad1,1_3.2
    INFO: Read igor/map.plist
    INFO: Sending "install"
    INFO: Sending "one.dylib"
    INFO: Sending "freeze.tar.xz"
    INFO: Sending "bg.jpg"
    INFO: Sending files complete
    INFO: Creating lockdownd client
    INFO: Starting MobileBackup service
    INFO: Beginning restore process
    INFO: Read resources/overrides.plist
    DEBUG: add_file
    DEBUG: Data size 922:
    DEBUG: add_file
    DEBUG: Data size 0:
    DEBUG: start_restore
    DEBUG: Sending file
    DEBUG: Sending file
    INFO: Completed restore
    INFO: Completed successfully

    The device will reboot, and if all went well, you'll see a new app called Cydia on the home screen. This is the app that allows you to install other apps.

  7. Open Cydia. Cydia will ask you to choose what kind of user you are. There's no harm in choosing Developer; you'll just see more information. Also, if you choose the bottom level (User) console packages like OpenSSH will be hidden from you. You'll also receive some updates; install them. Interestingly, Cydia uses the deb package format, just like Ubuntu:

  8. That's it! Wasn't that quick?

(For more resources on Ubuntu, see here.)

Using the device's terminal (rooting the device)

Now that you've jailbroken the iPad, you can use the terminal on the iPad from your computer, as the superuser (root) account. You can install OpenSSH on the iPad, allowing remote access. This process turns the iPad into a powerful Unix system.

First up, install OpenSSH through Cydia. Select "OpenSSH Access How-To" on the Cydia main screen.

Select the OpenSSH link, and install the app.

Now, to find out the local IP address of your device. Go back to the home screen, and open Settings. If you're using wireless LAN, select Wi-Fi, then select the arrow next to the network.

On your computer, open a terminal and log in to the device:

ssh root@

You may have to wait for up to a minute, or even two, for the iPad to generate host keys. Once you are prompted, type "yes" and hit enter:

delan@delan:~/Build/spirit-linux$ ssh root@
The authenticity of host ' (' can't be established.
RSA key fingerprint is 4f:1f:f0:70:b8:40:47:84:23:5f:f0:a2:b6:07:56:3e.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '' (RSA) to the list of known hosts.

Here's a crucial part of the setup. Some people claim that jailbreaking your device makes it less secure - but this is partly due to people not changing the root accont's password. The default password for root is "alpine":

root@'s password: alpine

You are now logged into the iPad as root, with a fully functional Unix shell. Be careful; slip up and you may destroy all of the iPad's data!

Make sure you change the root account's password as soon as possible after you've finished testing. To change the root account's password, just use the passwd command:

AzaPad:~ root# passwd
Changing password for root.
New password: password here
Retype new password: password here
AzaPad:~ root#

A note on syncing the iPad

Currently, Ubuntu has excellent support for connectivity with Apple mobile devices. Ubuntu has the ability to control the full music library on all iPods and iPhones. However, full iPad support is yet to be finalised. Currently, making changes to the library will throw an "Unsupported checksum type" error - at least in gtkpod. The reason for this is that libimobiledevice hasn't included the necessary hash code for the iPad library. I've filed this as a bug; and here's what sukimashita had to say:

Will the iPad (using OS 3.2) work with libimobiledevice?
Yes it will. We tested access and all tools work as expected. Changes are in GIT and support arrives in the next releases.

Will iPhone OS 4.0 be supported by libimobiledevice?
Access and tools should work fine. However, the music database hashing has changed with OS 3.2 again. As the OS will also be used on current iPhone and iPod Touch models, libgpod will have to gain support to support the new hashing aswell.


In this article we have covered how to jailbreak your iPad with ease, and without Windows or OS X.

Further resources on this subject:

You've been reading an excerpt of:

Hacking Vim 7.2

Explore Title