Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

For some reason, Apple has imposed a most absurd restriction where the only way to get an iPhone (or other iDevice) to sync with a different computer is by erasing it first. I haven't verified first-hand that this process actually erases the entire iPhone, because, naturally, I'm too afraid to try it.

http://clipi.ca/v5

So I spent a long time scouring the web trying to find a way around this ridiculous (and artificial) limitation. I spent literally hours over the course of several days and eventually found a combination of web pages that finally allowed me to do what I needed. I'll summarize the steps here for others who have banged their heads over this one.

share|improve this question

3 Answers 3

By design, the iPhone will sync iTunes content with one computer at a time. Any attempt to sync such content with a second computer will result in ALL iTunes content being first erased from your phone & then replaced with the content from the second computer. This is a design feature and cannot be overridden. Because you replaced your computer, or hard drive, your phone will see this as a "new" computer. The iTunes content sync is one way: computer to phone. If you have photos that were synced to your iPhone or music ripped on your own, you will first have to copy them from your iPhone using third party software, such as TouchCopy, before you do anything else, as Apple makes no provision to do so. Once you've done that, do the following in the order specified:

  1. Disable auto sync when an iPod/iPhone is connected under iTunes>Preferences>Devices(under Edit menu if using Windows).

  2. Make sure you have one contact & one event in the supported applications on your computer(iCal & Address Book on a Mac, Windows Address Book or Outlook if using Windows). These entries can be fake, doesn't matter, the important point is that these programs not be empty.

  3. Connect your phone, iTunes running, do not sync at this point.

  4. Store>Authorize this computer.

  5. File>Transfer Purchases. Also read here: http://support.apple.com/kb/HT2519

  6. Right click your phone in the left device pane & select "Reset warnings".

  7. Right click again and select "Backup".

  8. Right click again & select "Restore from Backup", select the backup you just made. When prompted to create another backup, decline. Note music is not part of your iTunes backup and needs to be restored as above.

  9. This MUST be followed by a sync to restore your iTunes content, which you select from the various tabs, You'll get a popup regarding your contacts & calendars asking to merge or replace, select "Merge".

Your phone should look just like it did when you started, with no data loss.

share|improve this answer

Theres an easier method. MUCH easier. Cancel that window. Your iPhone stays mounted in iTunes. Right click and choose backup. After the backup is complete, unplug your iphone and plug it back in. Then allow it to erase your iPhone, and just restore from your backup.

share|improve this answer
    
I've heard backing up doesn't actually back up all data (e.g. application data) on your phone, meaning you might restore pictures and music, but will lose a lot of other data. –  chaiguy Oct 16 '12 at 21:26
    
If you are missing things restore from that same backup a second time. –  Tony Tellez Oct 17 '12 at 13:21
    
Has this second method (erase, recover from backup, possibly recover from backp again) been verified by anyone? Is everything, including apps and their order in the home screen, restored correctly? –  obvio171 Nov 11 '12 at 15:18
1  
Of course everything is restored. This is the same backup you use if your iPhone goes tits up and needs to be reset. Or if you're updating to a beta version of iOS. –  Django Reinhardt Nov 12 '12 at 12:45
2  
Here's Apple's article on transferring your data to a new device: support.apple.com/kb/HT2109 –  Django Reinhardt Nov 12 '12 at 12:50
up vote 14 down vote accepted

The first thing to be aware of is that iTunes uses a unique "Library Persistent ID" to identify the pairing of an iDevice to an installation of iTunes. This 16-digit hexadecimal id is stored on both the device and the computer it is paired with. iTunes generates a new id when it is installed (or more accurately, when it builds its library). If you plug in an iPhone that has a different persistent id than the copy of iTunes installed on that computer, you will get the warning dialog shown above.

The only thing standing in your way, however, is that darn persistent id. To get things working smoothly, we need to hack the installation of iTunes so that it thinks its id is the same as the one on our iPhone.

To do that, we first need to figure out what our phone's persistent id is. There are a couple options here, depending on whether or not you have the original synced copy of iTunes still available.

Step 1: Getting the Persistent ID

If you still have the original installation of iTunes that your iDevice is synced with, you can grab the persistent id from the "iTunes Music Library.xml" file in your iTunes directory. Just search for the "Library Persistent ID" tag.

If you no longer have access to that previous installation (as was my case), you need to get the id from your iPhone itself. Luckily there is a sneaky way to do this without having to jailbreak your phone. [If your phone is already jailbroken, you can read it from one of the .plist files in your iTunes directory on the phone, I believe.]

The trick is that you need to do a backup of your phone using iTunes and then dig into the backup files to find the persistent id. Fortunately iTunes lets you perform backups without being synced, so you can backup an iPhone on any copy of iTunes.

Unfortunately, the id is not plainly visible in the backup files. You will need to use a free web script to determine your persistent id from an Info.plist file you upload.

Full instructions are on this page.

Now that you have your library persistent id, you need to trick your installations of iTunes into thinking that that id is actually the id it has.

Step 2: Changing iTunes' Persistent ID

iTunes stores the persistent id in two places, just to make it trickier for us to change: once in the "iTunes Music Library.xml" file already mentioned, and once more in the "iTunes Library.itl" file, which is a binary file and much trickier to edit.

Although it is (or at least was) supposedly possible to edit the binary file and get it to accept the change, I have not been able to get this to work, so I don't recommend bothering since there is an easier way that doesn't require it.

First, backup the two aforementioned files. Next, open the xml file and paste in your library persistent id obtained from step 1 over the existing id in the <Library Persistent ID> tag and save.

Now create an empty file and name it "iTunes Library.itl". It won't work if you just delete or rename the file. iTunes needs to think it's become corrupt, not just disappeared.

Now when you start iTunes, it will see the "corrupt" library file and will rebuild it for you, from the xml file which contains your new persistent id.

If all goes well, after a few minutes of rebuilding your library file (it can take quite a while if you have a large library, mind you), you should be able to plug in your iPhone and sync as if nothing were wrong in the world!

For more details (including how to find the iTunes directory on your computer), read this page.

Good luck!

share|improve this answer
    
This didn't work for me. I did exactly as mentioned, iTunes thought the itl file was corrupt and "rebuilt" it, but not from the contents of my iPhone. It syncs everything now, but I lost all my music and most apps in the process. Going to restore from backup now. –  obvio171 Nov 11 '12 at 15:29
    
The backup I was referring to was generated by the "recovering" iTunes the first time I opened it. Apparently, there was an error while generating that backup image, which it only told me about when I tried to recover it. So I'm stuck having to rebuild my iPhone anyway :( Maybe creating a backup on a non-tampered-with iTunes and using Tony Tellez's method might work for others. –  obvio171 Nov 11 '12 at 15:33
    
You should definitely not lose anything from this method. That was entirely the point of doing it this way. Also the iTunes library file is rebuilt based on your computer's library, not the phone's, but afterwards should allow you to sync with the phone. –  chaiguy Nov 11 '12 at 21:16
    
This is a pretty sweet solution! –  Django Reinhardt Nov 12 '12 at 13:47
2  
@chaiguy Sir, you are intelligent and good looking. May all your plans become victories and all your enemies fall before you. –  Daniel Lucraft Mar 3 '13 at 16:41

protected by Community Oct 16 '12 at 18:02

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.