Being able to send an SMS to a device can come in really handy from time to time. Below are two methods for sending text to a device using SMS. The first is to send to a hardware device, the second to send to a virtual device on an emulator.
Hardware device
- > adb shell
- $ am start -a android.intent.action.SENDTO -d sms:01123123123 --es sms_body "Text to send" --ez exit_on_sent true
- $ input keyevent 22
- $ input keyevent 66
For more info, see “How do I send an SMS from a shell?” on Stackoverflow.
Emulator
- Open the DDMS perspective in Eclipse.
- Under “Telephony Actions” select “SMS”.
- Fill out “Incoming number” and “Message”.
- Hit “Send”
For more info, see “Using DDMS” on the Android developers site.