echo "start dump meminfo"
i=0
while :
do
# >> 向文件末尾追加命令
#adb shell dumpsys meminfo >> ./shell.log
adb shell cat /proc/meminfo >> ./shell.log
i=$(( $i + 1 ))
time=$(date "+%Y-%m-%d %H:%M:%S")
echo "dump $i times at ${time}"
done
脚本作用:
下面是windows bat 脚本 调用 logcat 命令
adb wait-for-device
adb root
adb wait-for-device
adb logcat -G 10m
adb wait-for-device
adb shell logcat -c
adb wait-for-device
adb shell logcat -v time >log_test.log
pause
因篇幅问题不能全部显示,请点此查看更多更全内容