You will need windows or Mac for the first moment and then you’ll be free. I have a VMware image in my computer and I could never make it work with USB, this time I had a chance to look after this issue and found out why. Linux’s VMWare doesn’t work with USB 2.0, to workaround this you can either change it to 1.1 through software (Kernel or BIOS) or you can use a USB 1.1 Hub, another option is using a temporary machine with windows, I have one at work and that’s what I did.
You need to install the latest iTunes and then install a software called iBrickr. The interface is designed to read like an interactive tutorial - just download the Zip file, extract it somewhere and run ibrickr.exe. You only need to install the application Installer, which will make it possible to install things directly from an iPhone connected to Wi-Fi or EDGE. From now on you won’t need Windows or Mac anymore.
Setting up your iPhone
1. Go to your iPhone and connect to the internet
2. Open Installer and install OpenSSH
3. Find the ip address you are connected to, ssh to it. Will take a minute or so to generate the keys for the first time. Enter the default password dottie, change it and log out.
Mounting iPhone on Linux
Now we need to make your Linux machine able to mount a directory remotely through ssh. You have two options, you can either use Ubuntu or command line sshfs, I will use sshfs here.
sudo apt-get install sshfs
Add yourself to the fuse group
sudo adduser johndoe fuse [Replace johndoe with your username]
Re-authenticate using su - johndoe to avoid /dev/fuse errors later on (or reboot). We’ll be leaving this terminal open for the rest of this guide. Turn off auto-lock on your iPhone by going to Settings -> General -> Auto-Lock -> Never, if it shut down you will lost carrier.
When running sshfs you may receive errors. Common ones are about /dev/fuse - logout, reauthenticate using su - johndoe, or rebooting is a simple solution (although not needed).
Finally mount it
sshfs root@iphone-ip-address:Media /media/iphone-media/
Installing latest Gtkpod
Now we’ll set up gtkpod, it will be installed in a different directory and won’t affect your current installation. Check out libgpod and gtkpod via svn.
svn co https://gtkpod.svn.sourceforge.net/svnroot/gtkpod/gtkpod/trunk gtkpod
svn co https://gtkpod.svn.sourceforge.net/svnroot/gtkpod/libgpod/trunk libgpod
Install libgpod
cd libgpod
mkdir ~/storage
./configure --prefix=~/storage
make && make install
And now the gtkpod
cd ../gtkpod
PKG_CONFIG_PATH=~/storage/lib/pkgconfig ./configure --prefix=~/storage
make && make install
Create a ~/bin/gtkpod-local.sh with the following content:
#!/bin/bash
LD_LIBRARY_PATH=~/storage/lib ~/storage/bin/gtkpod
Give permission to execute
chmod +x ~/bin/gtkpod-local.sh
Use your script to run it and you can use it just like a normal device that has been mounted, set the exact version of your device, ignore any errors about mmap’ing the ArtworkDB, or about not having permission to copy the playcount file. The current version doesn’t support album images, but someone is working on a patch and should be ready soon.
After transferring your data you might want to restart the iPhone, open the iPod program, then hold the home button for a solid three seconds, this will restart springboard and have it read the newly written database, your music should be available right away.
To unmount use:
fusermount -u ~/iphone-media
If you enjoyed this post, make sure you subscribe to my RSS feed!