12

I have a rooted Droid (Sholes), with ConnectBot installed. I can ssh into it via dropbear copied to /system/xbin, and/or also the instance of Debian installed on it via the "Linux Installer" application. I'm in portable Linux bliss. But...

I would like to send an SMS message via the shell. Something like

 sendsms 8005551234 "This is a text."

Anything like this out there?

9

You should be able to call the messaging intent with

am start -a android.intent.action.VIEW "sms:numberhere" -e "sms_body" "hello"

Using the intent command as described here:

http://learnandroid.blogspot.com/2008/01/run-android-application-from-command.html

https://stackoverflow.com/questions/4967448/send-sms-in-android

2

An alternative approach is to install Termux and Termux-api

Then ssh in the phone by following this link

Now you can send SMS and access many other useful options mainly:

  1. Camera
  2. Battery Status
  3. Clipboard
  4. Contacts
  5. SMS and Inbox

Full list and syntax can be found here

As it is linux emulator you can use it for many other purposes also.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.