When you try to sync your iPhone with iTunes library on another computer, you are prompted by the warning message seen in the screen shot below informing you that your iPhone is synced with another iTunes library and the only choice at this point is to either "Cancel" or "Erase and Sync" from this iTunes library.
So basically you can sync your iPhone with only one iTunes library at a time. No problem, Andrew Grant has discovered a hack that allows you to sync your iPhone with two (or more) computers.
Before we start, please remember that just like any other hack on this site, you will be trying this one at your own risk.
Some preparatory work before you start:
Lets assume you want to sync with two computers, the one that you currently sync your iPhone with, we will call it the "regular sync computer" and the other computer you want to sync your iPhone with as well, we will call it the "new computer".
On the "new sync computer" you want to sync with, backup “iTunes Music Library.xml” and “iTunes Music Library” (Tunes Music Library.itl on a PC) to a safe location as the hack involves modifying these files.
You will also need the following programs: a Text editor (Notepad should serve you fine) and a Hex editor (you can checkout UltraEdit or any other Hex Editor).
On your regular "regular sync computer" open “iTunes Music Library.xml” with a text editor and search for the following text "<key>Library Persistent ID</key>"; you should ideally find it at the top of the xml file. We are basically looking for the persistent id of your iTunes library. It appears to be the ID that tells iTunes; if you are syncing with regular computer or a different computer.
In the screen shot below for example the value 8B6C633F7DACB74B in between the <string> tags is the persistent id of the iTunes library on the "regular sync computer" . Copy this entry and close the file.
As you might have guessed it, you had copied the value of the Library Persistent ID to replace the value in the iTunes Music Library.xml of the "new sync computer".
Open the “iTunes Music Library.xml” with a text editor, search for the text "<key>Library Persistent ID</key>" again and copy the value of the Library Persistent ID within the <string> tags.
In the screen shot below for example the value 0E958526D15C67FA in
between the <string> tags is the persistent id of the iTunes
library on the "new sync computer".
After copying the value, replace the value within the <string> tags with the value that you had copied in Step 1.
Save and close this file.
Open “iTunes Music Library” (iTunes Library.itl file on PC) using the Hex Editor on the "new sync computer".
Select “Replace” from the Edit menu. Make sure “Hex” matching is selected (not ASCII). In “Find What” enter the ID you took a note of in Step 2. In "Replace With", enter the ID you copied in Step 1. Choose Replace All, there should be one match.
Save this file and close it.
That’s it, you are done. Now start iTunes on the "new sync computer" and plug in your iPhone. When you select “Manually manage music and videos” you will no longer be prompted to erase your data, nor will the files on your iPhone be grayed out.
If you have any issues with iTunes on the "new sync computer" then replace the files you had backed up prior to modifying them.
Andrew has provided additional notes that you might want to checkout by following this link.
As always, don’t forget to let us know how it goes.
[via Andrew Grant’s blog]
Top iPhone Hacks Categories: