PDA

View Full Version : How do backup utilities like phoneView access iPhone sqlite db




strife07
Jul 21, 2009, 04:13 AM
Hi,

Does anyone know how programs like phoneView access the sqlite db (for example, SMS, Address Book, Notes) in the iPhone? I know there's an Addressbook API for iPhone SDK but I'm not sure if that is usable for this.
And if I'm not wrong, phoneView requires iTunes to be installed. So I was thinking, it might be using some kind of API from iTunes? Just feeling curious.



admanimal
Jul 21, 2009, 11:11 AM
Hi,

Does anyone know how programs like phoneView access the sqlite db (for example, SMS, Address Book, Notes) in the iPhone? I know there's an Addressbook API for iPhone SDK but I'm not sure if that is usable for this.
And if I'm not wrong, phoneView requires iTunes to be installed. So I was thinking, it might be using some kind of API from iTunes? Just feeling curious.

PhoneView just reads from the backup file that iTunes creates/updates on your hard drive every time you sync the phone.

firewood
Jul 21, 2009, 12:06 PM
iTunes backs up the iPhone data in modified SQLite DB's. Some desktop apps search for, unmodify, and do SQL queries on the resulting DB's after an iTunes Sync.

But all bets are off with the new 3GS encrypted backups.

strife07
Jul 21, 2009, 09:38 PM
PhoneView just reads from the backup file that iTunes creates/updates on your hard drive every time you sync the phone.

I just tested PhoneView on my Macbook. Have never tried to sync my iPhone with iTunes prior to this. And I've disabled autosync for iTunes.

So here's what I did:
I opened PhoneView then plugged in my iPhone. PhoneView starts to sync.
I noticed that it created this directory:
user/Library/Application Support/PhoneView
with the file fe1377cfc20ba33585b865ecc1141eda2353a585.db.

If I'm not wrong, the iTunes backups are in user/Library/Application Support/MobileSync/Backup. But I don't seem to find that on my Mac.

I managed to edit some notes in my iPhone with PhoneView. So I was wondering, if it is in fact using the iTunes backup file, how would it be possible to commit the changes to the iPhone?