localhost – How to use telnet in Windows with the Android Emulator?-ThrowExceptions

Exception or error:

I’ve tried to run the command telnet localhost 5554 in the command line, but I didn’t succeed. It kept saying telnet is recognized as an internal or external command....

The directory is set to where my Android SDK tools are installed (C:\Program Files\Android\android-sdk\tools). Maybe this path is not correct but I don’t know how to fix this. I have changed the path to other but no success.

How to solve:

If you’re on Windows 7, telnet is not enabled by default. This site has step-by-step instructions for turning it on. Once you do that, you should be able to telnet into the emulator.


You need to turn on the Telnet service. Alternatively, you can also use the Putty ssh client – http://www.putty.org/ to telnet to localhost 5554


If you working in windows 7 telnet is not set by default. You must enable it from Programs and Features from Control Panel.

1- Turn Windows Feature on or off

2- check on Telnet Client / Telnet Server // telnet client only is OK

3- OK // feature is on now

enter image description here

To test it’s working from command line write telnet

To connect to your emulator just write this command

-->> telnet 5554 localhost

5554 port number in our case its 5554

enter image description here

You can run some commands in your emulator:

control power, network, simulate call, message ….etc

Example: sms send 1254 this is message

This command will send message to your emulator from this number 1254
with message this is message


easy way to get all devices connected IP with port to connect

just write in terminal this command

adb devices


On Windows 7 Telnet Client and Server is be disabled by default. If you want to enable it, you can do so using the Command Prompt or via the Control Panel.

To do so:

Click on Start and under search type in CMD
Right click on CMD and click on Run as administrator
Enter the Administrator password if it prompt
Then type in pkgmgr /iu:”TelnetClient” to Enable the Client
And pkgmgr /iu:”TelnetServer” to Enable the Server


You don’t have Telnet client in your windows, install it, then you can connect.



The service Tlntsvr.exe, responsible for Telnet, was disabled at my machine. I Just put it to “manual start” and then started it.


After enabling the Telnet Client, it didn’t work for me right on the Command Prompt. What I had to do:

  1. Open the telnet prompt (Search programs, type “telnet.exe”, or just “telnet” in C:\WINDOWS\system32).
  2. On the telnet prompt, type “o localhost 5554”.


If you’re trying to connect to the emulator with a shell, don’t do it over TCP/IP. Do it with ADB:

adb -e shell

ADB resides in platform-tools.

Leave a Reply

Your email address will not be published. Required fields are marked *