iPhone Contacts Are Gone! Fixed :)

Discussion in 'The Off Topic Lounge' started by Mr. Penguin, 19 Mar 2013.

  1. Mr. Penguin

    Mr. Penguin Administrator
    Staff Member Admin Moderator VIP

    18 May 2012
    Likes Received:
    So my sister had her iPhone 4 and for some reason all her contacts just vanished. She never uses iTunes or iCloud... they just simply disappeared. You have a few options such as the easy one of restoring from backup in iTunes, but if you haven't regularly or recently you could lose important data.

    She contacted apple and they said oh that is strange... haven't heard of that happening before :censored. It is a common issue! (just google it) and was told that it was outside her warranty. They suggested logging into iCloud to see if the contacts were there and to also Sync with iTunes and upgrade to the latest iOS. Still not there. Ok, here is something that I knew would just work. Bear in mind you do not need a jailbreak or anything fancy like that. Also note if you do not have a backup... try backing up and extract the iOS files to see if there is any content in the AddressBook.

    Also note that if your backups are encrypted... it is not gonna work for you.

    Luckily I had a older backup in iTunes from an upgrade.

    Step 1: Download iPhone Backup Extractor:
    Select All
    Keep in mind there are plenty of these type of tools out there, so pick one you like.

    Step 2: Find your AddressBook Database
    I was able to locate the iOS files and the AddressBook.sqlitedb file. Sweet.

    Step 3: Download Sqliteman
    Select All
    Note that alternatives are hard to find. Some just let you browse tables or run SQL queries which you can't export :( There is a Firefox addon called SQLite Manager
    Select All
    But I am on Chrome and do not want to install Firefox ;)

    Step 4: Extract and Run Sqliteman
    Sqlite Man.png Sqlite Man.png
    Step 5: Open AddressBook.sqlitedb
    Sqlite Addressbook.png

    Step 6: Run the Following DB Query

    Select All
    select ABPerson.prefix, ABPerson.first,ABPerson.last, ABMultiValue.value from ABPerson,ABMultiValue where ABMultiValue.record_id=ABPerson.ROWID
    In the right hand top box and click the green play button.


    If you would more information from the db (job titles, birthdays, departments, organisations, nickname etc), you can run the following query instead:
    Select All
    select ABPerson.prefix,ABPerson.suffix, ABPerson.first,ABPerson.middle,ABPerson.last, ABMultiValue.value, ABPerson.note, ABPerson.nickname, ABPerson.organization, ABPerson.department, ABPerson.jobtitle, ABPerson.birthday from ABPerson,ABMultiValue where ABMultiValue.record_id=ABPerson.ROWID

    Note that there are 20 fields, chose the ones that suite you. What you did there is selected certain tables from the database which hold basic information, feel free to export more if you wish.

    Step 7: Save as CSV
    Export Sqlite to CSV.png

    Step 8: Get your Contacts Back on Your Phone
    It might be a good idea to enter these manually back to your phone. Or you can use the following method to get from CSV to iPhone.

    Watch this video on YouTube.

    Future Tip: Editing a CSV file in Excel is so much quicker and easier than adding /editing contacts manually. So it might be a good time to fill in that missing information from your AddressBook. Also for others who have a list of contacts in an actual old school physical address book, this is probably the best way to go digital.

    Tip: You can get various USB SIM card readers for cheap that allow you to export your contacts to CSV.

    Now I hope you learn your lesson at least one backup once! right now :)

    Attached Files:

  2. Willison Lena

    Willison Lena New Member

    27 Sep 2013
    Likes Received:
    I lost all my contacts after iOS 7 update, and I get it back by following the video

    Watch this video on YouTube.
    • Like Like x 1
  • About Us

    We are a community mixed with professionals and beginners with an interest in wireless security, auditing and pentesting. Feel free to check out and upload resources.

    You can also find us on: Twitter and Facebook

  • Donate to Us

    Did you find our forums useful? Feel free to donate Bitcoin to us using the form below. Those who donate the equivlent of $10 USD or more will be upgraded to VIP membership. Don't have Bitcoin? Use your credit card to GO VIP here. Don't want to fork out some coin? There are other ways to GO VIP. Bitcoin: 1LMTGSoTyJWXuy2mQkHfgMzD7ez74x1Z8K