ITunes 8 through modified Wine
From Sync In Linux
Contents |
iTunes4Linux
How you can help:
- Can you compile wine and apply a git patch? A lot of what we're doing requires tedious patching and testing. If you'd like to help, email huanix@gmail.com
- Contributions = motivation. Any contribution you make will make us that much more dedicated to staying up long hours to solve this problem. paypal contributions to huanix@gmail.com will be shared between hank and eric.
- Can you program and debug wine? Are you willing to help? huanix@gmail.com
- Are you good with wiki development? We're looking for someone to customize a wiki front end for itunes4linux. (Don't tell anyone, but we think we like what ies4linux has on their homepage)
How long will it be before this works?
A while. Probably not before February, 2009. We are still very much in the "cutting a path through the forest" stage of building highway. We are nearly certain this is possible, but it will take time.
Who are we?
- EADurbin
- Huanix
- TJ
- You?
Current status
12/16/2008
- We are realizing that many of the bugs we're encountering could be solved by the Wine community at large, so we'll be tracking/working with those bugs more closely. This means that while a solution might still be a wine fork, it might also take value from or share value with wine. We will continue to develop toward a workable solution in whatever shape it takes. (Eric - is that an appropriate interpretation? -hb)
12/15/2008
- Welcome to TJ, our newest itunes4linux hacker. TJ brought some great ideas about the usb transfer, specifically utilizing parallel URBs in the USB stream to achieve connectivity. This does change many of our (at least my) concepts of what needs to happen, but it is VERY welcome.
12/14/2008
- We were able to pick up some books on Amazon thanks to Ben's contribution - thanks again.
- We are backtracking to Wine 0.9.60 to look at Maarten's April 2008 patch [1] ( i misplaced the thread, but it shouldn't be hard to re-locate.) This setup, along with the kernel hack (max_usbfs_buffer size set to 128k) and a ntdll hack that Eric did (and the original 1603 hack for iTunes8) are giving us some progress. We're narrowing in on a solution from several angles.
12/13/2008
- A regressive day. One of the things we thought would carry us through will probably not do much more than face value (max usbfs buffer in the kernel) - we hoped that seeing the iPod would somehow lead to recognizing the it, but there appears to be much more to it than expected.
- We are exploring some of the bugs and patches that may already address them, for example, this ioctl marshalling patch that Maarten wrote. We haven't looked at this before.
- Thanks to Ben for the contribution. (huanix@gmail.com through paypal)
12/12/2008
- The initial focus of the project was with the 1.0.1 branch and six patches (we're calling it 1.0.1 + 6). This will get you to the point where you can "see" that an iPhone/iPod exists in iTunes, but the model is not recognized and no sync is possible. We are no longer focusing on this branch, in favor of using the most recent development branch of wine. The six patches we used are completely incompatible with the development branch and must be re-developed.
- The current focus is to use the lessons learned from the USB implementation and kernel patch in 1.0.1+6 to port the same functionality to the current development branch (1.1.10 at the time of writing).
- We are also tinkering with the MAX_USBFS_BUFFER_SIZE in the linux kernel (devio.c) to see if 128k is the magic number, or if other values work as well (or better)
Current iTunes 8 bugs in wine
- 9649 - iTunes does not recognize iPod [2]
- 15533 - iTunes does not install [3]
- 16370 - unsupported ioctl errors [4]
- 15482 - iTunes fails to sign in to the iTunes Store [5]
- 16523 - cdrom support missing in iTunes [6]
Getting up to speed
This method is nearly completely depreciated and will likely be removed soon! -hb 12/16/2008
Current Steps for getting iTunes to "see" a pod device under Linux
- Starting with a fresh Desktop install of x86 Ubuntu 8.10
- sudo apt-get update && sudo apt-get dist-upgrade (also add your restricted drivers and reboot into the newest kernel)
- sudo apt-get build-dep wine
- run the wine dependency installer linked from winehq (do a "save as") [7]
- run the virtualbox-iphone-r7.sh script. [8]. This script will modify your kernel for the correct MAX_USBFS_BUFFER_SIZE, currently thought to be 128k.
- get the source for wine 1.0.1 [9]
- Run these patches (in this order) with git-apply --verbose from the root of your build directory. (reference: [10] )
- in the build directory, run tools/make_requests
- ./configure --prefix=/my/special/build/path && make depend && make && make install [17]
- after build, run winecfg. Choose windows vista and autodetect drives and be sure USB is mapped; also test audio to initialize it.
- install iTunes 8.0.1.11
- ./wine net start "ipod service" [18] (this seems to be running most of the time, but it can't hurt!)
- start itunes
- wait 10 seconds
- plug in Pod; cross your fingers, hold your breath, and throw salt over your shoulder.
- I now have a stable installation that predictably picks up pod devices!!! This is NOT complete. it only knows that a device exists, it cannot interact, and it is VERY laggy!
I did confirm that this does "see" both iPod nano 8GB, iPhone 3G 16GB, and iPhone 1st gen. It does "see" them, but it does not recognize them!
Proof of present status
The output log of a session: wine_sees_ipod_output_log
A recordmydesktop video of a session: http://www.huanix.com/wp-content/uploads/2008/11/itunes8_sees_iphone_in_linux.ogv (22 mb ogv video)
Build Log
| Builder/Date | Wine & iTunes version | source modifications? | Outcome | Lessons Learned | Link to runtime output |
|---|---|---|---|---|---|
| Hank on P4S800 12/11/2008 | 1.0.1 & 1.1.6 for hackeditunes; 8.0.1.11 | 6 patches, the only known working config & devio.c hack from vbox | iTunes runs, usb seems to work if the MAX_USBFS_BUFFER_SIZE is set to 16384. |
| error1 |
| Hank on M2N-SLI D 12/11/2008 | 1.0.1 & 8.0.1.11 | 6 patches, the only known working config. No vbox script. Going to try without the virtualbox script first, then with it. still trying to confirm or eliminate it. It is sort of looking like things only work with the usb buffer size hack. | iTunes runs, but ipod, with or without the virtualbox hack | this is a 64bit machine (running 32bit linux), it appears (for now) the MAX_USBFS_BUFFER_SIZE hack i used on the P4S800 didn't work on this machine. I'll double check this later. | error2 |
| Hank on Dell Latitude D510 12/11/2008 | 1.0.1 & 8.0.1.11 | 6 patches, the only known working config. No vbox script. Going to try without the virtualbox script first, then with it. still trying to confirm or eliminate it. It is sort of looking like things only work with the usb buffer size hack. | it failed to see the pod or phone. this should be re-run.(45:46 compile time) | error3 | |
| Hank on P4S800 12/12/2008 | AM git & 8.0.1.11 | Alexander Morozov's git with the max usbfs buffer @ 128k | libwine.so (missing) trouble, then Drive mapping "Failed to connect to the mount manager..." |
| error4 & [20] |
| Eric on Aspire 4520 12/12/2008 | 1.1.6 & 8.0.1.11 | 6 patches and buffersize shell script | Itunes works, detected 5th generation iPod video | ||
| Hank and Eric 12/14/2008 | 0.9.60 & 8.0.1.11 | Lankhorst April08, ntdll, 1603, & max_usbfs | Itunes works, detects devices, still no real recognition, but this appears to be a step closer. |
| error6 screenshot source |
toolbox
usbmon for monitoring usb transfers in linux - still not sure what it's going to give me, but i'm playing! http://www.mjmwired.net/kernel/Documentation/usb/usbmon.txt
