+ Reply
Results 1 to 10 of 10

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: Restore Contacts with AddressBook.sqlitedb after update from iOS5 to iOS6 ?

is a discussion within the

General iPhone Chat

forums, a part of the

iPhone Modding

section;
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
...
  1. #1
    What's Jailbreak?
    Join Date
    Feb 2010
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Restore Contacts with AddressBook.sqlitedb after update from iOS5 to iOS6 ?
    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 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 ?

    Thank you

  2. #2
    My iPhone is a Part of Me
    Join Date
    Oct 2010
    Location
    UK
    Posts
    903
    Thanks
    5
    Thanked 69 Times in 66 Posts

    Hi, I think you will have to delete all AddressBookxxxx.yyyy files, then paste your backup one into the folder and then reboot

  3. #3
    What's Jailbreak?
    Join Date
    Feb 2010
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thank you.
    I tried but with no success unfortunately.

    The Apple Logo appears during few seconds, and no contact is displayed then.

  4. #4
    My iPhone is a Part of Me
    Join Date
    Oct 2010
    Location
    UK
    Posts
    903
    Thanks
    5
    Thanked 69 Times in 66 Posts

    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.

  5. #5
    What's Jailbreak?
    Join Date
    Feb 2010
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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).

    Thank you

  6. #6
    My iPhone is a Part of Me
    Join Date
    Oct 2010
    Location
    UK
    Posts
    903
    Thanks
    5
    Thanked 69 Times in 66 Posts

    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.

  7. #7
    What's Jailbreak?
    Join Date
    Feb 2010
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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!

  8. #8
    My iPhone is a Part of Me
    Join Date
    Oct 2010
    Location
    UK
    Posts
    903
    Thanks
    5
    Thanked 69 Times in 66 Posts

    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.

  9. #9
    What's Jailbreak?
    Join Date
    Feb 2010
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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. #10
    My iPhone is a Part of Me
    Join Date
    Nov 2008
    Posts
    622
    Thanks
    21
    Thanked 36 Times in 35 Posts

    Quote Originally Posted by iautran View Post
    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 !
    Simpler way would be to save contacts to iCloud and then just log into the new restore and your contacts will automatically restore

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts