Monday, February 14, 2011

Upgrade to iTunes iOS 4.2.1 on Windows XP 64bit

Over a year ago I managed to get iTunes 9.x.y working on my Windows XP 64 bit machine.
I had to try so many stuff, that I didn't really keep track of what I did :( The only things I wrote down were:

But now (february 2011) I wanted to upgrade my iTunes 9 to iTunes 10 because my OS on my iPod Touch was still at 3.x, and more and more apps are not running on 3.x anymore, they require 4.x and higher.
I knew it was going to be a nightmare, remembering the iTunes 9 installation. But this time I decided to keep track of it as detailed as possible. Hopefully it helps somebody...
I'll write down the steps as how I did them, so read through them all before trying yourself, you might be able to skip certain steps because they didn't work... WARNING: it is definitely not a clean walk-through!

  1. Goal is to follow the steps from

  2. Downloaded the 64b Vista version iTunes64Setup.exe from the Apple site

  3. First thought I could just try to run the .exe, since it's just an upgrade. But after some thought, thought I needed to modify the .msi file(s), since they do a check at startup. And, since all I need is an updated iTunes I don't think I even need to run all .msi files, only the modified iTunes64.msi (with the edits from the first post, NOT the deletion of entries as in this post).

  4. Installer starts successful, see screenshot (sorry for the Dutch):

  5. Let it install where the 9.x.y was already installed: C:\Program Files (x86)\iTunes

  6. A popup showed saying itunes+quicktime needs sp2 or higher. See screenshot:

    Just hit OK, install continues afterwards and it said successfully installed.

  7. And iTunes starts fine! Note that I still manually have to start the Mobile Apple service. I do that before starting iTunes, then plugin the iPod (with popup see screenshot), Then start iTunes.

    I also still do always get the popup about not being able to burn CDs. No problem.

  8. But now i get popup saying "itunes requires a newer version of Apple Mobile Support. Please uninstall both Apple Mobile Device Support and iTunes, then install iTunes again.". See screenshot:

    So it seems I do need to run AppleMobileDeviceSupport64.msi.
    But first edit it also. And instead of deleting entries, also here I just change 600 to 501.
    Starting AppleMobileDeviceSupport64.msi gives again needs SP2 or higher.
    So I also changed (VersionNT=501 And ServicePackLevel>=2) Or VersionNT>=600
    to (VersionNT=501 And ServicePackLevel>=2) Or VersionNT>=501.
    Yup .msi starts now, installs update in C:\Program Files (x86)\Common Files\Apple\Mobile Device Support
    Got popup saying it didn't pass windows logo testing. Continue anyway.
    Again for USB driver.
    And again. ipod goes on/off. Shows popup again that tries to open 2 programs when inserting ipod.
    Successful!! Note that it didn't require a restart and that I did not re-install iTunes.
    Started iTunes
    Yeah: ipod lights up, sync in progress

  9. It now asks for 4.2 upgrade of iPod software! yeah! See screenshot:

  10. Hit Download and update, then it says automatically checking for updates is disabled. If you hit cancel, nothing happens. So you have to select "Check this time":

    Then iTunes says my iPod isn't synced, are you sure to contiue? Canceled and did that sync first, making sure all my apps etc are in iTunes too.

    Selected Upgrade again, yup started downloading 4.2.1, see screenshot:

  11. Crap, got error 1603/1604, while popup Find new hardware wizard was suddenly showing up!

    Apple support link with some more info:
    Crap, can't find a driver (usbaapl). Seems it didn't get installed?
    So did this order of .msi running:
    1) AppleApplicationSupport.msi
    2) AppleMobileDeviceSupport64.msi
    3) iTunes64.msi
    Selected "recover" each time.
    Still didn't work, got 1604 error or something.
    Note that iTunes does see that the phone needs to be recovered, but it just fails after a long time with a 1603 or 1604 error. That indicates something is wrong with the USB connection.

  12. Then I manually got the driver from AppleMobileDeviceSupport64.msi as described here (using lessmsi*.exe):
    Yeah but which one do I need, the 64b or 32b? Guess the 64b, that's named usbaapl64.
    Note that you need to do Have disk as in
    Ah now got 1604 error (device was sometimes recognised, then windows says new device found again etc)
    Did what is says here for error 1604 (turn if off etc):
    Showing Preparing iPod for restore... for a long time... minutes... Again 1604 error.
    So the USB driver is just not set up correctly.
    You hear when you try the restore (if the device is recognised in iTunes), the USB ping "rings" twice, meaning something is happening twice or something.
    Don't think that should happen. I also see the ipod flash shortly, then it's just dark.

  13. I did read somewhere that in this case you're kindof lost, so you need to restore the iPod OS via another PC/Mac for which everything is working. After that's on the iPod, you can restore from the 64b iTunes...
    Luckily I have such a PC around: XP 32bit. Downloaded the latest iTunes 10, installed, and plugged in the iPod. iTunes detected it needed restoring so it put 4.2.1 on it! Note that I didn't give my device a name at the end of the restoring (thinking that should come from the XP 64b iTunes anyway...).

  14. So after this, plugged it back in on the XP 64b. But it was not seen/recognised by iTunes! Though in the Windows Device Manager it said Apple iPod!

  15. Then I did update the driver as in here in the part Troubleshooting iTunes <-> iPhone Link/Sync
    After that, the Device Manager says Apple Mobile Device USB driver! See screenshot:

  16. And (since) iTunes was already started, it started immediately restoring apps! Yeah!! See screenshot progress:

    Darn! An error occurred restoring this ipod (-402620395):

  17. Before hitting OK, I removed any provisioning files I had on the ipod as said here in the post "bkynaston post: Posted: Jun 23, 2010 6:45 PM"

    Hit Ok. After this it tries to sync again.

    Yes! It says: iPod sync is complete. OK to disconnect.

  18. And yes, finally, finally, after about 1 day of working on this, my iPod is ok again! Even the language is back to English!
    Finally! Hope I never have to do this again...

Here's some other knowledgebase tip(s) that I looked at and tried

Saturday, February 12, 2011

Lessons learned webservices project

At a recent project we used the following tools & frameworks:

  • Java 6

  • Spring 3.0

  • Hibernate 3.2.7

  • JMS

  • JBoss ESB 4.5/5.1

  • SOAP 1.1

  • JAXB

  • JAX-WS

  • Apache CXF

  • Maven2

  • Jetty 6.1

  • Oracle 10g

  • Eclipse Mylyn

  • SVN

  • JUnit

  • Bamboo

  • Jira

  • Crucible

  • Nexus

Below are a couple of lessons learned which I remembered to write down:

  • To skip a testclass (e.g during a test in a maven project: put @Ignore above it.

  • Throw checked exceptions in case of functionality errors. To not have to return those errors as return-values of the methods and making them checked, makes the interface clearer.

  • Should you use the service response for functional errors, and SOAP fault only for technical errors?
    Nothing in the SOAP 1.1 spec says you should do that or are not allowed to put functional errors in the <detail>.
    Makes sense to me to do that: otherwise you can get errors in the response AND in the soap fault. More complex to handle in the client...
    Less of an issue if you say when there are SOAP faults we just give up, only if there's a response we try to see what's going on.

  • Apparent best practice: no underscores in xml/xsd/wsdl for element nor attributes, for better readability

  • JBoss ESB 4.5 JMS queue had loads of problems with high load and would sometimes just completely drop the queue. We moved to JBoss ESB 5.1 with ActiveMQ, that proved much more stable.

Transactional atomic file manipulation and file locking
Bunch of interesting articles related to this:

Related to file locking:

  • With Maven you can also have it put the sources + javadocs in the repository.
    Running 'mvn eclipse:eclipse' after that, and refresh the project in Eclipse, within Eclipse you can then see the javadocs and debug the sources.
    Just make sure you set <downloadSources> and <downloadJavadocs> to true.

  • If you have an action that can't be made transactional (e.g a file move), do that as last thing in your steps. More precisely: start a (e.g database) transaction, move the file. If that move succeeds, update status that move was successful. If that move fails, rollback the transaction, and thus is the status of that file still in "to move".

Number of downloaded apps/installs of an android app

Online android market website gives more details on the number of downloads/installs of an app than the market on a device (phone)!
Check for example 3D Light Racer Basic. On my Nexus One it says it has > 250000 downloads. But on the website it says 500000 - 1000000 installs! See the red arrow.

Can be pretty useful for competitor analysis for example :)