adb启用沉浸模式

To only hide the status bar:

只隐藏状态栏

1
adb shell settings put global policy_control immersive.status=*

To only hide the navigation bar:

只隐藏导航栏

1
adb shell settings put global policy_control immersive.navigation=*

To hide both status and nav bar:

隐藏状态栏和导航栏

1
adb shell settings put global policy_control immersive.full=*

Return things to normal:

显示状态栏和导航栏

1
adb shell settings put global policy_control null*