【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
相关推荐
JMchen1231 小时前
现代Android图像处理管道:从CameraX到OpenGL的60fps实时滤镜架构
android·图像处理·架构·kotlin·android studio·opengl·camerax
快点好好学习吧2 小时前
phpize 依赖 php-config 获取 PHP 信息的庖丁解牛
android·开发语言·php
是誰萆微了承諾2 小时前
php 对接deepseek
android·开发语言·php
Dxy12393102163 小时前
MySQL如何加唯一索引
android·数据库·mysql
冠希陈、5 小时前
PHP 判断是否是移动端,更新鸿蒙系统
android·开发语言·php
晚霞的不甘7 小时前
Flutter for OpenHarmony从零到一:构建《冰火人》双人合作闯关游戏
android·flutter·游戏·前端框架·全文检索·交互
2601_949833397 小时前
flutter_for_openharmony口腔护理app实战+饮食记录实现
android·javascript·flutter
独自破碎E7 小时前
【滑动窗口+字符计数数组】LCR_014_字符串的排列
android·java·开发语言
stevenzqzq8 小时前
compose 中 align和Arrangement的区别
android·compose
VincentWei958 小时前
Compose:MutableState 和 mutableStateOf
android