【蜗牛黑板报】ubuntu等类linux环境抓ylog的脚本

2020-08-06  本文已影响0人  技术是神奇的

脚本功能: 生成以当天日期命名的文件夹,当时log放置在该文件夹内

cur_dateTime="`date +"%m-%d"`"
echo -e "$cur_dateTime \n"
sudo adb kill-server
sudo adb start-server
adb devices
adb root
adb remount
ylogpath=`adb shell ylogctl rootdir`
echo -e "ylogpath = $ylogpath \n"
if [ ! -d "$cur_dateTime" ]; then
    mkdir $cur_dateTime
fi
cd $cur_dateTime
echo -e "pls input directory \n"
read a
while [ “1” = “1” ]
    do
        if [ ! -d "$a" ]; then
            mkdir $a
            break
        else
            echo -e "file exists,plz input an new directory again!!\n"
            read a
        fi
    done
cd $a
adb pull $ylogpath  .
python analyzer.py```

上一篇下一篇

猜你喜欢

热点阅读