Up to this day, the biggest downside of using iPhone was inability to transfer new music and listening to it via iTunes at work, while the phone was synced with my mac at home. Today it hit me – there has to be an unique identifier, that main iTunes library pushes to the iPhone, and the synchronization can have place only when both fingerprints are identical. So what if the both machines would have the same fingerprints? Turns out – it works!
Go to your main mac, locate your iTunes Library XML file (stored by default at ~/Music/iTunes/iTunes Library.xml) and open it using any text editor. The bit we’re interested in is the hashed string in the second line:
<key>Library Persistent ID</key> <string>242B31B57412A12E</string>
Copy/note the above string (242B31B57412A12E) and go to your second machine, where you have to create a new iTunes Library (run iTunes while holding ALT/OPT key pushed). I tried to pull this out with a preexisting iTunes Music Library, but without any positive outcome. However creating and editing a fresh library helped to achieve my goal.
After iTunes started up with a blank library, quit it and locate new iTunes music library XML file. Open it with a text editor, remember old hash, swap it with a previously copied one, and save it.
Unfortunately it’s not the end of our work – there’s another place where this hashed string is stored – iTunes Library file. It’s a binary file and editing it is a bit harder, than before. Go get yourself a Hex Editor (freeware Hex Fiend will do the trick), and load the binary.

Open Search/Replace dialog (CMD+F), and paste the hash tags appropriately (Find: hash tag from new library, Replace: hash tag from the main machine). Be sure to select Hex search method. The string should be replaced only one time (at offset 0×34h). Save the binary, run iTunes, and connect your iPhone.
From now on you’ll be able to play music from your iPhone via iTunes and update your music without necessity of wiping out contents of your phone.
One Comment
Success is not the key to happiness. Happiness is the key to success. If you love what you are doing, you will be successful.