Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Debug : Send sms from cmd to real device

Tags:

android

I'm debugging an Android app that using SMS Sending function. To test this function, I need to send SMS to device that running this app. I test this app on real device. (that connects to my computer through adb)

My question is : How can I send a SMS message from computer to this device. It seems that I try this tutorial tutorial, but it doesn't work.

telnet
o localhost 5554 (or 5555)

I always receive "Cannot find host". So, please tell me how to this work.

Thanks :)

like image 603
hqt Avatar asked Oct 25 '25 00:10

hqt


2 Answers

Is your real device a phone connected to the network? Send the SMS from another phone or via an email gateway.

IIRC, 5554, 5555, etc. are the "phone numbers" of emulators. My notes on sending SMS messages to emulators say:

To test SMS within the emulator, simply launch a second emulator and send the test messages to the emulator number, e.g. "5554"

Maybe you can use telnet for this too, I don't know. If so, I need to update my notes.

p.s. Here are my notes on email-to-SMS gateways:

Verizon:      [email protected]
AT&T:         [email protected]
T-Mobile:     [email protected]
Sprint:       [email protected]

Alltel        @message.alltel.com
Amp'd         @vtext.com
Boost         @myboostmobile.com
AT&T          @txt.att.net
Metrocall     @page.metrocall.com
Nextel        @messaging.nextel.com
Sprint        @messaging.sprintpcs.com
T-Mobile      @tmomail.net
US Cellular   @mms.usc.net
Verizon       @vtext.com
Virgin (USA)  @vmobi.com
Windstream    @windstream.net
like image 193
Edward Falk Avatar answered Oct 26 '25 14:10

Edward Falk


It seems that adb listens to connections on port 5037

"telnet localhost 5037" connects to my computer.

Try adb kill-server adb start-server

When adb starts, it'll print the port number

like image 33
Y2i Avatar answered Oct 26 '25 15:10

Y2i



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!