PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, July 11, 2022

[FIXED] How to parse string for send SMS text message via ADB

 July 11, 2022     adb, message, parsing, php, sms     No comments   

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
Answer Checked By - Clifford M. (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing