Apple must have realized of what we are doing by messing about with the Persistent ID and have introduced some changes in iTunes 10.0 to prevent this.
Among other changes (including an arguably worse application icon) they must have added some extra checking of the Library ID stored in the binary file of the iTunes Library (Tunes Library.itl
on Windows). It now contains some CRC or similar mechanism, which is used to verify that the Persistent ID stored in the file is actually the one generated when the library was created. This explains why if you change just the bytes that contain the ID, iTunes detects that the ID has been tampered and is capable of SILENTLY restoring the previous ID.
I did not have time to check where else in the binary file iTunes checks if the Persistent ID is what it claims to be… but I found a quick and dirty way to overcome this new security measure.
iTunes has a feature that allows rebuilding the binary version of the library in case it gets corrupted… and guess what, it does so by reading the data in the XML version.
So all that you have to do is edit the XML library, corrupt the binary version, and start iTunes … Et voilà! iTunes rebuilds a perfect 10.0 library for you using your new Persistent ID.
iTunes DB Cloner is a free Windows utility that does all this for you.
I would love to think that Apple will leave this feature in future releases. You can imagine the disaster it would be if your library gets corrupted by normal usage (i.e.: The computer unexpectedly powers off in the middle of an update) and you lost months of work classifying music 🙂
But who knows, Apple is becoming the figure of the Big Brother (IBM) they depicted in their 1984 commercial, so I would not hope this to last too long.
In the meantime, let’s enjoy some freedom to manage our iPhones in our different computers.
#1 by Bruno Borghi on November 5, 2010 - 4:30 pm
Works perfectly.
To get the Library Persistent Id from a non-jailbreaked iPhone, see http://www.magicspace.eu/software/iphone-itunes-sync-recover-your-library-persistent-id/
#2 by decalmo on November 15, 2010 - 9:26 am
Just tried this with iTunes 10.1 and it looks like Big Brother has removed this handy feature – the original Library Persistent ID gets restored in the binary and the XML file. So much for being able to manage your purchased devices and purchased media
Pingback: Iphone itunes Library Persistent ID match - Page 3
#3 by Felipe on November 15, 2010 - 8:05 pm
It still seems to be working here… I have updated to 10.1.0.54 32-bit and the trick is still in place. Could you send me some more details? Does it work on any other PC? thanks
#4 by Milen on December 10, 2010 - 1:00 am
Not working at iTunes 10.1.0.56 iPhone 4 – iOs 4.2.1, Windows 7. iTunes say “Transfer purchased apps to library” but erase app on iPhone.
#5 by Lila on December 15, 2010 - 10:43 am
Hi, I need to try this on a Mac, can you tell me ho to try to corrupt the binary without your application? Best regards.
#6 by Sam on December 28, 2010 - 6:22 pm
DBCloner didn’t work for me, gave a exception error when trying to work with the xml file on iTunes 10.1.1.4 and iPhone4 – 4.2.
Manually editing did however work:
Rewrote .xml file, deleted the .itl file and replaced it with a blank file of the same name. iTunes then took 2hrs to rebuild my library (5500 tracks) but it got there eventually.
Had previously been using phonable – http://www.memecode.com/phoneable.php
It doesn’t currently support iTunes 10, it does however provide a very easy way to get at your library key, should you have neglected to write it down the last time you encountered this bloody problem 😉
Thanks for the tip.
#7 by Matt on April 19, 2011 - 5:18 am
Worked for me, iPhone 4 iOS 4.3.1 on iTunes 10.2.1.1
Jailbroke running with straighttalk sim card, you need to check that out, $45 a month unlimited what?!?!?
http://www.howardforums.com/showthread.php/1691930-HowTo-StraightTalk-and-iPhone!-Everything-you-need-to-know-to-make-it-work!
#8 by Jairus on April 20, 2011 - 5:39 am
Hey guys, something to keep in mind to avoid the possibility of wondering why the hell the fix isn’t working if by some chance you’re not using the default library..
DBCloner only adjusts the iTunes Library.xml file in the default location!!
So if you’re using a different library you will have to rename the default library folder (eg “C:\Users\BillsAccount\Music\iTunes” if logged into BillsAccount on windows 7) to iTunes.old or something similar, then rename the folder where your current iTunes Library.xml file is located to the default folder name (eg C:\Users\BillsAccount\Music\iTunes)
Now running DBCloner should work!! 😀
When you run iTunes you may be asked to locate the library. It will now be located in the default location (eg C:\Users\BillsAccount\Music\iTunes)
Tip: To find which iTunes Library.xml you are using just do a search and find any recently modified versions of the file. It’s probably the biggest one..
Hope that makes sense and helps people not have to find out the hard way like I did! 😛
#9 by jaiind on May 27, 2011 - 12:34 pm
My Library ID is showing same in both my laptop & desktop – primarily because the info is taken from my Roaming profile folder which are synced on both my computers. is there anyway to still use this program to sync iphone to 2 computers.
#10 by Willo on June 17, 2011 - 12:34 am
This work around worked perfectly for me on iTunes 10.3.1. You just have to remember to make sure there is no file extension to the iTunes Library on Mac. By default the file created in Text Edit appends an extension but extensions are hidden by default.
Looking at the post above about roaming profiles. What would happen if we just copied the whole directory from PC to PC or Mac to Mac??
#11 by Willo on June 17, 2011 - 12:35 am
BTW, I like iTunes on Mac better, you can add music and media from a NAS by default. On Windows 7 it says you can’t because network shares aren’t indexed.
#12 by Derek on June 17, 2011 - 8:47 am
IT WORKED! IT WORKED! You are f*cking AWESOME. I’d been struggling with this thing for hours and hours. I’m actually India right now with a slow-as-hell connection, so even though I have all my files backed up, if I erased all my apps it’d have to download for several days over wifi to restore everything.
It worked! I’m so happy. You are awesome.
Pingback: Auslesen der iPhone Library Persistent ID und Synchronisation mit mehreren Rechnern | Soziotechnische Integration
#13 by Shawn on May 17, 2012 - 5:37 pm
I’ve tried this but nothing works. I’ve even removed iTunes 10.1 and installed 9.2 to get around it. Now I’m getting your “iPhone requires 10.1 or later” when I connect the phone. Any ideas how to resolve this without losing the data?
#14 by Renato on June 24, 2012 - 3:29 pm
It worked great on iTunes 10.6.3.25.
Thanks a lot for the tip.
#15 by Jeremy on July 3, 2012 - 12:40 am
THANK YOU! This method definitely still works. Thanks so much for the tip on corrupting the iTunes Library. I’m on Mac OS X 10.8 with iTunes 10.6.3, and that’s exactly what it took to recover my library. In my case, I moved it all to a different external drive, which disassociated over 24,000 files.
If you’re on a Mac, here’s a quick way to force a rebuild from the XML version of the library file. Quit iTunes, then open Terminal from the Utilities folder and paste this in:
rm -f ~/Music/iTunes/iTunes\ Library.itl && touch ~/Music/iTunes/iTunes\ Library.itl
#16 by marek on July 26, 2012 - 2:21 pm
I reinstalled osx and it automatically gave me the newest iTunes 10.6 (40)
where this fix doesn’t work anymore. It noticed that it was corrupt and just created a new library with a new third persistent id.
But I came across a solution that did work. Simply copy over the old library itl and xml files from the original computer.
I then loaded my iTunes holding option, chose a previous library, and it rebuilt my playlists from the second computer but kept the original computers persistent id.
#17 by marek on July 26, 2012 - 3:20 pm
apparently i lied in the last step. Choosing a previous library did not work, I had to re-import my playlists
#18 by Kris on August 9, 2012 - 5:26 pm
I kinda works……..
I can get songs from both PC and Mac on my iphone 4S, but when i add music on the phone the songs already on the phone get erased….
So actually nothing has changed as how itunes normally works, the only thing different => i don’t get messages my data/songs will be erased
#19 by Anton on September 2, 2012 - 11:31 pm
Actually I’m very glad to confirm that corrupting (replacing the iTunes Library.itl file with an empty one) still works perfectly. Im on latest OS 10.8.1 and latest iTunes 10.6.3 (25) as of today.
The only things I did was replacing the “Library Persistent ID” in iTunes Library.xml and in iTunes Music Library.xml. Then renaming the iTunes Library.itl and replacing it with an empty file using the command line as described in another comment.
Gave me exactly what I wanted. Thanks 🙂
#20 by Anton on September 2, 2012 - 11:39 pm
Have to add that the involved devices are non jailbroken iPhone 4S, iPad3 and MBP Retina. All running latest iOS version 5.1.1.
Manually adding new music doesn’t break or erase anything. Can’t report any issues with that unlike marek and Kris. Perfectly straight iTunes behavior asking to authorize new machine for bought apps, backing up and importing Apps bought on the devices into iTunes.
#21 by Fred on October 1, 2012 - 11:59 pm
Another little thing in OS X 10.7.5 and iTunes 10.7 ..there is a folder called “Previous iTunes Libraries” and it will try to get the old id out of there, so you may want to rename that as well.