1

I tried to follow Solution 1 and also Solution 2. Unfortunately, I receive the following:

$ adb shell service call isms 5 s16 "1234564789" i32 0 i32 0 s16 "SMS TEXT HERE"

service: unknown option TEXT

Result: Parcel(a Copying message to Icc: Neither user 2000 nor current process has android permission RECEIVE SMS)

$ adb shell service call isms 5 s16 "+1234564789" i32 0 i32 0 s16 "SMS TEXT HERE"

service: unknown option TEXT

Result: Parcel(a Copying message to Icc: Neither user 2000 nor current process has android permission RECEIVE SMS)

$ adb shell service call isms 7 i32 0 s16 "com.android.mms.service" s16 "+1234564789" s16 "null" s16 "keje" s16 "null" s16 0

Result: Parcel(Attempt to get length of null array)

$adb shell service call isms 7 i32 0 s16 "com.android.mms.service" s16 "+1234564789" s16 0 s16 "Hey you !" s16 0 s16 0

Result: Parcel(Attempt to get length of null array)

$adb shell service call isms 5 s16 "com.android.mms" s16 "+1234564789" s16 "+61418706275" s16 "Hey you !" i32 0 i32 0

Result: Parcel(Attempt to get length of null array)

I tried different combinations of the above, but I am unable to understand how others are able to send SMS using the command but I cannot. I'll appreciate if anyone can point out what I am doing wrong.

I am using a linux machine and an android phone with 5.1 connected with USB cable with USB debugging ON.

ro.build.version.release=5.1
TAG=android-5.1.0_r1
 
YLR
  • 1,503
  • 4
  • 21
  • 28
Nayan
  • 31
  • 4

1 Answers1

2

At last I found out how it should work on Android 5.1.

$ adb shell service call isms 9 s16 "com.android.mms" s16 "DEST_NUMBER" s16 "null" s16 "MESSAGE\ BODY" s16 "null" s16 "null"

You can also use the following format to compensate for spaces in the message:

$ adb shell service call isms 9 s16 "com.android.mms" s16 "DEST_NUMBER" s16 "null" s16 "'MESSAGEBODY 2 with spaces'" s16 "null" s16 "null"

This query is now closed.

Nayan
  • 31
  • 4
  • May I ask: should this work on a terminal emulator, like this one: https://play.google.com/store/apps/details?id=jackpal.androidterm ? The result so far is parcel (0000 '...') – Lucas BS Jan 19 '21 at 21:11
  • Another question: where do I find my phone number ? Does it need country code ? Area code ? – Lucas BS Jan 19 '21 at 21:12