So recently I had to ship my girlfriend’s iphone off to be replaced, and we found out something that really sucks, there is no way to copy the phone numbers on a iphone back to a simcard, you can import from simcard just cant export. This really sucked. So i looked all over the internet and found out the Addressbook is actually a sqlite file, and I am like hmm
So now the problem was getting the backup from my gf’s iphone over to my mac so I could do this. I used rsync through the network..commands will vary depending on your network
iPhone Backup Location for Mac OS X
in Mac OS X your iPhone files are backed up at the following location:
~/Library/Application Support/MobileSync/Backup/
cd ~/Library/Application Support/MobileSync/Backup/
in Windows XP:
C:Documents and SettingsuserApplication DataApple ComputerMobileSyncBackup
or in Windows Vista/7 the location is here:
C:UsersuserAppDataRoamingApple ComputerMobileSyncBackup
Inside this directory listed folders as your iphone / ipod’s UDID, if you go into the folder alot of .mdinfo and .mddata files.
How to open these files?
*******THE TOOLS*****
iPhone backup extractor.
This one is for mac http://supercrazyawesome.com/ I will find one for windows and post it here later
Found a python script that can be used on windows if you have python installed http://code.google.com/p/iphone-backup-decoder/
I am looking for more windows alternatives…Stay tuned….
************************
So next I needed to make a location to store the extract backup I did this
mkdir $HOME/Documents/marlene
That should work fine for storing my gf’s stuff.
next I used rsync to copy my gf’s backup through the network I mapped the MobileSync folder on her laptop to be shared.
rsync –progress –recursive /Volumes/Marlene/MobileSync/Backup/* $HOME/Library/Application Support/Backup/
This command made the folder and copied it to my mac, took about 2 hours alot of files around 9000.
Finally i had my gf’s backup on my mac and I was ready to extract the data.
I installed iPhone backup extractor and ran it this is what I saw.
So I clicked Read backups and it pulled the backups names
I chose Marlene’s iPhone saw this.
This I was actually kinda cool This backup had all the settings for these programs, So I went through the list and all the way at the bottom found this one very interesting option
Hmm look at that iPhone OS Files, I wonder what these are I selected it and clicked Extract took about 5 minutes and ended up with this
Checked and thought about the file system structure on the iPhone, important files are generally stored in Library, I checked Library and found a folder called AddressBook!!! Inside that folder there was file called AddressBook.sqlitedb. Here was the database file for the phone numbers 🙂
At this point I used command line:
sqlite3 AddressBook.sqlitedb
You will be dropped to a sqlite prompt
SQLite version 3.6.23
Enter “.help” for instructions
Enter SQL statements terminated with a “;”
sqlite>
Here are the following commands I typed in order to see the numbers
sqlite> .mode column
sqlite> .output thefilename
sqlite> select ABPerson.first,ABPerson.last,ABMultiValue.value from ABPerson,ABMultiValue where ABMultiValue.record_id=ABPerson.ROWID’;
ctrl + d to exit
So now if you check your directory you will now see the txt file with the numbers backed up 🙂 Thats it and that was actually fun 🙂