如何从DOS提示符保存文本文件中的android的logcat?

时间:2012-08-01 06:16:54

标签: android dos logcat android-logcat

我正在使用Android开发移动应用。我正在使用Eclipse Pulsar进行开发。我正在使用Windows XP。我想将logcat保存在一个文件中。

当我从Eclipse Pulsar那里拿走时。它错过了一些线路。所以,我尝试从DOS提示符中取出它。

我在dos提示符下键入以下命令,但创建的文件中没有数据存在。我附上了DOS提示符的图片文件。

enter image description here

2 个答案:

答案 0 :(得分:3)

adb shell logcat -t 500 > D:\1.txt

其中-t param是来自log

的行数

答案 1 :(得分:2)

如果您知道设备ID

adb -s 120f1f61 logcat -d>D:\logs\log3.txt

或者如果只有一台设备连接

adb -d logcat -d>D:\logs\log3.txt