Search code examples
androidandroid-emulatoradb

Sqlite3 not installed. How the android read messages from mmssms.db


Running an emulator when i connect using Android Debug Bridge i was able to run standard T-SQL query like

C:\program files\android\android-sdk\platform-tools adb shell sqlite3 /data/data/com.android.providers.telephony/databases/mmssms.db "Select * FROM sms;

but when i connected my rooted android phone using the adb it gave me a message like

Select not found

then i installed sqlite on the phone and it worked

Question:

if sqlite is not installed on the phone how the sms messages are read from mmssms.db by the phone OS (android)? why i was not able to run a Select prior to the installation of sqlite3 on the android phone?


Solution

  • Just because the command-line tools aren't installed, doesn't mean there's no code on the device that can access the database -- applications will use a library, rather than calling the sqlite3 executable.