Shell command to DISable nav bar + status bar in Android 7.1.1

3,456 views
Skip to first unread message

Phobe Laxu

unread,
Jun 3, 2018, 10:28:47 AM6/3/18
to Tasker
I googled around but could not find anything relevant. I found the command "wm overscan 0,-160,0,-150" but it doesn't actually disable the UI elements, it just overscans the image (obvi...). This means the status bar is still draggable into visible view etc.

in Android 4 the command is:      service call activity 42 s16 com.android.systemui
in Android 5 it's         pm disable com.android.systemui


I tried both in 7.1.1 and they did not work. service call activity 42 s16 com.android.systemui does disable the status and nav bars, but it also disables the touch functionality :(

Does anyone know the correct command for Nougat?

Phobe Laxu

unread,
Jun 3, 2018, 10:36:01 AM6/3/18
to Tasker
I found this at https://developer.android.com/training/system-ui/navigation but how am I suppoed to type it in "run shell format"?

View decorView = getWindow().getDecorView();
// Hide both the navigation bar and the status bar.
// SYSTEM_UI_FLAG_FULLSCREEN is only available on Android 4.1 and higher, but as
// a general rule, you should design your app to hide the status bar whenever you
// hide the navigation bar.
int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
              | View.SYSTEM_UI_FLAG_FULLSCREEN;
decorView.setSystemUiVisibility(uiOptions);

Phobe Laxu

unread,
Jun 3, 2018, 11:29:31 AM6/3/18
to Tasker
Currently trying out this

https://forum.xda-developers.com/nexus-6p/general/guide-hide-navigation-bar-status-bar-app-t3509747:
· Hide Status Bar only type:
adb shell settings put global policy_control immersive.status=*

· Hide Navigation Bar only type:
adb shell settings put global policy_control immersive.navigation=*

· Hide Both Bars type:
adb shell settings put global policy_control immersive.full=*

· Back to normal/default state:
adb shell settings put global policy_control null*

João Dias

unread,
Jun 4, 2018, 5:56:14 AM6/4/18
to tas...@googlegroups.com
You don't need a shell command. You can use AutoTools Immersive Mode options to do this easily :)

--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tasker+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/d/optout.

João Dias

unread,
Jun 4, 2018, 5:56:47 AM6/4/18
to tas...@googlegroups.com
Or you can use the Tasker beta with its new Custom Settings action.

Phobe Laxu

unread,
Jun 5, 2018, 9:24:07 AM6/5/18
to Tasker
wow thanks.

I can confirm however that "
settings put global policy_control immersive.full=*


works

João Dias

unread,
Jun 5, 2018, 10:14:18 AM6/5/18
to tas...@googlegroups.com
Great :)

But it did work with the Custom Setting action?

Phobe Laxu

unread,
Jun 5, 2018, 3:00:52 PM6/5/18
to Tasker
I don't want to break what works so there's no need for me to try the beta yet

João Dias

unread,
Jun 6, 2018, 8:41:04 AM6/6/18
to tas...@googlegroups.com
Ok, great :) Maybe I'll add a specific action for it too.

--

David Palmer

unread,
Dec 6, 2019, 7:25:25 PM12/6/19
to Tasker
Thanks for your info.  

I tried sending a command to one app (for example,adb shell settings put global policy_control immersive.status=com.google.android.youtube) and it worked.Then I sent it to netflix. Youtube went back with an status bar.

If I want to make this command effective to only a few apps, what should I add? 

在 2018年6月3日星期日 UTC+8下午11:29:31,Phobe Laxu写道:

technological akshually void spaghetti seeds

unread,
Dec 7, 2019, 8:30:19 AM12/7/19
to Tasker
i'm sorry, i don't know. but you can add the immersive mode to everything, since you can still drag the nav bar and status bar into view (well, that's what happened on my second tablet anyway, the first one completely hid the bars)
Reply all
Reply to author
Forward
0 new messages