【ADB系列】开发者选项开关

背景

在很多定制Android系统中,由于移除了系统设置APP,导致调试设备时很多实用的调试开关无法通过GUI开启,但实际功能还是存在的,此时可以尝试通过adb命令开启。

常用功能开关

开发者选项开关状态保存在settings的global表中,具体如下:

1. 开发者选项

bash 复制代码
adb shell settings put global development_settings_enabled 1

2. USB 调试

bash 复制代码
adb shell settings put global adb_enabled 1

3. 模拟位置

bash 复制代码
adb shell settings put secure mock_location 1

5. 不要保持活动

bash 复制代码
adb shell settings put global always_finish_activities 1

6. 显示触摸

bash 复制代码
adb shell settings put system show_touches 1

7. 显示指针位置

bash 复制代码
adb shell settings put system pointer_location 1

8. 让后台进程运行

bash 复制代码
adb shell settings put global background_process_limit 10

9. 关闭或开启 GPU 渲染

bash 复制代码
adb shell settings put global debug_gpu_overdraw 1  开启
adb shell settings put global debug_gpu_overdraw 0  关闭

10. 运行时权限

bash 复制代码
adb shell settings put global runtime_permission 1  开启
adb shell settings put global runtime_permission 0  关闭

11. 允许 OEM 解锁

bash 复制代码
adb shell settings put global oem_unlock_allowed 1
相关推荐
李子红了时9 小时前
阿狸舞台APP(安卓端手机EncFS解密+压缩包解压+视频播放)
android·音视频
事圆则缓9 小时前
Android 使用 Jenkins 实现 CI/CD,并用 SonarQube 建立质量门禁
android·ci/cd·jenkins
其实防守也摸鱼10 小时前
DeepSeek Harness 开源贡献手记:从 Issue 到 Merge 的完整旅程
android·数据库·学习·ai·oracle·自动化
恋猫de小郭10 小时前
Android CLI 支持 AI Agent 通过 Device Streaming 调试云真机
android·前端·flutter
素师良码1 天前
第5篇:显示驱动必备调试工具浅析
android
维克兜率天1 天前
【维克】配对交易的季节性:哪些品种适合长拿?
android·开发语言·笔记·python·算法·kotlin·量化
墨天梦1 天前
B06_XML控件布局与ViewBinding
android·kotlin
晚风叙码1 天前
MySQL 表的操作:从建表到删表,一篇讲清楚
android·mysql·oracle
事圆则缓1 天前
Android 性能优化常见工具与使用场景:从症状到证据的排查指南
android·性能优化
avi91111 天前
Unity 非后台,非自动构建,但统计报表 BuildReport ,构建自动化系统C#
android·webserver·ios打包·admin·c#后台·unity打包系统·unity自动构建