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
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.