adb抓取日志脚本

33 阅读1分钟

不废话直接上代码:

adb wait-for-device
adb devices
adb shell -c
set filename=%date:~0,4%%date:~5,2%%date:~8,2%_%time:~0,2%%time:~3,2%%time:~6,2%
adb shell logcat -v time >"%filename%.txt"

脚本名随便定义:adbPrintLog.bat。把上面代码贴进去就行。

剩下的就是凑字数了,不然发布不了文章。