adb命令获取、设置、删除配置项

前言全局说明

settings 是对 Android 里设置进行 增、删、改、查


一、帮助

adb shell settings
Settings provider (settings) commands:
help
Print this help text.
get [--user <USER_ID> | current] NAMESPACE KEY
Retrieve the current value of KEY.
put [--user <USER_ID> | current] NAMESPACE KEY VALUE [TAG] [default]
Change the contents of KEY to VALUE.
TAG to associate with the setting.
{default} to set as the default, case-insensitive only for global/secure namespace
delete [--user <USER_ID> | current] NAMESPACE KEY
Delete the entry for KEY.
reset [--user <USER_ID> | current] NAMESPACE {PACKAGE_NAME | RESET_MODE}
Reset the global/secure table for a package with mode.
RESET_MODE is one of {untrusted_defaults, untrusted_clear, trusted_defaults}, case-insensitive
list [--user <USER_ID> | current] NAMESPACE
Print all defined keys.
NAMESPACE is one of {system, secure, global}, case-insensitive

二、列出 list

adb shell settings list system
adb shell settings list secure
adb shell settings list global

可以用 list 命令,列出配置文件里有哪些配置项。
根据配置项的键 来修改值
如果没有你需要的键,直接写上就可以创建

更多示例:https://www.cnblogs.com/wutou/p/17930583.html


三、获取 get

adb shell settings get system
adb shell settings get secure
adb shell settings get global

四、更新 put

adb shell settings put system
adb shell settings put secure
adb shell settings put global

五、删除

adb shell settings delete system
adb shell settings delete secure
adb shell settings delete global

六、恢复默认 reset

adb shell settings reset system
adb shell settings reset secure
adb shell settings reset global



免责声明:本号所涉及内容仅供安全研究与教学使用,如出现其他风险,后果自负。




参考、来源:



posted @   悟透  阅读(834)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
历史上的今天:
2023-01-04 Linux(centos7)开机命令行字符欢迎界面修改显示IP
点击右上角即可分享
微信分享提示