iPhone + Amarok
The iPhone only plays well with iTunes and not with other Music Players like Amarok. However after hacking the iPhone, there is a way around this. When OpenSSH is installed on the iPhone, we can use sshfs to mount the filesystem of the iPhone on our PC and copy the music.
This article assumes your working with Ubuntu (or Debian), but it’s almost similar for other distributions.
Install sshfs
sudo apt-get install sshfs fuse-utils
sudo adduser your-username fuse
Get the IP address of the iPhone
![]()
Mount your iPhone and prepare it for Amarok
sudo mkdir /media/iphone/ -m 777
sshfs root@192.168.1.132:/var/root/Media /media/iphone/
ln -s iTunes_Control /media/iphone/iPod_Control
fusermount -u /media/iphone
Add the device to amarok
Settings –> Configure Amarok –> Add device

Mount / unmount on connect / disconnect
Press the button ‘Configure device settings’ 

Upload your songs and enjoy
Now go to the ‘Devices’ tab and press ‘Connect’. After uploading songs, disconnect the device in Amarok. You need to restart the iPod application before you can play the songs. You can either restart the iPhone or the iPod application by holding the key down for (at least) 5 seconds.
Notice
Make sure the iPhone is and stays switched on and unlocked (no black screen). Otherwise you’ll get a message ‘Media Device: No mounted iPod found’.
If you get a question ‘Media Device: could not find iTunesDB on device mounted at /media/iphone. Should I try to initialize your iPod?’, you either did not create the symlink or the mount has become stale. So disconnect and connect again.
08 Oct 2007 Arnold Daniels





Suse 10.2 64x
The following step gets me an error massage:
# adduser my-username fuse
-bash: adduser: command not found
if I try:
# useradd my-username fuse
useradd: Too many arguments.
useradd is not the same as add user. The command adds the user to a specific group.
If that script is not in the Suse distro, you need to add the user through ‘Users and Groups’ administration screen or just edit /etc/group and add the user to group ‘fuse’ manually.
I see. I can do that, but not manually…
There is only one problem
I don’t have a group called fuse. I can make one… but why is this step important?
Its might important, because if I just skip this step, amarok crashes if I try to connect.
I don’t know anything about Suse, so I can’t help you that specifically. Do you have sshfs and fuse-utils (fusermount) installed?
As a non-root user, you can only use sshfs and fusermount is you are added to the fuse group. You should not use sudo for sshfs and fusermount.
If the step ‘Mount your iPhone and prepare it for Amarok’ works, all should be well and Amarok should not crash.
Just a couple of comments:
1.-Just a couple of comments:
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
1.-Just after:
sshfs root@192.168.1.132:/var/root/Media /media/iphone/
don’t you think there should be a:
cd /media/iphone
just before:
ln -s iTunes_Control /media/iphone/iPod_Control
To avoid confusions?
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
2.-
Upload your songs and enjoy
No go to the ‘Devices’ tab and press ‘Connect’. After uploading songs you need to restart your iPhone.
You miss a “w” just after the “No” this can confuse some users
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
This i know these are dumb issues, but I think is all this post need to be perfect..
Keep up the good work.
Alfredo, it’s not necessary to change the directory, since a full path for the new symlink is provided. Cd-ing to /media/iphone might even give some trouble when unmounting.
Thanks for the comments.
It worked (more or less) in ubuntu feisty. Had to add -o allow_others and -o umask=000 for it to be read/writeable for the user running amarok and it also had a bad side effect on the covers of the albums: destroyed them all….
Now my cover flow is sad and grey
hey thanks for the tutorial. but do you know of any way to force the iphone to not go to sleep, besides having it plugged into power?
Awesome….. you have just made my life sooo much easier. Now that I can use Amarok to sync music, I can finally reload the Windows system I was using ONLY for iTunes. Thanks for the help!
You can disable auto-lock and with that sleep using in:
Settings -> General -> Auto-Lock => Never
Hi, i got this problem :S
jamiro@jamiro-laptop:~$ sshfs jamiro@192.168.0.114:/var/root/Media
read: Connection reset by peer
i’ve looked but i can’t find this error, i even tried to connect by:
jamiro@jamiro-laptop:~$ ssh root@iphone
ssh: connect to host iphone port 22: Connection refused
can you please help me. it’s very frustrating start to think about installing windows :S
about the root@iphone i’ve edited the host and added the ip to iphone, just in case you where wondering where did i got that.
sorry.
JamiroWRX, first of all make sure you have the IP correct by using ping. Second make sure you have openSSH installed and running on your iPhone.
Notice that OpenSSH doesn’t come on the iPhone standard. You need to install it. To install 3rth party software you first need to hack your phone. Please read the first part of the article.
thnxs dude, but i’ve other trouble
when i try to install BSD subsystem the phone show me the follow message
“Error package download failed!”
can u help me again please
iPhone hint – you don’t need to reboot you iPhone.
Just close music player from ssh console and then run it again, here is a command:
kill `ps -A|grep MobileMusicPlayer|grep -v grep|awk '{print $1}'`Holding the home button for about 5 seconds seems to kill the current application as well.
Does album art transfer work using Amarok?
Hi Nic,
Short anwser: No.
Hi Arnold,
thanks a lot, it works fine here except security password policy.
I have uploaded my dsa pubkey on iphone to avoid this.
for interrested ppl :
1- generate your key-pair (it not already done) on your desk :
tm@Naboo:~$ ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/tm/.ssh/id_dsa):
Enter passphrase (empty for no passphrase): [HERE NO PASS ]
Enter same passphrase again: [ HERE NO PASS]
Your identification has been saved in /home/tm/.ssh/id_dsa.
Your public key has been saved in /home/tm/.ssh/id_dsa.pub.
The key fingerprint is:
79:3c:bc:17:ff:41:d3:2d:19:c6:70:e3:15:0d:ae:91 tm@Naboo
2- upload you pubkey on iphone
tm@Naboo:~$ scp .ssh/id_dsa.pub root@192.168.0.100:
root@192.168.0.100’s password:
id_dsa.pub 100% 598 0.6KB/s 00:00
3- setup authorization
tm@Naboo:~$ ssh root@192.168.0.100
# cd .ssh
# mv ../id_dsa.pub authorized_keys
then now it works fine
regards
thomas
Hi Arnold,
I have followed the process exactly and the songs were transferred correctly on my phone. But i cannot see them even after reboot also my ipod application is not working (i cant even navigate to other links like playlists,artists etc inside the ipod application).
my iphone is 1.1.1
pls help..!!!!
im stuck..!!
Hi Vishal,
I’m running 1.0.3 myself, so it might not work on later versions. I haven’t tried and am not planning to update my iPhone.
Try to delete the whole iTunes_Control directory and connect it to iTunes to let it create a new one. That use Amarok to just copy 2 or 3 song to the iPone and see if it will work.
As johnny suggested, instead of rebooting just hold the button down for 5 seconds when the iPod app is started. This kills the app and next time it will re-read the iTunesDB file.
If somebody has some info to help Vishal, please leave a comment.
I was having problems, ran amarok as root. Works great.
Correction, it seems to have not updated the DB after transferring music. Only bought albums stay. Have tried restart. Any ideas?
I see that album art does not transfer, which I have definitely verified. However I have not seen anyone say that all of your other songs with album art will get messed up. That happened to me, the album art is completely random now. Can anyone else confirm this?
Over at the ubuntu forum they have put down a simple script that uses rsync to sync out the metadata and then only mounts the Musik folder. Apparently this fixes artwork for gtkpod. But when I try to use this script with amarok it says it can’t find a device at /media/iPod which is probably because only /media/iPod/iTunes_control/Music is mounted. Any idea how to fix this?
I believe Snyke means this thread:
http://ubuntuforums.org/showthread.php?t=588246&highlight=rsync+itunes_control
Snyke have you tried this?
http://www.nabble.com/iPhone-thumbnails-t4386424.html
It should prevent the album art from being messed up, but I haven’t tried it myself.
Thanks Arnold that is exactly the thread I was talking about, sorry for not posting the link but it’s kinda hard to copy links on an iPod
Anyway my artwork is not actually messed up, I’d just like to be able to sync the covers using amarok which doesn’t like mounting the rsynced version of the iPod-folder anymore as it isn’t a device mounted directly.
Thanks a lot!!!
I have written this post into spanish: check here
Thanks again
This application might be interresting: http://movenplay.gforge.inria.fr/
Among other things it allows you to sync your calender and contacts with thunderbird (or so it claims). I have yet to try it out.
Hi Faces!
So i have still have problems with the mounting with Amarok… and the problem is that the sshfs command requires a password by my case! I know this… its ‘dottie’ on the 1.0.3 phones and ‘alpine’ on the 1.1.1 phones. So how can i solve this?
I have seen a post here (#19) but I get stucked again… i dont have a .ssh directory at all. I am sure! I tried to change its permissions:
# cd .ssh
cd: no such file or directory: .ssh
# chmod 755 ~/.ssh
chmod: /var/root/.ssh: No such file or directory
Any ideas?
@nagybal
Passwordless Login:
https://help.ubuntu.com/community/PortableDevices/iPhone
Hi there!
Just to complement the tutorial, Amarok will show the “…Should I try to initialize your iPod? if you have no songs in your iPhone.
A quick workaround is to transfer a song from iTunes and you are done. Please notify me if you can actually let Amarok initilize the iPhone.
I tries to let Amarok initialize it, and it worked fine. Apparently, iTunes creates a Ringones directory that Amarok does not create, but I added it manually and it works fine.
I have a problem though: exiting the music player in the iPhone does not actually stop the application, and the modifications done by Amarok are not taken into account. I have to ssh to the iPhone and kill MobileMusicPlayer to see my changes…
actually, artwork DOES work in amarok 1.4.8 (and 1.4.6) if you are using the latest libgpod3. Make sure you have selected the iphone from the Ipod drop-down list in the Devices tab, and then use the ‘update artwork’ option. I have confirmed that this works myself.
I just updated my firmware to 1.1.3 (and its great by the way) but it seems to have problems with this sshfs+Amarok (iphone-mount) method…
I have ithe iphone jalibroken by a new method… no anySim or such… just few clicks and its done:
http://www.ziphone.org/
Its connected to the Amarok… but it appears to be empty… the music is not there witch I just copied on the phone (useing Windows version of iTunes)
Whats the mater?
ps: Is isn’t it possible slowly to sync with USB?
I confirm that is no longer working on 1.1.3
You can try to downgrade back to 1.1.1.
http://nl.youtube.com/watch?v=YakjwxB3nQU&feature=related
Good luck.
I’m on 1.1.3 and I confirm that it’s working.
Even if I’m using the ipod-touch-mount script (well I’m gonna switch to this one, it will produce less errors …), the fix is the same.
From now, everything that starts with /var/root must be remplaced by /var/mobile, that’s where iTunes_Control is located on new firmwares. And I think it’s better like this, much more secure since there is no more root-for-everyone, Apple is getting ready for the sdk.
okay
You can disable auto-lock and with that sleep using in:
Settings -> General -> Auto-Lock => Never
Hey Arnold i have one quick question. Now that the iPhone 3G is out do you think this method will work or is this only for jailbroken iPhone’s?
And I’m a Macbook user using Linux ubuntu, do you think if this doesn’t work i should go back to OS X?
Rakan: It only works with jailbroken iphone’s, since you need to have SSH installed on the phone.
If your iPhone is V1.1.3 or 1.1.4 then replace /var/root/Media with /var/mobile/Media.
Hi
Great job !!!
I used it as a starter point to hack my brand new iphone 3G . The caveat in this one ( firmware 2.0.0 ) is that the iTunes stuff is in /private/var/mobile/Media.
Once discovered that the rest was easy … or so i thought : they changed the encryption schema so now we have to wait for an update in Amarok …
Regards,
Marco
i use the alpine password to mount and then the root@ip address password screen comes up again then i plug in the the alpine password. ok it should b mounted. amaroks response is always no mounted ipod found. little help?
and yes the screen is not black or blank. and yes i turned off the auto-lock.
Hi,
Do you know a solution for this? Any help you could give would be very much appreciated!
I have Amarok running my iphone (2G, 2.2) but it can’t *remove* music! This is about to become a problem.
I want to make sure everyone is aware of this!!!!!!!! I am running iphone 2g with 3.0 OS on it. I performed the steps and it ruined at least one app from working. That app is Air Sharing. I went and looked in the /var/root/Media folder and now all there is now is a broken symlink called iPod_Control. I am thinking that’s where the Public folder was for air sharing. Can anyone please post the output of ls -la /var/root/Media/ for me so I can see what it looks like on phone that hasn’t been monkeyed with? Dang, I would hate to have to reset everything and re-jailbreak it. Anyone help please and yes, I have tried reinstalling Air Sharing but it still just looks like it’s starting but then I just get thrown back to the springboard.