Recently, i bought a brand new iPhone 3G. After the first funny week, i decided to sync the new toy
with my office mac. However, i've already previously synced it with my home iMac for mp3 files. This
gave me the infamous syncing error:
"The information on the iPhone is synced with another user account. Do you want to sync this iPhone
with the information from this user account instead? Merge Info merges the information on this
iPhone with the information from this user account. Replace Info replaces the information on this
iPhone with the information from this user account."
Googling around i realized that every shipped iTunes has a personal identification number (ID).
It's an alpha numeric 16byte string, as follow:
AA:BB:CC:DD:EE:FF:00:11 (without ':')
This number is transferred into your iPhone first time you make a connection with iTunes. Every
time you'll try to make a sync iTunes will compare it's personal ID with the one stored into iPhone.
If they match, the sync is done properly. Otherwise, you'll obtain the message above.
You can follow two methods, in order to bypass the problem:
METHOD#1
patch the iPhone stored ID to match the one provided with iTunes. To accomplish this, you've to
locate the file $FILE, stored in $PATH.
However, you still need to know the personalID stored into your firstly synced iTunes. To obtain
this info you've to read the method #2.
METHOD#2
the attached ansiC code is a proof of concept in order to get ( option 'g' ) and set ( option 's' )
the personalID into your iTunes. The way in which it works is straightforward:
first time you've to run it with the get option into your iTunes first-sync machine. The code will
return some output lines as follow:
yeah! you've obtained your personalID. Now, all you've to do is to use it in all your installed
iTunes. To achieve this goal, you've to use the second option, as follow:
This time you've to specify two distincts file to complete the process successfully. The reason is
that the ID is stored distinctly in the above files. Respectively, the first one has the plain form
stored as XML string key. The second one, has it in hexadecimal form. The reason why the information
is stored twice is not clear for me. However, i suspect that the most important one is the hex form.
Tracing an iTunes instance, in fact, i noticed that the .xml file is properly generated if it does
not exist. The relevant informations (ID and other personal infos) are extracted and parsed in order
to obtain a valid XML file.
I've planned to make a fully enabled COCOA version of the code presented here, in order to obtain
a CLICK&GO bundle from Finder. However, the time is money...and i have no money...:-)