Changing iPod Mountpoint

HAL will mount an attached iPod to /media/<iPod name>. If the volume label of your iPod is long, or contains a mixture of spaces, and/or lower-case and capital letters, it may present an inconvenience. You may easily change the volume label for more expedient access using mlabel from the mtools package:

Get and confirm the current volume label:

# mlabel -i /dev/sdxx -s ::

Set the new volume label (as iPod)

# mlabel -i /dev/sdxx -s ::iPod

Where /dev/sdxx is the current mountpoint of your iPod.

HAL will now automount iPod to /media/iPod.

Importing videos and pictures

Both videos and photos can be found in typically in `$mnt/DCIM/100APPLE`. My $mnt is /media/iphone.

HTML5 videos

Typically you want to convert MOV files to a HTML5 video format like OGV using ffmpeg2theora. Note that the creation date metadata is not in the converted video, so you need to use a script like:

iPhone/iPod Touch

Introduction

By default, neither the iPhone nor the iPod Touch present mass storage capability over USB, though there exist two solutions for accessing your files.

The first is to mount your device through the FUSE filesystem SSHFS. This requires jailbreaking, which at the moment requires access to a computer running Mac OS or a recent version of Windows, and QuickPwn. After jailbreaking, an SSH server will also need to be installed on the device, which can be done through the Cydia program, installed on the device during the jailbreak process.

The second is to use a different FUSE filesystem called iFuse, which allows you to mount your device through USB, as you normally would. This method requires no hacking and is in general the better solution, though be aware that the software is still under heavy development. As of late, however, it has proven to be rather reliable and stable.

Note: The current releases of libgpod and gtkpod from the "extra" repository support the iPod Touch and the Iphone OS 3.1.x up to iOS 4.3.x. It's possible to transfer pictures and music without limitations

(I'm not sure under what circumstances this is necessary; it was on my iPod Touch running 2.2.1, and it won't have any adverse affect under other firmware version)

After that, edit the /etc/default/ipod-convenience file with details of your device's IP address, and create the mount pount, which is /media/ipod by default (make sure to set the permissions correctly if you want it accessible by a regular user)

To actually mount the device, run ipod-touch-mount or iphone-mount (they both do exactly the same thing so it doesn't matter which). This should prompt for the root password of the device twice, which is 'alpine' by default in firmware versions 1.1 and up. This will need to be done every time you want to sync. (This can be done without having to type the password each time by using SSH keys - see Using SSH Keys for more information)

The iFuse Way

Note: If using an iPad/iPad2 that has a screen password, one must unlock the device to gain access through the USB interface.

Note: The current version of ifuse is unable to mount an iPad2 using iOS v5.0.1.

You will need to install usbmuxd, libplist, libimobiledevice, ifuse. You can pull in all four with:

# pacman -S ifuse

Now make sure that you have the fuse module loaded by doing modprobe fuse, assuming that you do not have it in /etc/rc.conf already.

You can now mount your device. Make sure it is unlocked before you plug it in, or it won't be recognized.

# ifuse <mountpoint>

The mountpoint field is where you want to have it mounted.

And you're done! You should be able to point your syncing software of choice to the mountpoint and be able to transfer files.

Unobfuscating the Database

Since firmware version 2.0, Apple has obfuscated the music database. If you are using recent firmware, the file /System/Library/Lockdown/Checkpoint.xml can be modified to enable use of the older, non-obfuscated database. Replace:

<key>DBVersion</key>
<integer>4</integer>

with:

<key>DBVersion</key>
<integer>2</integer>

Then reboot your device.

If syncing fails with "ERROR: Unsupported checksum type '0' in cbk file generation!", you may need to leave this at 4. libgpod seems to expect a hashed database.

Syncing

Use your favourite iPod-compatible program. Individual configuration will vary, but in general, pointing your program to your specified mount point should yield good results.

After you've synced, run ipod-touch-umount (or iphone-umount, depending on your taste) to unmount the SSHFS file system and restart the MobileMusicPlayer process on the device, so that the new music database is read.

If you used iFuse, simply type:

# umount <mountpoint>

You will still need to reload the MobileMusicPlayer process. If your device is not jailbroken, then you are stuck restarting it.

The iFuse Way - iPhone OS 3.x and 4.x

Warning: this software is considered unstable and should probably not be used in a productive environment

Make sure you already installed base-devel, which contains several programs needed to compile your new components. If you did not, just run:

Now make sure that you have the fuse module loaded by doing modprobe fuse, assuming that you do not have it in /etc/rc.conf already.
Check if the group "usbmux" has been created and add your user using

# gpasswd -a <user> usbmux

To make sure the new rules apply, execute

$ udevadm control --reload-rules

and plug in your iPod/iPhone.

Run as ROOT:

# usbmuxd

Now you should the be able to mount your device by running

$ ifuse ~/ipod

or similar. Make sure the directory used exists and is accessible to your user.

Mount the device and create the iTunes_Control/Device directory. Then, get your UUID. It should be in the syslog from usbmuxd, or you can find it by running

$ lsusb -v | egrep "iSerial.*[a-f0-9]{40}"

It should be 40 characters long. Then, run

$ ipod-read-sysinfo-extended <uuid> <mountpoint>.

This should generate a file named iTunes_Control/Device/SysInfoExtended.

Now, start up your favourite app, it should detect the device via libgpod.
I recommend using gtkpod-git for the time being, as that's what the libgpod devs seem to be using for debugging purposes.

Rhythmbox

Rhythmbox uses the Gnome Virtual File System to detect mobile devices. If using the iFuse way, gvfs-afc needs to be installed:

# pacman -S gvfs-afc

iPod Classic/Nano3g

You need to set up the iPod to make libgpod able to find its firewire id. For this, you will need to get your firewire id manually

1) Mount the iPod as a rw mountpoint. In the following example, I will use /mnt/ipod.

2 ) Find the serial number by typing

sudo lsusb -v | grep -i Serial

this should print a 16 character long string like 00A1234567891231 (it will have no colons or hyphens)

3) Once you have that number, create or edit /mnt/ipod/iPod_Control/Device/SysInfo. Add to that file the line below:

FirewireGuid: 0xffffffffffffffff

(replace ffffffffffffffff with the 16 digit string you obtained at the previous step and do not forget the trailing 0x before the string)

Add MP3, WAV, M4A (non-protected AAC), M4B (audio book), podcasts, and various video files (single files, directories or existing playlists) to the **iPod. You need a third party product to download podcasts, like 'bashpodder' or 'gpodder'

View, add and modify Cover Art

Browse the contents of your local harddisk by album/artist/genre by adding all your songs to the 'local' database. From there the tracks can be **dragged over to the iPod/Shuffle easily.

Create and modify playlists, including smart playlists.

You can choose the charset the ID3 tags are encoded in from within gtkpod. The default is the charset currently used by your locale setting.

Extract tag information (artist, album, title...) from the filename if you supply a template.

Detect duplicates when adding songs (optional).

Remove and export tracks from your iPod.

Modify ID3 tags -- changes are also updated in the original file (optional).

Refresh ID3 tags from file (if you have changed the tags in the original file).

Sync directories.

Normalize the volume of your tracks (uses mp3gain or the replay-gain tag)

Write the updated iTunesDB and added songs to your iPod.

Work offline and synchronize your new playlists / songs with the iPod at a later time.

Export your korganizer/kaddressbook/thunderbird/evocalendar/evolution/webcalendar... data to the iPod (scripts for other programs can be added).