Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,740,480 Members 44,841 Now Online
XDA Developers Android and Mobile Development Forum

Extract Android SQLite Databases For Contacts, SMSs, Etc

Tip us?
 
k420
Old
#1  
Junior Member - OP
Thanks Meter 0
Posts: 13
Join Date: Jan 2009
Default Extract Android SQLite Databases For Contacts, SMSs, Etc

Hi All,

I'm a Windows/Web/Database developer and I've decided to bite the bullet and learn some Java and write apps for Android. I've done Hello World and a few other programs and now I want to start playing with things like contacts and SMSs.

To make life easier I want to get copies of the various SQLite databases so that I can write my SQL queries and general play with them in my SQLite admin program on Windows.

I assume that they are just regular SQLite files like I've used in other projects so what I'd like to know if possible is:
  1. Is my assumption about them being regular SQLite files correct?
  2. Where do they live on the phone?
  3. How do I get them off the phone/emulator?
Also, I don't know whether it makes a difference to what I want to do but I've not rooted my phone and don't really want to. Based on that, if it needs rooting to get them I'd be really grateful if anyone happens to have gone through this exercise before and can just attach them to a reply post.

Thanks for your time in advance
 
k420
Old
#2  
Junior Member - OP
Thanks Meter 0
Posts: 13
Join Date: Jan 2009
For anyone who's interested, after a load of digging I've found the following:

Contacts = /data/data/com.android.providers.contacts/databases/contacts.db
SMS = /data/data/com.android.providers.telephony/databases/mmssms.db
Bookmarks = /data/data/com.android.browser/databases/browser.db

You can get them off the emulator using the adb pull command. E.g.

adb pull /data/data/com.android.providers.contacts/databases/contacts.db d:\contacts.db

Cheers
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes