Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #From Shell/ADB no root or sqlite needed
- content query --uri content://com.android.contacts/data --projection display_name:number:data4:contact_id
- # with root access
- /data/data/com.android.providers.contacts/databases/contacts2.db
- #list tables
- sqlite3 contacts2.db ".tables"
- #get header for each column in contacts table
- sqlite3 contacts2.db "PRAGMA table_info(contacts)"
- #find contact name by phone number
- SELECT display_name FROM raw_contacts WHERE _id = (select raw_contact_id from phone_lookup where normalized_number = "+12395555555");
- #find phone number by name
- SELECT normalized_number FROM phone_lookup WHERE raw_contact_id =(SELECT raw_contact_id FROM data WHERE data1 LIKE 'John Smith');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement