Possibility to pass message data as base64-encoded string
I'm struggling to pass all variety of characters through the windows shell, then adb, then android shell right into com.android.shellms/.sendSMS application unchanged.
The best I could come up with, is this command line in cmd.exe:
adb.exe shell am startservice --user 0 -n com.android.shellms/.sendSMS -e contact +000000000000 -e msg "!\ #\ $\ %\ \&\ \(\ \)\ *\ +\ -\ .\ /\ :\ ?\ @\ [\ \\\ ]\ ^\ _\ ~"
which produces the following SMS:
! # $ % & ( ) * + - . / : ? @ [ \ ] ^ _ ~
Chars like newline, single quote, double quote - I didn't find the way how to pass them.
What would be nice to have, is a possibility to pass message data (and optionally a contact name) in the format that does not require shell-quoting, e.g. base64 of utf-8 or similar. There could be alternative extra key names for that, e.g. something like:
adb.exe shell am startservice --user 0 -n com.android.shellms/.sendSMS -e contact64 KzAwMDAwMDAwMDAwMA== -e msg64 ISAjICQgJSAmICggKSAqICsgLSAuIC8gOiA/IEAgWyBcIF0gXiBfIH4=
Application would then decode those values and use originals them to send an SMS.
Hello tg8. On linux i use double and single quotes, like: adb.exe shell am startservice --user 0 -n com.android.shellms/.sendSMS -e contact "+1234" -e msg '"!\ #\ $\ %\ &\ (\ )\ _\ +\ -\ .\ /\ :\ ?\ @\ [\ \ ]\ ^\ \ ~__"'
On single quote outside and a double quote inside. Have you tried to send ... -e msg "TEXT" on windows? Take a look at : https://stackoverflow.com/questions/7760545/cmd-escape-double-quotes-in-parameter