0

I am trying to use isms in a root shell to send a SMS but still no luck. I have tried

service call isms 4 s16 "+mynumber" s16 "" s16 "hello world!" s16 "" s16 ""

but I am seeing this in the LogCat and SMS is not going out from the device.

W/Parcel  ( 1056): Attempt to read object from Parcel 0x52ecfdac at offset 124 that is not in the object list

Is there a way to send a SMS using Shell without using SmsManager to do this..

Thanks

user1546570
  • 287
  • 3
  • 13

3 Answers3

0

Try this:

adb shell am start -a android.intent.action.SENDTO -d sms:CCXXXXXXXXXX --es sms_body "smsHere" --ez exit_on_sent true
adb shell input keyevent 22
adb shell input keyevent 66

Where CCXXXXXXXXXX is country-code followed by phone number.

hwrdprkns
  • 7,525
  • 12
  • 48
  • 69
  • Thank you for your comment. This approach will bring the SMS app to the foreground. I am interested in sending the SMS out without showing the UI. – user1546570 Feb 13 '13 at 04:52
  • This isn't possible unless you've created an app that can respond to an intent to send SMS without showing UI. – hwrdprkns Feb 13 '13 at 17:24
0

Try this command (it works for me) : service call isms 5 s16 "PhoneNumber" i32 0 i32 0 s16 "BodyText"

kiwibe
  • 53
  • 1
  • 5
0

For me service call isms, didn't work. I developed an application for two different chipsets, Mediatek and Spreatrum. For Mediatek(MTK), I found there API which is addon, which contains SMSManagerEx, that can send sms in dual sim. But for spreadtrum there was no API so I had to use reflection as mentioned by Maher in this post. I have my comment there as well, that sends sms from specific sim from code without prompting the default sms app.

Community
  • 1
  • 1