1

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?

Community
  • 1
  • 1
John x
  • 4,031
  • 8
  • 42
  • 67

1 Answers1

2

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.

Andrew Aylett
  • 39,182
  • 5
  • 68
  • 95
  • and the sqlite3 exe uses that libraries too or it has its own way of working things out? i feel like i'm lost and talking gibberish `:|` can i get access to system libraries? ... tnx for clearing things up – John x Mar 19 '12 at 17:27
  • Depends on the executable -- I think that if you're coping files to the device manually, they are likely to be statically linked -> not using system libraries. You get access to the system libraries by writing Android applications :). – Andrew Aylett Mar 19 '12 at 17:30