【问题标题】:How to save the logcat of android in a text file from a DOS prompt?如何在 DOS 提示符下将 android 的 logcat 保存在文本文件中?
【发布时间】:2015-11-13 03:09:17
【问题描述】:

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

当我使用 Eclipse Pulsar 时。它错过了一些行。所以,我尝试从 DOS 提示符中获取它。

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

【问题讨论】:

    标签: android dos logcat android-logcat


    【解决方案1】:
    adb shell logcat -t 500 > D:\1.txt
    

    其中 -t 参数是日志中的行数

    【讨论】:

    • 从您的 adb 实用程序所在的位置,查看 android sdk 中的 platform-tools 文件夹
    【解决方案2】:

    如果您知道设备 ID

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

    或者如果只连接了一个设备

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

    【讨论】:

    • 欢迎堆栈溢出。这个问题已经有了答案,因此您将来可能想要寻找未回答的问题。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-12-22
    • 1970-01-01
    • 1970-01-01
    • 2012-01-06
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多