Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. #/data/data/com.android.providers.contacts/databases/contacts2.db
  2. #location of contacts db
  3. #/data/data/com.android.providers.telephony/databases/mmssms.db
  4. #location of sms db
  5. #select display_name from raw_contacts where contact_id="contact number from mms"
  6. #in contacts2.db gives display name from id num in mms db
  7.  
  8. #try to get the list of contacts from the db through adb
  9.  
  10. testing=`adb shell sqlite3 /data/data/com.android.providers.telephony/databases/mmssms.db "select distinct person from sms where person <> ''"`
  11.  
  12. i=0
  13. j=0
  14. contacts=()
  15. #gets list of existing threads
  16. for line in $testing
  17. do
  18. let i=i+1
  19. echo -ne "$i)."
  20. set contacts["$i"]=$(adb shell sqlite3 /data/data/com.android.providers.contacts/databases/contacts2.db "select display_name from raw_contacts where _id=""$line")
  21. echo ${contacts["$i"]}
  22. let j=j+1
  23. done
  24. echo ""
  25. echo "Which number do you want?"
  26. read -n 1 inputnumber
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement