Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.
General iPhone Chatforums, a part of the
Hello, I have backup the AddressBook.sqlitedb file before upgrading my jailbreak iPhone from iOS5 to iOS6. Actually, I am trying to restore these contacts but with no success. I use...
10-27-2012, 04:25 AM #1Restore Contacts with AddressBook.sqlitedb after update from iOS5 to iOS6 ?
I have backup the AddressBook.sqlitedb file before upgrading my jailbreak iPhone from iOS5 to iOS6.
Actually, I am trying to restore these contacts but with no success.
I use iFunBox to delete the already existing AddressBook.sqlitedb (on /var/mobile/library/addressbook/addressbook.sqlitedb) file and then I paste the file from my backup.
The problem is that after a respring or reboot, I have the apple logo during 1 minute and then I can see that no contact is restored.
Please, someone can explain me how can I restore my contacts if I already have the AddressBook.sqlitedb file, please ?
10-27-2012, 07:13 AM #2
Hi, I think you will have to delete all AddressBookxxxx.yyyy files, then paste your backup one into the folder and then reboot
10-27-2012, 07:22 AM #3
I tried but with no success unfortunately.
The Apple Logo appears during few seconds, and no contact is displayed then.
10-27-2012, 07:45 AM #4
iOS6 SQLite database may be in a different order than iOS5. The iOS4 to 5 music SQLite database order changed so a straight copy may not work. Have you an iTunes backup you could restore from or pull out contact Vcards with a program like iPhone extractor
This might be worth a go
Lincomatic's DIY Blog | electronics, 3d printing, hacking, etc
Last edited by DC_Dave; 10-27-2012 at 07:55 AM.
10-27-2012, 08:36 AM #5
Funny as I was reading this article.
Unfortunately it doesnt work; even when I change the _ClientVersion with an SQLite editor; still having the Apple logo and no contacts.
If you know an application that can convert my addressbook.db to vcf card, that should be perfect !
iPhoneBackupExtractor is not a freeware (and I didn't find any "free version on the net).
10-27-2012, 08:58 AM #6
iPhone backup extractor works without a serial number in demo mode allowing one extraction at a time. If they are there, you could restore from that backup.
10-27-2012, 09:06 AM #7
Finally, it works !
I did that but added another step at the end; to change the addressbook.sqlite owner to Mobile.
[S O L U T I O N]
(1) FIRST GET A COPY OF YOUR CONTACTS from either an old backup (read posts above to find out where in iTunes backup are the contacts stored and how to retrieve them. Long story short, your best bet is to locate the following filename inside iTunes backup folder: 31bb7ba8914766d4ba40d6dfb6113c8b614be442, copy it somewhere else and rename it to AddressBook.sqlitedb. That will do. Alternatively you could have a copy of the contacts file that you got from accessing your iPhone’s file system by using some file browser like iPhonebrowser or i-FunBox. The contacts file is stored in /var/mobile/Library/AddressBook/ and the file name is AddressBook.sqlitedb. There is also another copy in /var/root/Library/AddressBook/ but I’m not too sure what that one is being used for. Initially I thought one was used by the Phone App and the other by the Contacts App but that is not the case. Also note that many people incorrectly talks about a different path being /private/var/… It is actually the same file accessed (mounted) through a different route. This is a Unix thing if you are not familiar with Unix filesystem…
(2) Then get a copy of the empty contacts from your current filesystem. WHY WE NEED THAT? Well, as I explained earlier, we would need to match the version (_ClientVersion) under ‘_SqliteDatabaseProperties’ in the old backup of AddressBook.sqlitedb to match the current versdion in your iOS. YOU CAN SKIP THIS STEP IF YOUR ARE RESTORING CONTACTS FROM SAME FIRMWARE/iOS VERSIONS. Otherwise, open SQLite Database Browser (Freeware app, Google it…) and go on ‘Browse Data’ tab and write down the numeric value of the field named ‘_ClientVersion’ under ‘_SqliteDatabaseProperties’.
(3) now open the backup copy of your AddressBook.sqlitedb with your contacts and edit that field to match the same version number in the current iOS. Save the file! (update it).
(4) FINALLY copy over the updated copy of your AddressBook.sqlitedb to both /var/mobile/Library/AddressBook/ and /var/root/Library/AddressBook/ and you should see the contacts in your Phone App and Contacts App right away, no need to reboot or anything!
10-27-2012, 09:24 AM #8
Good one to remember that!
Copying files from PC to iPhone can change their file permissions. Best to zip the file first and unzip after the transfer.
10-27-2012, 11:17 AM #9
One more thing.
After that, I have synchronized the contacts with iTunes.
Then I saw that I was not able to modify my contacts on the iPhone; and neither to add a new contact.
So I have deleted every addressbook*** files with iFile and synchronized again with iTunes.
Then it was ok !
10-28-2012, 12:57 AM #10