1) Find the backup file that iTunes made before it installed iOS 5:
Go to the folder ~/Library/Application Support/MobileSync/Backup
and look on the right side of the Finder window for the Date Modified to see which ones were there before you updated. The name of the file will be some sort of hexadecimal nonsense. You open this using a program from the interwebs.
2) Download a program called iPhone Backup Extractor.
Its at http://supercrazyawesome.com/ (which is surprisingly a real address). I think its either free or time-limited trial. Open the backup you selected in step 1 using this program. It doesnt matter where you put the extracted files, but remember where you put them because youll need them for the next steps. You can re-extract as many times as you want if you mess up the process at first.
There will be a menu with a bunch of different com.somethingorother.appname lines, and somewhere will be iOS Files. Select that one. This will take out all kinds of user information, including contacts.
3) Get sqlite3, which is a command line program that allows you to examine and modify sqlite databases, and use it to export a csv file from the extracted database. Its only a step or two.
In the terminal, navigate to the folder where the extractor program put all the extracted files. If youre familiar with terminal, you can use the cd command to change directories until you get there. If not, do the following:
Open the terminal and type cd . The space after the cd is important, and dont hit enter yet. Then open the directory where you stored the backup in Finder and drag the icon at the top of the window into terminal. This will copy and paste the directory. Now hit enter.
Once youre in the backup directory, type the following commands (hit enter after each line):
cd iOS Files
cd Library
cd AddressBook
sqlite3 AddressBook.sqlitedb
Now you should see some lines come on the screen that tell you that youre running sqlite3, and the prompt will probably now look like this: >>>
Type the following three commands (I recommend copy-and-paste, but make sure each one is all on one line when you type it in):
.mode csv
.output AddressBook.csv
SELECT ABPerson.First, ABPerson.Last, ABMultiValue.value FROM ABPerson LEFT JOIN ABMultiValue ON ABMultiValue.record_id=ABPerson.ROWID LEFT JOIN ABPhoneLastFour ON ABMultiValue.UID=ABPhoneLastFour.multivalue_id;
The first two commands mean output everything to a file called AddressBook.csv and make it in a comma-separated-values format. The last one gets the names, emails, and phone numbers from the database and stores it in AddressBook.csv . There will be a duplicate for each phone number or email, but its much better than not being able to call anyone.
4) Import the csv file into Address Book.
On your computer, open the Address Book program. Go to File->Import and select the csv file that was created in the last command. It will be in the same directory as the AddressBook.sqlitedb file. This should import your contacts.
5) Sync your phone with your computer and check the box that says Replace Information on this iPhone on the Info tab in iTunes.
You should be done! Hope this is helpful, it took me forever to figure it out.
Go to the folder ~/Library/Application Support/MobileSync/Backup
and look on the right side of the Finder window for the Date Modified to see which ones were there before you updated. The name of the file will be some sort of hexadecimal nonsense. You open this using a program from the interwebs.
2) Download a program called iPhone Backup Extractor.
Its at http://supercrazyawesome.com/ (which is surprisingly a real address). I think its either free or time-limited trial. Open the backup you selected in step 1 using this program. It doesnt matter where you put the extracted files, but remember where you put them because youll need them for the next steps. You can re-extract as many times as you want if you mess up the process at first.
There will be a menu with a bunch of different com.somethingorother.appname lines, and somewhere will be iOS Files. Select that one. This will take out all kinds of user information, including contacts.
3) Get sqlite3, which is a command line program that allows you to examine and modify sqlite databases, and use it to export a csv file from the extracted database. Its only a step or two.
In the terminal, navigate to the folder where the extractor program put all the extracted files. If youre familiar with terminal, you can use the cd command to change directories until you get there. If not, do the following:
Open the terminal and type cd . The space after the cd is important, and dont hit enter yet. Then open the directory where you stored the backup in Finder and drag the icon at the top of the window into terminal. This will copy and paste the directory. Now hit enter.
Once youre in the backup directory, type the following commands (hit enter after each line):
cd iOS Files
cd Library
cd AddressBook
sqlite3 AddressBook.sqlitedb
Now you should see some lines come on the screen that tell you that youre running sqlite3, and the prompt will probably now look like this: >>>
Type the following three commands (I recommend copy-and-paste, but make sure each one is all on one line when you type it in):
.mode csv
.output AddressBook.csv
SELECT ABPerson.First, ABPerson.Last, ABMultiValue.value FROM ABPerson LEFT JOIN ABMultiValue ON ABMultiValue.record_id=ABPerson.ROWID LEFT JOIN ABPhoneLastFour ON ABMultiValue.UID=ABPhoneLastFour.multivalue_id;
The first two commands mean output everything to a file called AddressBook.csv and make it in a comma-separated-values format. The last one gets the names, emails, and phone numbers from the database and stores it in AddressBook.csv . There will be a duplicate for each phone number or email, but its much better than not being able to call anyone.
4) Import the csv file into Address Book.
On your computer, open the Address Book program. Go to File->Import and select the csv file that was created in the last command. It will be in the same directory as the AddressBook.sqlitedb file. This should import your contacts.
5) Sync your phone with your computer and check the box that says Replace Information on this iPhone on the Info tab in iTunes.
You should be done! Hope this is helpful, it took me forever to figure it out.