adb hide status bar function

Recently, I was testing the app and found that during image analysis, the top navigation will affect the analysis data of the screenshot, so I want to hide it and it is in the corresponding app.

1. First of all, the mobile phone is rooted first, and the root authority is obtained.
2. Open adb and enter the command:
adb shell settings put global policy_control name=app

  • name and app, representing – function bar and app name respectively

function of name

immersive.full also hides
immersive.status hides the status bar
immersive.navigation hides the navigation bar

The meaning of app

apps all applications
*all interfaces
packagename specified application
-packagename exclude specified application

Example
Globally hide the bottom navigation bar

adb shell settings put global policy_control immersive.navigation=*

Globally hide virtual keys:

adb shell settings put global policy_control immersive.navigation=*

Hide status bar and virtual keys:

adb shell settings put global policy_control immersive.full=*

Hide virtual keys, but not on desktop, settings, or camera:

adb shell settings put global policy_control immersive.navigation=apps,-com.google.android.apps.nexuslauncher,-com.android.settings,-android,-com.google.android.GoogleCamera

  • Restore system default: adb shell settings put global policy_control null

Guess you like

Origin blog.csdn.net/qq_34004131/article/details/127214016