禁用自动旋转
adb shell content insert --uri content://settings/system --bind name:s:accelerometer_rotation --bind value:i:0

旋转屏幕
adb shell content insert --uri content://settings/system --bind name:s:user_rotation --bind value:i:1
i后面跟的不同的值代表旋转为不同的方向,取值范围为0,1,2,3

#!bin/bash
i=0
adb shell content insert --uri content://settings/system --bind name:s:accelerometer_rotation --bind value:i:0
while [ "$i" -lt 100 ]; do
echo "$i"
adb  shell content insert --uri content://settings/system --bind name:s:user_rotation --bind value:i:1
sleep 0.5
adb  shell content insert --uri content://settings/system --bind name:s:user_rotation --bind value:i:0
i=$(($i+1))
sleep 0.5
done

 

ADB命令关闭打开wifi

#!bin/bash

#开关wifi次数验证
i=1
while true
do
adb shell svc wifi disable
sleep 1
adb shell svc wifi enable
sleep 1
echo "开关次数" $i
((i=$i+1))

done

或者

#!bin/bash

i=1
while true
do
adb shell < open-wifi.txt
echo "开关次数" $i
((i=$i+1))
done

#open-wifi.txt文档写

su
svc wifi disable
sleep 5
svc wifi enable
sleep 5

相关文章:

  • 2021-12-26
  • 2021-12-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-03
  • 2021-09-30
猜你喜欢
  • 2021-06-15
  • 2021-07-26
  • 2021-07-18
  • 2022-03-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案