ACPI administration advocacy advocacy advocacy opinion alsa amarok apache apple apt aptitude archive audio audo authentication automount avi awk backup bash BIOS boot browser business bzip cache calendar calibre cdr cdrecord censorship commandline computerscience console convert cron cut database date debian degree design desktop development disk dpkg dvd economics education emacs email europe exim faad ffmpeg file files firefox firewall flash foss freedom ftp fun fuse git gnumeric graphics grep growisofs grub gtkpod gzip hardware hardware html icedove idiocy image imagemagick images installation ip iphone ipod iptables iso itunes ivman kde kernel keyboard knoppix lame laptop latex libreoffice linux locale lockin locking longlines lsof m4a microsoft mimetypes minitab mogrify mount mp3 mp4 mplayer multimedia music mysql network nfs nfs4 nmap openbox openfiles openoffice opinion opinion orgmode partition pdf pdftk perl php podcast politics pomodoro ports postgresql print printing privacy process programming rant remote rhythmbox rss rsync rxvt scp screengrab screenshot script scripting scsi security sed server services shell siteadmin sitenews sitesoftware skype skype slackware sound sox spam spreadsheet ssh statistics subversion sudo svk swap t23 t43 tar terminal tex text thinkpad thunderbird time timer timezone ubuntu udev upgrade usb usbmount users uuid versioncontrol vfat video vnc windows wine wordpress wordprocessing X40 xwindows xwindows youtube
There's nothing like an iPod; sleek, beautiful, pleasing to the eye, and totally useless thanks to Apple's insistence on trying to stop you doing what you want with your devices. Are the iPod touch and iPhone two of the most useless devices ever to come from a tech company?
I had previously managed iPods using the excellent gtkpod, but the iPod touch is a different matter. Unlike other iPods which just mount as disks, the iPod touch doesn't. Apple in their infinite idiocy decided to encrypt the iPod touch like they do all iPhones. The iPod touch and the iPhone are very similar; essentially the iPod touch is sort of an iPhone without the 'Phone' bit. I guess that just makes it an 'i'.
Here's what I learned by getting an iPod touch working with Linux.
Before we start, I need to mention that you need the fuse ("Filesystem in Userspace") kernel modules. You also need the ifuse package, which provides a means of communicating with iPhone type devices.
sudo aptitude install ifuse
You will probably also need to make a mount point for the iPod touch or iPhone. Make it somewhere sensible, like under the /media/ directory.
sudo mkdir /media/iPod
You must, must, must make sure that the mount point is writable by the user going to administer the iPod touch. There are lots of ways to do this, but I did:
sudo chown me /media/iPod
Now, make sure that your user is in the 'fuse' group. If necessary do:
sudo adduser me fuse
Once done log out and log in again. Make sure the iPod touch or iPhone is connected to the computer and mount it:
You can then unmount it by doing:
sudo umount /media/iPod
If on the other hand you do:
ifuse --root /media/iPod/
You get access to the iPod's root directory. Once you do that, you might be amazed at the elegance of the BSD base of the iPod's operating system. It's such a pity Apple cripples it.
It's cool if all that works for you, unfortunately, it didn't work for me. Instead I got the following error:
Failed to start AFC service 'com.apple.afc2' on the device. This service enables access to the root filesystem of your device. Your device needs to be jailbroken and have this service installed. Note that PwnageTool installs it while blackra1n does not.
Although I could browse the iPod file system, I could neither play, copy nor save files. In essence the iPod was useless unless I jailbroke it.
WARNING: DOING ANY OF THE BELOW MAY VOID YOUR APPLE WARRANTY AND COULD DAMAGE YOUR IPOD OR IPHONE
Jailbreaking sounds so cool, unfortunately it is totally legal in the US and throughout the EU so that little frisson of excitement that I got with the thought I might perhaps be skirting around the edge of the law, was totally unjustified. On the plus side, jailbreaking iPhones and iPod touches really gets up the nose of Apple, which certainly gave me a mild sense of satisfaction. Have I mentioned how much I hate Apple?
Most jailbreaking, also known as 'privilege escalation' applications are for Macs and some for Windows. But they do exist for Linux. The one I used was Spirit Jailbreak, which is an amazingly cool piece of software. Binaries aren't available only the source code. So it needs compiling and you need to install relevant developer libraries:
sudo aptitude install libgpg-error-dev sudo aptitude install libimobiledevice-dev cd ~/src/ # or wherever you like to keep source files git clone https://github.com/posixninja/spirit-linux.git cd spirit-linux make
Once that is done we have the spirit binary, which you run like this:
The jailbreak worked like a dream for me. After running spirit the Cydia icon appears on the iPod desktop. Cydia is the app store for apps that Apple don't approve of. So, any self-respecting geek needs it.
On the iPod, touch the Cydia icon and navigate around until you find 'MobileTerminal' which gives you a command line on the iPod. Install it. Then find 'OpenSSH', which provides ssh software, obviously, and install that too.
Also, use the Cydia appstore to install afc2add to install the afc service to the iPod. When this is installed touch the "REBOOT" button.
Now that you have jailbroken the iPod, you need to change both the root password and the password of the sole user. The name of the user is 'mobile'. The root password is always 'alpine'.
To do this, touch the Terminal icon (which appeared when you installed MobileTerminal). A command line will appear as will a keyboard. On the keyboard type 'su' and give the root password ('alpine' if you weren't paying attention). Now type 'passwd', and you will be prompted to enter the new password twice. Now, type passwd mobile and choose a new password for the user.
At this point, the iPod touch or the iPhone is properly jailbroken and has been promoted from useless piece of electronic crap to interesting computing device.
There was still a problem. gtkpod could copy music files across to the iPod touch, but it couldn't write to the iPod database, so the iPod couldn't see the music that was on its hard disk.
Starting with the 2007 generation of iPods, libgpod needs an additional configuration step to correctly modify the iPod content. libgpod needs to know the so-called iPod "firewire id", otherwise the iPod won't recognize what libgpod wrote to it and will behave as if it's empty.
The first step to fixing this was to get the 40-character unique identifier for the iPod. On your Linux computer do:
lsusb -v | grep -i iSerial
Something like this should appear:
iSerial 3 2fffccffda5c69bc16ea3fc1e53537259ff4a514
The first 16 digits of this is the FirewireGuid. On the iPod there should be a Device/SysInfo file. If not we create it:
cd /media/iPod/iTunes_Control mkdir Device echo "FirewireGuid: 2fffccffda5c69bc" > Device/SysInfo
After doing all that, when I restarted gtkpod, everything was be working.
Using these steps I was able to get gtkpod to read and write to the iPod and I can add and delete music from this originally defective-by-design piece of machinery.
A big thanks to the writer of Spirit Jailbreak, to the developers of gtkpod, of fuse and of everything on Linux that make it possible to conquer Apple's products.
Hi there, thank you very much for this tutorial. I've been able to do everything listed here but when I sync music with my iPod 4g Os 4.3.3 i get the error:
Unsupported Checksum Type