Issue
Im trying to send SMS via ADB terminal command.
$message = "Joe Doe. We find a provider for your request, touch the link below for see more details.
https://massasistencia.com/detalles-cliente/23"
exec('adb shell service call isms 7 i32 0 s16 "com.android.mms.service" s16 "+541156409605" s16 "null" s16 "' .$message. '" s16 "null" s16 "null"')
The message recived says only "Joe"
If i send only the link the SMS arrives ok. If i do a str_replace to "Joe Doe" replacing " " for "-" only sending the name, the message arrives ok.
I believe the problem is the spaces " ".
This is the command line im using, the SMS arrives, so the command works, the problem is the message itself.
adb shell service call isms 7 i32 0 s16 "com.android.mms.service" s16 "+541156409958" s16 "null" s16 "Hi" s16 "null" s16 "null"
Solution
You need to add slash character (\) before each space character in the message. The following command will only send Joe:
adb shell service call isms 7 i32 0 s16 "com.android.mms.service" s16 "+541156409958" s16 "null" s16 "Joe Doe. hello" s16 "null" s16 "null"
The following command will send Joe Doe. hello:
adb shell service call isms 7 i32 0 s16 "com.android.mms.service" s16 "+541156409958" s16 "null" s16 "Joe\ Doe.\ hello" s16 "null" s16 "null"
Answered By - Suban Dhyako
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.