I'm creating a computer system for telemarketing. I'm using adb commands to dial numbers Link Is it possible to get last dialed number and call duration via adb? If it is, how?
2 Answers
I thought I answered it long time ago. You do it like that
c:\adb\adb.exe shell sqlite3 /data/data/com.android.providers.contacts/databases/contacts2.db "SELECT * FROM calls order by _id desc limit 1;" But it may be different in different android versions. As far as I remember worked on KitKat
- Just note, that
sqlite3creates a database with the same name incasecontacts2.dbis not found, so I would advise first to run a command to make sure it existsRicky Levi– Ricky Levi2023-07-13 08:22:59 +00:00Commented Jul 13, 2023 at 8:22
Maybe you just need to pull
/data/data/com.android.providers.telephony/databases/telephony.db as it contains all the call logs, and then filter through?
Something like:
cp data/data/com.android.providers.telephony/databases/telephony.db /sdcard/MyTelephoneDatabase.db
/data/data/com.android.providers.contactsisn't possible (permission denied)