9

I can't use the command telnet localhost 5554 to connect Android emulator. Always get this error:

Connecting To localhost...Could not open connection to the host, on port 5554: Connect failed

I even have all ports set to allow connections in both the inbound and outbound rules in Windows Firewall.

I am running Windows 7.

Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
IT-Fan
  • 373
  • 3
  • 5
  • 10
  • Try disabling the firewall completely. I once had a similar issue and allowing ports inbound/outbound and even disabling the firewall didn't help, only uninstalling the firewall solved the problem: http://stackoverflow.com/questions/4499803/has-anyone-been-successful-in-using-64-bit-eclipse-for-android-2-3-dev-on-64-bit/4881366#4881366 – Android Eve Jul 09 '11 at 21:04
  • @Android Eve : Disabling the firewall doesn't help either. – IT-Fan Jul 09 '11 at 21:18
  • Sorry all I need to launch the emulator before use telnet. My bad. Problem solved ! – IT-Fan Jul 09 '11 at 21:36
  • Told ya'! :-) Too bad comments need to be 15 characters... – Szocske Jul 10 '11 at 10:43

7 Answers7

6

I've encountered this issue a few times, I'm not sure how the the emulator deals with addresses, but localhost just doesn't work for me.

Changing the connection command to telnet 127.0.0.1 5554 enabled me to connect, so if localhost doesn't work, try 127.0.0.1

Jimmy
  • 16,123
  • 39
  • 133
  • 213
2

Try using the complete command inside telnet:

Microsoft Telnet> open localhost 5554

That should work, sometimes we forget to write the entire command

fhellmund
  • 29
  • 1
  • Thank you for this. My issue was `telent: could not resolve localhost:5554/telnet: Name or service not known`. I had been trying `telnet localhost:5554` in ubuntu. My problem was my inclusion of the colon. Using `telnet localhost 5554` - with a space instead of a colon - worked for me as well. – JJ Stiff Mar 23 '16 at 14:50
1

Firstly ... you should enable Telnet command in windows .

check this http://www.labnol.org/software/windows-telnet-command/18222/

then it will work :)

Ahmed Nasr
  • 26
  • 4
1

first simply type telnet to your command prompt

Microsoft Telnet> open 127.0.0.1 5554

above line might show you following result

Android Console: Authentication required

Android Console: type 'auth ' to authenticate

Android Console: you can find your in C:\Users\YOURPCNAME.emulator_console_auth_token' OK

then go into your 'c' drive then user where you find .emulator_console_auth_token open that file and put you auth token like below

auth ################

then you find

Android Console: type 'help' for a list of commands

OK

it means you are connected now..

Narender Gusain
  • 2,220
  • 17
  • 13
1

If "telnet localhost 5554" doesnt work, try using port 5037. Also ensure that the Emulator is running.

Reyhane Farshbaf
  • 453
  • 6
  • 12
1

Use the netstat tool to verify the application is listening on that port. I'm not familiar with netstat on windows, but it seems you'll need -a -n and optionally the -o options.

If you see the process listening, keep looking at the firewall. If you don't see one, figure out why it's not running.

Szocske
  • 7,466
  • 2
  • 20
  • 24
0

In cmd: you press cd D:\Android\sdk\platform-tools. It is path to platform-tools in your computer. After you can input telnet localhost 5554

redir add udp:9876:9876 or redir add tcp:5000:6000

Anh Duy
  • 1,145
  • 15
  • 25