亚行的shell:不能使用ESC键 [英] adb shell: can't use the ESCAPE key

查看:384
本文介绍了亚行的shell:不能使用ESC键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用运行时亚行外壳。启动六是很容易。然而,我发现,<大骨节病> ESC 键似乎并没有通过它来获得,所以我不能退出插入模式。

I want to use vi when running adb shell. Starting "vi" is easy. However, I found that the ESC key doesn't seem to get through to it, so I can't exit insert mode.

更广泛地说,它不会出现我能够发送 ESC 字符亚行外壳都没有。我已经扫描的网页pretty彻底,一直没能找到任何有类似的问题(更不用说一个答案)。

More broadly, it doesn't appear that I'm able to send an ESC character to the adb shell at all. I've scanned the web pretty thoroughly and haven't been able to find anyone with a similar problem (much less an answer).

我在三星S4运行VRUFNK1。在PC端,我在Windows下运行cygwin的版本的亚行的shell命令。

I'm running VRUFNK1 on a Samsung S4. On the PC end I'm running the "adb shell" command from Cygwin under Windows.

想法?

更新:这是一些可能的线索。

UPDATE: Here's are some possible clues.


  1. 亚行的shell似乎并不成为问题。我可以在一个文件上运行结果捕捉ESC
    OD -cb&GT;文件,所以ESC似乎越来越对程序被亚行的shell下运行。

  2. 所有的命令得到回荡在我的亚行外壳(好像设置-v是在,但它不是)。

  3. 我注意到,输入似乎并没有得到在原始模式我的cygwin外壳发送到亚行外壳 - 即任何文本I型被本地缓冲,直到我打回车 - 那么整个行被发送。我不知道为什么,这将使ESC无效,但肯定六不指望在相当长的方式,也许它在我的环境中一些不寻常的指示来接收输入。

  1. The adb shell doesn't seem to be the problem. I can capture ESC in a file running
    od -cb > file, so ESC seems to be getting to the program being run under the adb shell.
  2. All commands get echoed in my "adb shell" (as if set -v was on, but it isn't).
  3. I notice that input doesn't seem to get sent to adb shell from my cygwin shell in "raw mode" -- i.e., any text I type gets buffered locally until I hit carriage return -- then the entire line gets sent. I'm not sure why that would make ESC ineffective, but certainly vi doesn't expect to be receiving input in quite that manner and perhaps its an indication of something unusual in my environment.

#1类似,庆典(猛砸X)似乎接受它,虽然从bash的呼应是很奇怪的。我可以用ESC在我的bash shell(猛砸X),进入编辑模式,通过我的历史滚动(我已经运行设置-o VI ),但经验很奇怪。当我打ESC,K,屏幕上无任何变化,但我在命令历史记录的位置上升一个梯级(因为它应该); 'K'事业'K'的后续presses被显示在屏幕(而不是从我的历史列表中的相关命令)。当我终于打回车,从我的历史列表中正确的命令执行(!)。

Similar to #1, bash (Bash X) seems to receive it, although echoing from bash is very strange. I can use ESC to enter "edit mode" in my bash shell (Bash X) to scroll through my history (I've run set -o vi), but the experience is very strange. When I hit ESC,k, nothing changes on the screen but my location in the command history goes up one rung (as it should); subsequent presses of 'k' cause a 'k' to be echoed to the screen (instead of the relevant command from my history list). When I finally hit carriage return, the correct command from my history list is executed (!).

更新2:进展...结果
我试图在亚行壳到相同的cygwin我bash shell中的那些设置stty价值,而没有任何效果。

UPDATE 2: Progress…
I tried setting the stty value in the "adb shell" to the same as the ones in my cygwin bash shell and that didn't have any effect.

我也试过这样:避免在Vim逃脱超时问题,但它并没有帮助。

I also tried this: Avoiding escape timeout issues in vim but it didn't help.


  • 我想这(通过使用从文件中读取:所以&LT;&名GT; )。

  • 不幸的是,这些命令没有被六(他们实际上是VIM命令)的认可。

部分解决方案:
键入&LT; CR&GT; 后,立即<大骨节病> ESC 时,在六工程 - 的ESC被接受,我可以退出编辑器。这是尴尬,和编辑窗口仍然是不可用的(好像TERM设置为错误的值),但是这就是进步。

Partial Solution: Typing a <cr> immediately after the ESC when in "vi" works -- the ESC is accepted and I can exit the editor. It's awkward, and the editing window is still unusable (as if TERM was set to the wrong value), but this is progress.

此外,东西做工精细,当我使用SSH,壳牌得到由telnet服务器启动。类似的情况作为终端仿真器直接在设备上。 SSH有它自己的服务器,然后派生出的外壳。在亚行壳的情况下,外壳是由 / sbin目录/ adbd 进程衍生出 - 据我所知,根本就一些不寻常的关于环境。这对我来说是巨大的一步 - 至少现在我有办法用我的电脑(而不是直接在S4的小屏幕上编辑)做设备上全屏幕编辑。感谢杰克Palevich该建议。

Also, things work fine when I ssh in. That shell gets started by the telnet server; similar situation as Terminal Emulator directly on the device. Ssh has its own server which then forks off the shell. In the case of the "adb shell", the shell is forked off by /sbin/adbd -- as far as I can tell, there is simply something unusual about that environment. This is a huge step for me -- at least now I have a way to do full screen editing on the device using my PC (rather than editing directly on the S4's tiny screen). Thanks to Jack Palevich for that suggestion.

我只能想到两件事,试图在这一点:

I can only think of two things to try at this point:


  1. 尝试对别人的设备上运行的adb外壳(但该设备必须运行的根,这样我可以运行的Busybox的六)(顺便说一句中,六的版本是没有问题的 - 它运行的SSH罚款。 )

  2. 当别人在我的设备上亚行外壳,从他们的主机(preferably人谁已经成功运行亚行壳和第六某处previously运行六。

我开始认为这根本不起作用。

I'm starting to think that It Simply Doesn't Work.

更新3:从信息XDA开发者结果
我发现在XDA开发者论坛的一些相关的帖子。这似乎是,人们曾与这个时间长的问题的情况下(因为至少2010)。我没有找到任何解决方案。

UPDATE 3: Info from XDA Developers
I found some relevant posts on the XDA Developers forum. It seems to be the case that people have had problems with this for a long time (since at least 2010). I didn't find any solutions.

XDA链接1

XDA链接2

XDA链接3

还有一个段落列出了多种感知/提议亚行外壳符合我的经验,这里的bug:

There is also a paragraph listing various perceived/proposed adb shell bugs that match my experience, here:

建议亚行壳牌错误

推荐答案

您是对的 - 它根本无法在Windows或Cygwin的壳工作。我发现,最简单的方法,使其工作使用 PuTTYTray

You're right - it simply doesn't work under Windows or Cygwin shell. I found that the simplest way to make it work is to use PuTTYTray.

我的回答。

这篇关于亚行的shell:不能使用ESC键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆