Compare commits

..

No commits in common. "c7a76019a96b6efca4b07c8130b9ed0eea800027" and "a8443bb0ad901e412a2d409f02ffbc5c4c13d8c3" have entirely different histories.

2 changed files with 5 additions and 40 deletions

View File

@ -1,37 +0,0 @@
for i in $(seq 1 10); do
echo i=$i
# 回到主界面
adb shell input keyevent 3
adb shell input keyevent 3
# 唤醒菜单
adb shell input keyevent 312
# dump当前ui
adb shell uiautomator dump
adb pull /sdcard/window_dump.xml
sleep 2
# 判断是否有后台
cnt=$(cat window_dump.xml | grep -c "近期没有")
if [ $cnt -eq 1 ]; then
adb shell input keyevent 3
rm window_dump.xml
break
fi
echo debug $cnt
cnt=$(cat window_dump.xml | grep -c "全部")
if [ $cnt -ne 1 ]; then
continue
fi
#找到清后台按钮的位置
tmp=$(sed 's/\<node/\n/g' window_dump.xml | grep 全部 | awk -F 'bounds=' '{print $2}' | awk '{print $1}' | awk -F '"' '{print $2}' | sed 's/,/ /g' | sed 's/\[/ /g' | sed 's/\]/ /g' | awk '{print $1,$2}')
echo $tmp
adb shell input tap $tmp
adb shell input keyevent 3
rm window_dump.xml
done

8
run.sh
View File

@ -70,6 +70,9 @@ mkdir $dir/thpmaps
echo "round app start_type start_time rss pss pagefaults minorfaults majorfaults itlbmiss dtlbmiss cpustall inc_ratio order4_ratio order4_cont inc_total nr_direct_reclaim" > $dir/result
adb shell cat /sys/kernel/mm/transparent_hugepage/hugepages-64kB/enabled > $dir/hugepages-64kB_enabled
adb shell cat /sys/kernel/mm/mthp_compact/enabled > $dir/mthp_compact_enabled
for round in $(seq 1 $cycle); do
# 重启并等待重启完成
echo "rebooting"
@ -88,9 +91,8 @@ for round in $(seq 1 $cycle); do
break
done
adb root
adb shell cat /sys/kernel/mm/transparent_hugepage/hugepages-64kB/enabled > $dir/hugepages-64kB_enabled
adb shell cat /sys/kernel/mm/mthp_compact/enabled > $dir/mthp_compact_enabled
# adb连接后睡眠60s
sleep 60
# 解锁手机
~/.scripts/android/unlock.sh