当前位置:   article > 正文

【Android】 adb shell 下 setting 指令_adb shell settings put system screen_off_timeout 2

adb shell settings put system screen_off_timeout 2147483647
  1. adb shell settings list system
  2. adb shell settings list global
  3. adb shell settings list secure

分别查看  系统 全局 安全 可以使用adb shell 设置的属性(可以使用setting设置的属性)

对应属性的存储的手机位置:

/data/system/users/0/下的对应xml文件:

ettings_global.xml,settings_secure.xml和settings_system.xml

获取自动锁屏时间是

  1. adb shell settings list system | grep timeout
  2. screen_off_timeout=300000

Android系统的锁屏时间存放在Setting数据库中,字段为Settings.System.SCREEN_OFF_TIMEOUT

设置为永不锁屏(2147483647也就是-1)

  1. adb shell settings put system screen_off_timeout 2147483647
  2. healer@healer:/ $ adb shell settings list system | grep timeout
  3. screen_off_timeout=2147483647

全屏沉浸模式(包括状态栏和虚拟按键):

adb shell settings put global policy_control immersive.full=*

沉浸状态栏:

adb shell settings put global policy_control immersive.status=*

沉浸虚拟按键(隐藏后底部上划可以呼出):

adb shell settings put global policy_control immersive.navigation=*

恢复正常模式(如果隐藏了状态栏或者虚拟按键但是又不想用了):

adb shell settings put global policy_control null

 

具体可以设置的成员 定义在

frameworks\base\core\java\android\provider\Settings.java 中,如
     

  1. public static final String LOW_BATTERY_SOUND_TIMEOUT = "low_battery_sound_timeout";
  2. public static final String WIFI_BOUNCE_DELAY_OVERRIDE_MS = "wifi_bounce_delay_override_ms";
  3. public static final String POLICY_CONTROL = "policy_control";
  4. public static final String EMULATE_DISPLAY_CUTOUT = "emulate_display_cutout";
  5. ............
  6. ............

一部分的 默认值来源于:frameworks/base/packages/SettingsProvider/res/values/defaults.xml

查询Settings中各个属性所对应的值(Android APIs):http://developer.android.com/reference/android/provider/Settings.System.html

具体adb shell settings 的功能实现分析:
https://www.jianshu.com/p/409bd28ce8b4

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/花生_TL007/article/detail/323537
推荐阅读
相关标签
  

闽ICP备14008679号