0

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.

1 Answer 1

1

Hard to say where it comes from. The sequences look like ansi escape sequences, but they are not complete. For further analysis, I would need the complete Tramp debug buffer (tramp-verbose shall be set to 10). But this cannot be analyzed here on sx. Perhaps, you ask on the Tramp mailing list?

It turned out that whatever the problem was, upgrading to Tramp 2.4.4.2 fixed it.

3
  • Hi Michael. I'll provide verbose log as long as I'll receive subscription confirmation from lists.gnu.org/mailman/listinfo/tramp-devel. In the meantime, I've repeated my test, but this time for vanilla emas-26.3. Although *tramp/adb d73896d9* looks a bit different there, tramp connection still fails. Then I've just installed tramp-2.4.4.2 (elpa), both on my "production" emacs-26.3 and on vanilla emacs-26.3. In both the cases connection succeeded.
    – vibrys
    Oct 25, 2020 at 20:45
  • Ahh, good to know that Tramp 2.4.4.2 works for you. There have been changes, also in tramp-adb.el, and one of them has solved it for you. No further need to send traces then. Oct 26, 2020 at 12:41
  • ok, then. Michael, thank You for tramp. I'm it's long term user and consider it as one of 3 emacs packages that make emacs unique.
    – vibrys
    Oct 27, 2020 at 15:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.