Apple iPod, iPad, iPhone

This is a placeholder for a more comprehensive article on how to manage an Apple device on a Gentoo system. The goal is to mount the iPod/iPhone/iPad somewhere so that it can be interfaced with by other tools, such as or  or others.

= The idevice Software Stack =

= Pairing = Pairing functionality is provided by. Emerge it, then test it by running:

This should print the device serial number which appeared in your dmesg log.

If this has been successful, run:

to verify that communications with the device are functioning correctly.

Now run:

to pair with the device. Check this with:

QueryType failed, error code -256
This error either appears on its own or followed by failed XML parsing, such as:

In 2011-11, this was due to an Apple update, and git versions of and  were needed.

= Mounting = is supported by, so if you use Gnome, it's easy for you. If not,you will need. Both of these will mount /var/root/Media from the idevice to a target directory. If your device is 'jailbroken', you may use the --root flag to gain access to the root of the device.

Note that media files must be in /var/mobile/Applications//.data/Movies/ to be accessible by applications running on the device. More on this later.

Simply emerge gvfs with USE="ios", and it should auto-mount it for you.

First, emerge ifuse, then try running it:

Users wishing to access the idevice must be members of the plugdev group, and must have write-access to the mount point. [RootCommand|gpasswd -a USER plugdev] Remember, you need to start a new user session after doing this for it to take effect. Most users quit their window manager and re-enter it to do this.

Create a mount-point for the Media folder on the device. {{RootCmd|mkdir /media/ipad-Media]

Create some App-specific mount points (I use the AppIDs as directory names, more on finding them later) {{RootCommand|mkdir /media/ipad-com.apple.iBooks /media/ipad-com.olimsoft.oplayer.hd.lite}}

Set appropriate permissions. {{RootCmd|chown root:plugdev /media/ipad*}} {{RootCmd|chmod 775 /media/ipad*}}

Now mount the device as a user. First, the Media "partition": {{Command|ifuse /media/ipad-Media}} Now an App's Documents folder: {{Command|ifuse --appid com.olimsoft.oplayer.hd.lite /media/ipad-com.olimsoft.oplayer.hd.lite}} Finally, the device root (jailbroken devices only): (UNTESTED) {{Command|ifuse --root /media/ipad-root}}

If the preceding steps worked, this should be enough to mount the device. This can be automated using udev and whatnot (see udev documentation for this).

You should note that the author's experience is that throughput is slow, and is seriously affected by multiple copies in parallel - iotop reports transfer rates of approximately 1200 KiB/s for a single transfer, but a total of 600 KiB/s for two in parallel.

GnuTLS Error: A TLS packet with unexpected length was received
In 2010, this could be solved by re-merging and. Forum Thread.

Permissions
Make sure that you are mounting as a normal user.

= Transferring Media =

For transferring audio files to the idevice, mount the Media partition, make sure that your user can read and write files there and point gtkpod at it.

To Specific Applications
ifuse can also mount areas of the ipad by AppID, which allows the user to transfer files, which may then be used by the particular application. The AppID is a kind of namespace, particular to each application.

To find these AppIDs, you must install.

List the AppIDs of the Apps currently installed on your device.

Mount by AppID:

Now you are free to copy files to the mounted folder, which will be accessible to that App (iBooks in this example).

= References =
 * Marcan's Blog
 * HFS+ on Unofficial Gentoo Wiki
 * unl0cker's Hackintosh Post