本文介绍了手机设备上的adb shell:出现奇怪的字符(终端颜色问题)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带DarkyRom 10.4.2 XWJW1(Android 2.3.6)和root用户访问权限的三星GalaxyS。我正在实现一个应用程序,但我想使用Eclipse在手机中执行它,但出现错误:ActivityManager:/ sbin / sh:am:找不到。我尝试使用adb shell来查看发生了什么,如果使用ls,我会得到:

I have a Samsung Galaxy S with DarkyRom 10.4.2 XWJW1 (Android 2.3.6) and root access. I'm implementing an application and I wanted to execute it in my phone using eclipse, but I get the error: ActivityManager: /sbin/sh: am: not found. I tried to use adb shell to see what's going on, and if I use ls I get:

<-[1;34macct<-[0m
<-[1;34mcache<-[0m
<-[1;34mconfig<-[0m
...

我在这里在stackoverflow中读到,am错误可能是由于am文件中缺少一行所致。我使用了busybox vi am,这就是我得到的:

I read here in stackoverflow that the am error could be because of a missing line in am file. I used busybox vi am and this is what I get:

<-999;999H<-[6n<-[1;1H<-[J
~
~
~
...
~
~<-[1;1H<-[24;1H<-[K- am 1/1 100%<-[1;1H

有人知道为什么会出现这些奇怪的字符吗?我该如何解决呢?

Does someone know why these weird characters appear? How can I fix it?

编辑:
再搜索一下,我发现这是一个颜色问题。如果我使用 ls --color = none,我将不再看到奇怪的字符,Windows终端不支持颜色。但是我仍然想编辑am文件,并且--color = none在vi命令中不起作用。

Googling a bit more I found that this is a color issue. If I use 'ls --color=none' I don't see the weird characters anymore, Windows terminal doesn't support color. But I still want to edit the am file and the --color=none doesn't work with the vi command. What is the command to disable color in 'busybox vi am'?

推荐答案

正如您所说,问题在于Windows是什么命令?控制台不支持linux控制台颜色技术。
一种解决方案是在具有adb支持的情况下使用腻子。可以在这里找到信息:

As you've said, the problem is that windows console doesn't support the linux console color technique.A solution will be to use putty with adb support. Information can be found here: http://forum.xda-developers.com/showthread.php?t=803225

这篇关于手机设备上的adb shell:出现奇怪的字符(终端颜色问题)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-02 21:27