【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
相关推荐
mmsx4 小时前
Android 模块化收口:能力组合框架、手写 LifecycleOwner 与热修复共存
android
恋猫de小郭7 小时前
Flutter 可以更直接地调用原生 API 了,Dart Direct Native Interop
android·前端·flutter
2501_916008897 小时前
iPhone 设备信息查看,用 KeyMob 看型号、序列号、电池健康和 UDID
android·ios·小程序·https·uni-app·iphone·webview
好的佩奇17 小时前
蓝牙之通信架构
android·flutter·蓝牙
FlightYe17 小时前
视界原理之3D视频(四):裸眼、眼镜和头显
android·linux·c++·3d·ffmpeg·音视频
诸神黄昏EX18 小时前
Android fw BatteryService
android
alexhilton19 小时前
提升 Android Compose 页面的流畅度
android·kotlin·android jetpack
撩得Android一次心动20 小时前
Android中Gradle网络下载超时、更改存放位置(解决方案)
android·gradle
HQL_seven21 小时前
【Activity】Android Activity详解
android
AI2中文网21 小时前
安卓 15/16 手机软键盘遮挡输入框、布局顶不上去?已解决:重新编译即可
android·智能手机