代码改变世界

一键完成安卓手机日志收集和屏幕截图

2014-12-06 09:41  每天努力一点点  阅读(257)  评论(0编辑  收藏  举报

批处理脚本

android_gather.bat

set curDateStr=%date:~0,4%%date:~5,2%%date:~8,2%0%time:~1,1%%time:~3,2%%time:~6,2%
adb logcat -d > android_%curDateStr%.log
adb shell screencap -p /sdcard/screenshot_%curDateStr%.png
adb pull /sdcard/screenshot_%curDateStr%.png
adb shell rm /sdcard/screenshot_%curDateStr%.png

image