I'm looking for a solution to send a sms on my android phone through my desktop via adb. When I was at page 3 on Google I knew I needed help.
I've found some solutions to do this: create my own service and call it from adb, execute the native sms app intent and simulate some keypresses, use an app called ShellSMS, and send the message through the service call isms command.
The last one looks promising. And I want to make it work. The command is:
service call SERVICE CODE [i32 INT | s16 STR] ...
The SERVICE I want is isms, so I searched on the Android's sourcecode to find this interface: ISms.
The CODE I want is 5 (TRANSACTION_sendText constant). Technically it calls this function, so I passed the following parameters:
service call isms 5 s16 "PHONENUMBER" s16 "" s16 "MESSAGEBODY" i32 0 i32 0
But all I've got was
Result: Parcel(fffffffc ffffffff '........')
except when I tried to run it without root permissions.
Well, this parcel seems invalid, and my message was not send. Does somebody know what I'm doing wrong here?
Thank you!