脚本功能: 生成以当天日期命名的文件夹,当时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```
网友评论