iOS 4.3 restore from backup password issues

I've been playing with the iOS 4.3 beta builds and had an issue where iTunes wouldn't let me restore from my backup after erasing and restoring the new firmware.

Doing so resulted in the error message "iTunes could not restore the iphone because the password was incorrect". I did have a password on my backup, but iTunes simply wasn't recognising it, however I know from other users on various forums that even users who didn't have a password set were getting the same message.

Suggestions to resolve this issue were:

  • Try entering the iPhone lock password instead of the iTunes account one.
  • Decrypt the backup using a third-party tool

Neither of which worked.

This was incredibly frustrating, obviously, as all of my personal data, folders, camera snaps, etc. were locked away in this file.

However, I stumbled across the following advice:

  • Go to Backup folder (~/Library/Application Support/MobileSync/Backup on a Mac)
  • Find the folder containing the backup you want to restore your phone to and duplicate it somewhere else, in case this process accidentally causes further damage
  • Setup your iPhone as a new phone in iTunes and do a backup
  • Open the Manifest.plist file for the latest backup folder in the location above
  • Open the Manifest.plist file for the backup you wish to restore from
  • Copy the value in BackupKeyBag from the most recent one to the one containing the backup you wish to restore to. Save.
  • Restore the old backup in iTunes!

I followed this, but unfortunately my Manifest.plist filte was in binary format so not suitable for editing. To get round this (you may need XCode installed) type the following in terminal:

sudo /usr/bin/plutil -convert xml1 Manifest.plist

Type in your Mac password when asked.

This will have converted the file into XML. You can then edit the file, locate the value between the BackupKeyBag tag and replace it as per the instructions and save. You must then convert it back to binary format by running the following:

sudo /usr/bin/plutil -convert binary1 Manifest.plist

iTunes should now let you restore from this backup!