HowTo: “sqlite” (Android-App-Databases)

Please first read the article about “adb” here. Then you can use “adb + sqlite3” to view, export e.g. your SMS or your contacts … 🙂

# switch user to root


# open the android “contacts”-db

sqlite3 /data/data/

SQLite version 3.7.11 2012-03-20 11:35:50
Enter “.help” for instructions
Enter SQL statements terminated with a “;”

# show all databases in this file


seq name file
— ————— ———————————————————-
0 main /data/data/

# show all tables in this file


_sync_state settings
_sync_state_metadata speed_dial
accounts status_updates
activities v1_settings
agg_exceptions view_contacts
android_metadata view_contacts_restricted
calls view_data
contact_entities_view view_data_restricted
contact_entities_view_restricted view_groups
contacts view_raw_contacts
data view_raw_contacts_restricted
groups view_v1_contact_methods
mimetypes view_v1_extensions
name_lookup view_v1_group_membership
nickname_lookup view_v1_groups
packages view_v1_organizations
phone_lookup view_v1_people
properties view_v1_phones
raw_contacts view_v1_photos

# show all contacts with phone- numbers

SELECT name, number FROM view_v1_phones;

# show only contacts (all info) with the name “Lars”

SELECT * FROM view_v1_people WHERE name LIKE '%Lars%';


# export the output to a file called e.g. “my_contacts_db.csv”

.bail ON
.headers ON
.mode csv
.output my_contacts_db.csv
SELECT _id,name, number FROM view_v1_phones;
.output stdout

more Info:

Leave a Reply

Your email address will not be published. Required fields are marked *