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
Iphone screenshots

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
Screenshot - Add New Device - Amarok

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

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.