[G1 Q&A, Help & Troubleshooting] Darkstrumn:
Maybe this will help...

Hi All,

I don't reckon there isn't an actual problem.

The "DOS" console is not a terminal program and thus doesn't behave proper, and the DOS telnet program is just as bad!

In linux, the console is a terminal program, but is also very generic.

The adb shell is not a very good telnet server either in terms of terminal handling; which all really boils down to the sh being to limited as a login shell.

The following may help a little.

Have PuTTY or the like handy.

For windows, copy paste the following or something like it into a bat file (dlink.bat I called it):

The important bit is the forwarding...

@echo off
:init
::REM //-----------------------------------------------------------------------
set prog=%~f0&&REM This
set progDir=%~dp0&&REM This location
set workdir=%cd%&&REM Current locataion
set ADB=%progDir%adb
echo --Droid Link--
echo current settings:
echo -----------------
echo prog=%prog%
echo progDir=%progDir%
echo workdir=%workdir%
echo -----------------
::REM //-----------------------------------------------------------------------
::REM //ensure a clean house
%ADB% kill-server&&echo adb server clean: Ok.||echo adb server clean: Problem...
::REM //start fresh server instance, use its own shell as it will not detach from the shell until it ends elsewise due to it running in daemon mode
%SystemRoot%\system32\cmd.exe /e:on/v:on/f:on /c "%ADB% root>nul:"
::REM //get id of the Android (will need to be adjusted for more than one)
for /f %%a in ('"%ADB% devices|find "HT""') do set adev=%%a
::REM //see if we found our device
if .%adev%.==.. (
echo Android not detected...
goto :done
) else (
echo Android detected as:%adev%
)
::REM /if
set DROID=%ADB% -s %adev%
::REM //-----------------------------------------------------------------------
:begin
::REM //-----------------------------------------------------------------------
::REM //forward telnet port
%DROID% forward tcp:18023 tcp:23
::REM //forward ssh port
%DROID% forward tcp:18022 tcp:22
echo This terminal is now held by --Droid Link--
echo You can now connect to Android:%adev% via telnet host:127.0.0.1 port:18023
echo And if you start a ssh server...
echo You can connect to Android:%adev% via ssh host:127.0.0.1 port:18022
echo For best results, use a program like PuTTY or something (dos telnet is lacking).
%DROID% shell telnetd
echo --Droid Link: Closed---
::REM //-----------------------------------------------------------------------
:done
::REM //-----------------------------------------------------------------------
%ADB% kill-server&&echo adb server off-line.||echo adb server dropped: off-line.
::REM //cleanup
set DROID=
set ADB=
set adev=
::REM //-----------------------------------------------------------------------
:xit
echo End of line.
::REM //-----------------------------------------------------------------------

For Mac, I'm afraid I rely on my linux syntax and pray it works the same in OSX:

adb -s {device ID} forward tcp:18023 tcp:23

note the adb -d forward tcp:18023 tcp:23 may do the trick also.

I use PuTTY and have a profile called Android-Telnet, which can be called from the console as putty.exe -load Android-Telnet

PuTTY may or may not be the end-all, be-all of terminal programs, but I like it, it works, and is multiplatform.:)

Hope that helps.