【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
相关推荐
懒人村杂货铺2 小时前
Android BLE 扫描完整实战
android
TeleostNaCl4 小时前
如何安装 Google 通用的驱动以便使用 ADB 和 Fastboot 调试(Bootloader)设备
android·经验分享·adb·android studio·android-studio·android runtime
fatiaozhang95275 小时前
中国移动浪潮云电脑CD1000-系统全分区备份包-可瑞芯微工具刷机-可救砖
android·网络·电脑·电视盒子·刷机固件·机顶盒刷机
2501_915918416 小时前
iOS 开发全流程实战 基于 uni-app 的 iOS 应用开发、打包、测试与上架流程详解
android·ios·小程序·https·uni-app·iphone·webview
lichong9516 小时前
【混合开发】vue+Android、iPhone、鸿蒙、win、macOS、Linux之dist打包发布在Android工程asserts里
android·vue.js·iphone
Android出海6 小时前
Android 15重磅升级:16KB内存页机制详解与适配指南
android·人工智能·新媒体运营·产品运营·内容运营
一只修仙的猿6 小时前
毕业三年后,我离职了
android·面试
编程乐学6 小时前
安卓非原创--基于Android Studio 实现的新闻App
android·ide·android studio·移动端开发·安卓大作业·新闻app
雅雅姐7 小时前
Android14 init.rc中on boot阶段操作4
android
fatiaozhang95278 小时前
中国移动中兴云电脑W132D-RK3528-2+32G-刷机固件包(非原机制作)
android·xml·电脑·电视盒子·刷机固件·机顶盒刷机