[摘抄]adb shell调试系统命令

获取系统默认输入法

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 设定屏幕旋转方向)

  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值