IPhone and iPod touch support
From Winamp iPod plugin ml_iPod
Because of your great donation efforts, it was possible to buy an iPhone for the ml_iPod development. We are currently quite busy adding iPhone specific features to ml_ipod.
Contents |
Basic problem with the iPhone
The iPhone and iPod touch do not support "disk mode" natively. This is bad, as ml_iPod heavily relies on the disk mode of the iPod to access the files. There were rumors that a new FW 1.1.3 will support disk mode - but now 1.1.3 is out and still no disk mode. If that ever happens, we are fine. Until then, we need a workaround to access and update files on the iPhone. There is no documented way to do that. Apple keeps the lid on all the necessary information. The iPhone dev team (the guys that hacked to iPhone to use other SIM cards etc.) found ways to get to the file system, but mainly on Mac OS X.
What can we do?
There are basically two ways:
- Connecting via the USB cable to an undocumented Apple interface. This would work with every iPhone or iPod touch, and is a high speed solution.
- Attaching via wifi and SSH. This requires the phone to be "jailbroken", and some unofficial third-party apps installed on the phone. So this is not for everyone. And as it is over wifi, it is much slower than the first approach.
Both ways are currently under evaluation and development.
After first test with wifi, I decided to take the USB approach. There is a workaround with wifi and ssh available, see [1] and [2]
Most promising path for the moment is to use iphonefs, an OSS project to gain access to the iPod filesystem and mount it as a drive letter. This is pre-alpha right now and not yet usable. Whenever it works, we will use it. It is the best way. So send the developers lots of mails or checks, to convince them to build a new version soon!!!
Status
Bleeding edge software is 3.04.
Working
- Automatically recognizing iPhone after attaching it
- Reading iPhone database
- Transfer songs or playlists to iPhone
- Creating/rearranging playlists on iPhone
- Album art, cover flow
- Gapless playback
- Podcasts, Audiobooks
- Sync ratings and playcounts to iPhone
- Transfer songs from iPhone to PC (aka reverse sync)
- Deletion of tracks from iPhone
- Database cleanup tools, finding and removing orphan tracks etc.
- Free space calculations. This means, if your iPod is getting too full, you will correct error messages now.
- Updating progress meter during transfer of a huge file
NOT yet working, I'm working on it
- Correct progress meter during reverse sync
- Importing On-The-Go playlists
- Transcoding on-the-fly (will automatically work with iphonefs)
- Playing songs directly from the iTouch in Winamp (will automatically work with iphonefs)
NOT working, don't know how to do it
- Sync ratings and playcounts from iPhone which also disables last.fm support (URGENT: help is needed here, see here)
- Reusing album art from iTunes (different format???)
- Photo upload (probably won't be done)
- Showing the "Sync in progress" screen on the iPhone (how does iTunes do this? Anybody???)
- Telling the iPhone to re-read the updated database. See below (After Sync)
Enabling iPhone support
First step is to install iTunes. iTunes installs a special USB driver that is needed for the communication to the iPhone. (If you don't want to have iTunes on your computer, read the special instructions below, "iPhone without iTunes installation").
Everything was developed and tested with iTunes 7.4.2. download, or google for itunes742setup
Next, install version 3.03 of ml_ipod or higher, and if there is one the newest development patch
That's enough for the setup. (Side note: One user reported here that he had to install .NET 3.0 to make it work. Don't know if that is really necessary, it's all up to the Apple guys what they use in the QuickTime DLLs. UPDATE: .NET 3.0 is not necessary)
Kocter has given a personal experience describing his solution here
Now, to work with your iPhone, follow these steps:
- If you have iTunes running, close it now
- Start Winamp
- Attach iPhone with the USB cable
- A dialog will pop up saying "Trying to connect to iPhone..."
- A second later, it will start to download the metadata from the iPhone. After that, your iPhone will be shown in the ML
- Now you can transfer songs to the iPhone or from the iPhone to the PC as usual
- Always hit the "Eject" button to detach the iPhone. If you miss that, your iPhone will not get the new database.
- After the iPhone disappeared from the ML, you can disconnect it
- If you can see your newly uploaded songs in the iPod app already, you're done. Don't read any further ;-)
- If not, you have to force the iPod app to reread its database files. There are some ways to do that, please read on...
iPhone without iTunes installation
We need some stuff from the iTunes distribution, but with a little hacking, no full blown iTunes installation is needed on the PC.
These are the steps:
- Download the iTunes 7.4.2 installer exe
- Rename iTunes742Setup.exe to iTunes742Setup.zip
- Open iTunesSetup.zip in Winzip or your favorite zip manager
- Inside, there are some *.msi files
- Doubleclick the AppleMobileDeviceSupport.msi and install it (use defaults for everything)
- Doubleclick the QuickTime.msi and install it (use defaults for everything)
- If you don't mind having all the QuickTime stuff on your PC, you're done
- If you don't want to have QuickTime on the PC: Simply copy QTMLClient.dll and QuickTime.qts from C:\Program Files\QuickTime\QTSystem to your "Program files\Winamp\plugins\ml_ipod" folder, then uninstall QuickTime (via control panel, "Add/Remove programs") We only need these two files from the QuickTime package.
After Sync
After transfering songs to your iTouch, or deleting anything, we have to tell the iTouch to reread its database (it is cached in memory). Currently, e don't know how to do this via the Apple interface, so we need a little workaround. There are four ways to do it. All four have to be performed on the iTouch after ejecting the device in Winamp.
- Killing the iPod app: Start the iPod application, then you have to press and hold the home button for about 5 seconds, "killing" the application and forcing the ipod to return to the home screen. Restart the iPod application, then your songs will show up. This is the fastest way that will work on non-jailbroken iPhones/iTouch. It works on jailbroken ones too, of course. [3]
- Using AfterSync: This is the fastest and easiest solution for a jailbroken iTouch right now With help from Erica Sadun, I created a little iPhone application that will simply kill a running iPod application (called MobileMusicPlayer.app on the iTouch). Then, after you manually restart it, it will reread the database, and all is fine. This app is very helpful for ml_iPod users, but those who use other iPod managers like Amarok or gtkpod (on Linux) will benefit, too. The app can even be installed with installer.app:
- You have to add a new source http://mlipod.sourceforge.net/iphone/ to installer (You don't know how? In Installer.app, select Sources then tap Edit (top-right corner) and then Add (top-left corner), type in http://mlipod.sourceforge.net/iphone/. Tap OK, wait, and then tap Done. "ml_iPod support" gets added under the "Other Sources" section. It is listed as "untrusted" source . Oh well, you can't have everything.)
- "AfterSync for ml_iPod" will show up in the "Utilities" section of installer now (Tap Install, tap the "Utilities" section)
- Simply install it
- Press home button to go back to springboard (springboard will reload)
- From now on, after every sync, tap the AfterSync icon on the main menu (the one with the red ball on it)
- A second later, it will tell you that it killed the iPod app and that you can return to the main menu
- Press the home button
- Now start the iPod application, your songs will show up.
- Rebooting: Switch the iPhone completely off (hold the home button and the standby button both depressed for 5 seconds, then slide "Slide to power off". Turn it back on. It will take 30 seconds to boot. Now start the iPod application, your songs will show up.
- Restarting Springboard: This works on jailbroken iPhones/iTouches only, and you must have installed Summerboard. Then you can choose the "Restart" option in Summerboard. This is much faster than rebooting, but has the disadvantage that your usage data (time since full charge) will be erased. Now start the iPod application, your songs will show up.
If it does not work with your iPhone or iPod touch
This is a work in progress, I need your help. Please send your main debuglog after the "Trying to connect to iPhone..." disappeared. Attach it in the forum [4]
What's next?
I hope we get a working iphonefs soon. Everything should be working fine then. Alternatively, it might become true that Apple releases a new firmware with disk mode. That would be best. ml_iPod might need some tweaks then, but it shouldn't be too hard. The mayor stuff is already done (the new artwork formats etc.)
Reading the play counts and last played times from the iPhone is difficult, they are stored in a completely different format compared to the older iPod models.
Currently I can see no way to "properly" restart the iPod app on the phone. That's why we need the reboot or the AfterSync app. If you have a jailbroken iPhone, you can simply kill the app. But my goal is to have ml_ipod work with non-jailbroken iPhones, too.
