【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
相关推荐
2501_915918411 小时前
掌握 iOS 26 App 运行状况,多工具协作下的监控策略
android·ios·小程序·https·uni-app·iphone·webview
2501_915909064 小时前
iOS 混淆实战,多工具组合完成 IPA 混淆与加固(源码 + 成品 + 运维一体化方案)
android·运维·ios·小程序·uni-app·iphone·webview
*才华有限公司*5 小时前
安卓前后端连接教程
android
氦客6 小时前
Android Compose中的附带效应
android·compose·effect·jetpack·composable·附带效应·side effect
雨白6 小时前
Kotlin 协程的灵魂:结构化并发详解
android·kotlin
我命由我123456 小时前
Android 开发问题:getLeft、getRight、getTop、getBottom 方法返回的值都为 0
android·java·java-ee·android studio·android jetpack·android-studio·android runtime
Modu_MrLiu6 小时前
Android实战进阶 - 用户闲置超时自动退出登录功能详解
android·超时保护·实战进阶·长时间未操作超时保护·闲置超时
Jeled7 小时前
Android 网络层最佳实践:Retrofit + OkHttp 封装与实战
android·okhttp·kotlin·android studio·retrofit
信田君95277 小时前
瑞莎星瑞(Radxa Orion O6) 基于 Android OS 使用 NPU的图片模糊查找APP 开发
android·人工智能·深度学习·神经网络