It happens when I try to connect from emacs-26.3/tramp-2.3.5.26.3 onto my sgs5's lineageos14.1 adb shell.
*tramp/adb d73896d9*
buffer contents is the following:
nv COLUMNS=1 ls -d -l /; echo tramp_exit_status $?^M
/system/bin/sh: nv: not found
tramp_exit_status 127
klte:/ $ ^[[K^Mklte:/ $ ^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H
from *debug tramp/adb d73896d9*
, I can see following command is used by tramp: adb -s d73896d9 shell
.
Following is the output from manual run:
prompt$ adb -s d73896d9 shell
^[7
Session DOES NOT end here, it's functional - the only strange thing here is that funny prompt.
pressing enter adds ^[8klte:/ $
to the output so that the full output from very beginning looks like following:
prompt$ adb -s d73896d9 shell
^[7
^[8klte:/ $
subsequent presses of ENTER just adds klte:/ $
prompts so that full output looks like following:
prompt$ adb -s d73896d9 shell
^[7
^[8klte:/ $
klte:/ $
klte:/ $
Is the ^[7
and and ^[8
main player here? That's why we do have nv COLUMNS=1 ls -d -l /
instead of env COLUMNS=1 ls -d -l /
above (e
is swallowed by ^[7
somehow?).
when I run adb shell
from non-emacs terminal or from M-x term
, I get correct prompt immediatelly, ie no extra ^[7
and ^[8
characters are present + no extra empty line is produced later down between subsequent prompts.
please help.