zoukankan      html  css  js  c++  java
  • adb查看和修改settings值

    初始化命令

    对应USB连接的安卓设备

    # 用help查看版本,位置和参数
    >adb --help
    Android Debug Bridge version 1.0.41
    Version 30.0.4-6686687
    Installed as C:UsersusernameAppDataLocalAndroidSdkplatform-toolsadb.exe
    ...
    
    # 查看设备列表
    >adb devices -l
    * daemon not running; starting now at tcp:5037
    * daemon started successfully
    List of devices attached
    HMKNW17705014880       device product:PRA-AL00 model:PRA_AL00 device:HWPRA-H transport_id:1
    
    # 进入设备shell, 如果有多个设备,需要使用 -s 参数
    >adb -s HMKNW17705014880 shell
    HWPRA-H:/ $
    

    Settings相关操作

    安卓的settings共有三个表:

    global:所有的偏好设置对系统的所有用户公开,第三方APP只能读,无写权限;
    system:包含各种各样的用户偏好系统设置;
    secure:安全性的用户偏好系统设置,第三方APP只能读,无写权限

    # 列出指定配置表中的所有条目
    HWPRA-H:/ $ settings list global
    
    # 取出指定配置表中指定条目的值
    HWPRA-H:/ $ settings get global add_users_when_locked
    0
    
    # 设置(不存在就添加)条目的值
    HWPRA-H:/ $ settings put global sms_outgoing_check_max_count 5
    
  • 相关阅读:
    搞懂树状数组
    C#接口(Interface)
    C#接口(Interface)
    C#运算符的重载
    C#和C++的区别(一)
    hdu1874 畅通工程续
    hdu1874 畅通工程续
    C#多态性
    C#多态性
    C#继承
  • 原文地址:https://www.cnblogs.com/milton/p/13540491.html
Copyright © 2011-2022 走看看