最近在测试app,发现在进行图像分析的时候,顶部导航会影响截图的分析数据,于是想如何隐藏并且是在相应的app中。
1、首先手机先root,获取到root权限。
2、打开adb,输入指令:
adb shell settings put global policy_control name=app
- name和app, 分别代表–功能栏和app名称
name的功能
immersive.full 同时隐藏
immersive.status 隐藏状态栏
immersive.navigation 隐藏导航栏
app的含义
apps 所有应用
*所有界面
packagename 指定应用
-packagename 排除指定应用
示例
全局隐藏底部navigation导航栏adb shell settings put global policy_control immersive.navigation=*
全局隐藏虚拟键:
adb shell settings put global policy_control immersive.navigation=*
隐藏状态栏和虚拟键:
adb shell settings put global policy_control immersive.full=*
隐藏虚拟键,但是不在桌面页、设置页、相机隐藏:
adb shell settings put global policy_control immersive.navigation=apps,-com.google.android.apps.nexuslauncher,-com.android.settings,-android,-com.google.android.GoogleCamera
- 恢复系统默认: adb shell settings put global policy_control null