16

Is there a way to send an SMS from te DDMS in Eclipse to my Android phone. The emulator control is disabled when I'm running my physical phone. I can only sent a SMS to the emulator.

2

7 Answers 7

22

The following few steps should get you up into simulating an incoming sms in an Android Emulator.

Requirements:

1.Make sure that you have the telnet client in you PC whether it is Windows or Linux.Google around on how to install one if it is not already installed on your PC.

Steps To Emulating an incoming sms

(a) open you CMD prompt and Enter the command:

telnet

For now I am Demonstrating using Windows 7 ,so you will get

Welcome to Microsoft Telnet Client

Escape Character is 'CTRL+]'

Microsoft Telnet>

(b)Assuming that your Emulator is already started.And while still on the CMD,type:

 o localhost 5554

this should open a connection to the emulator.

(c)To Emulate an incoming sms from a number say 0123456 type:

sms send 0123456 Your Message

You should be able to get the message in your android emulator inbox.Thats all Folks.

2
  • 7
    If you read question carefully you would notice that he was asking about REAL device..
    – Ewoks
    Apr 24, 2015 at 5:36
  • using emulator or real device does not matter, when testing SMS
    – hyena
    Nov 13, 2016 at 4:40
15

The newest way in 2019:

I hope in 2020 we'll be able to simulate SMS on real devices (if it's legal) enter image description here

1
  • 1
    Oh my god. This is what I expected! I confirmed it worked on my AVD.
    – mazend
    Sep 10, 2019 at 11:13
3

Yeah it doesn't seem like it is possible. With the emulator you can do:

telnet localhost 5554
sms send +12345 A quick brown fox.

But if you try it with a real phone (well I tried a Galaxy S2) it just closes the connection. Of course it's always possible Samsung screwed up the code somewhere, but as common as that is, I think in this case the functionality is probably disabled for non-debug ROM builds.

1
  • to do it with the terminal you can simply use the Emulator Control in the Dalvik Debug Monitor Server (DDMS) Jul 23, 2012 at 9:55
2

I am not sure about what versions of android or adb support this you can try

adb emu sms send [from] [message]

so for example

adb emu sms send "+1555....." "Your message goes here....."

Hope this helps.

PS: I think this only works with emulators.

0

Use some free SMS sending website to get the Intent of android.provider.Telephony.SMS_RECEIVED. means send a SMS to your mobile number using free sms service.

-1

Indeed, it is quite easy with Android emulator to simulate an incoming sms,there are loads of tutorials for that for example: http://www.anddev.org/video-tut_-_simulating_incoming_phone_calls_-_sms_via_cmd-t135.html

But i'm not sure that you can do that with a phone. Using the Command line is only for emulator purposes. Though you could try to find the port on which your phone is connected and use the procedure with telnet to test it.

-2

telnet localhost 5554

sms send +905xxxxxxxxx "Type your message here, between quotes"

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.