adb logcat无法使用-f选项写入文件(在Windows XP下)

问题描述 投票:2回答:1

我想将日志从我的Android设备写入Windows XP下的文件。我正在尝试使用命令:

adb logcat -f test

但返回:

log file locked.couldn't open output file: Bad file number

如果我使用

adb logcat >test

然后可以正常运行,但不会向控制台显示任何内容。我认为使用“ -f”选项将在控制台中显示数据并同时写入文件。怎么做?

android windows file windows-xp logcat
1个回答
0
投票

只是分享,以防有人掉落在这里。

-f选项需要来自电话文件夹的路径(而不是来自PC的路径)。例如:

adb logcat -f /sdcard/test.txt

然后,在停止日志之后,必须从电话中提取该文件:

adb pull /sdcard/test.txt
© www.soinside.com 2019 - 2024. All rights reserved.