Reading sms from android device using ADB shell commands

pranjal khanduri picture pranjal khanduri · Apr 10, 2017 · Viewed 10.1k times · Source

i am working on a project to read the sms of my android mobile,but on internet didn't find much about it. in my search i found following points

  1. You can access android mobile phone through ADB shell commands ,but only certain limited features.

  2. ADB is a best method to communicate, as it do not require user to add any extension on android device

  3. I use the shell command (found on internet) to send message ,but it also didn't work

    adb shell service call isms 5 s16 "com.android.mms" s16 "+01234567890" s16 "+01000000000" s16 "Hello world !" i32 0 i32 0

  4. Moreover i found that if i want to use AT commands to do so i have to root the mobile phone

  5. even i tried accessing

com.android.internal.telephony it shows result permission denied

above are my search results related to reading sms from my android device,

  • so i just want know,how can i read the sms from my android device using adb shell commands?
  • if there is any other way to do so please suggest.

Answer

lucky410 picture lucky410 · Apr 29, 2017

You can Read sms from android mobile using sqlite3, i m also working on the same project. but for this you have to do few things:

1) You must root your mobile (using any root app e.g Kingoroot app) 2) You should know the exact path for sms database of your mobile and you must install sqlite3 (simply google it and you will find it) 3) Only Super User can access that database 4) You must put sqlite.exe file into device/system/xbin (root directory) 5) how to accomplish step 4 ,you need (Titanium backup, root browser )

if done every thing written above all u need is

 C:\Users\Ray>cd appdata/local/android/sdk/platform-tools
    adb
    adb shell
    shell@htc_v02_dug:/ $ su
    root@htc_v02_dug:/ # cd /data/data/com.android.providers.telephony/databases
    root@htc_v02_dug:/data/data/com.android.providers.telephony/databases # sqlite3 mmssms.db
    SQLite version 3.7.6.3-Titanium
    Enter ".help" for instructions
    Enter SQL statements terminated with a ";"
    sqlite> select body from sms where read=0;
    hi

i m using htc mobile. And the sms i just read hi.