Search code examples
androidtelnet

Android: how to telnet a phone?


I want to know if it's possible to telnet on a certain port of an Android phone connected via USB. I've seen that if I telnet localhost:5556, I go to the emulator.

Could I do something similar when I connect a physical device? Which commands could be handled?


Solution

  • Well, adb shell is the way to connect to the terminal. You can actually telnet to any port you want on the device, there just needs to be an application listening to that port. I don't believe the devices provide the same functionality that the emulator does as that would allow malicious users to do a number of things. Also, the functionality provided over telnet with the emulators is designed to provide development functionality to overcome the limitation of not being on a physical device (port forwarding, etc) .I'm not sure what the goal is, but you could create an application that supports telnet and bound to a specific port on the device if you wanted to.