获取系统默认输入法
adb shell settings get secure default_input_method
更改默认输入法(改为com.sohu.inputmethod.sogouoem/.SogouIME)
adb shell settings put secure default_input_method com.sohu.inputmethod.sogouoem/.SogouIME
获取亮度是否为自动获取
adb shell settings get system screen_brightness_mode
获取当前亮度值
adb shell settings get system screen_brightness
更改亮度值(亮度值在0—255之间)
adb shell settings put system screen_brightness 150
获取屏幕休眠时间
adb shell settings get system screen_off_timeout
更改休眠时间,10分钟
adb shell settings put system screen_off_timeout 600000
获取日期时间选项中通过网络获取时间的状态,1为允许、0为不允许
adb shell settings get global auto_time
更改日期时间选项中通过网络获取时间的状态(其他的获取、修改wifi状态(wifi_on)、飞行模式(airlpane_mode_on)等,)
adb shell settings put global auto_time 0
禁用自动旋转
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
通过adb shell 查看加速度计开启情况
//0:不支持旋转 1:支持旋转
adb shell settings get system accelerometer_rotation
通过adb shell 设定加速度计关闭与开启
//0:不支持旋转 1:支持旋转
adb shell settings put system accelerometer_rotation 0
通过adb shell 查看指定的屏幕旋转方向
//0:0度 1:90度 2:180度 3:270度
adb shell settings get system user_rotation
通过adb shell 更改指定的屏幕旋转方向
//0:0度 1:90度 2:180度 3:270度
adb shell settings put system user_rotation 0
本文摘抄于:
1、adb 查看系统设置参数[直通车]
2. RK3288 android7.1.2 开机固定横屏或者竖屏+Sensor自动旋转分析(可以通过adb shell 设定屏幕旋转方向)