[ADB][GUIDE]Swap back/contextual menu keys for gesture nav bar

_mysiak_

Senior Member
Apr 1, 2009
2,317
1,325
183
For those wanting to have the back button on the right side (where it naturally belongs :)), it's simple with ADB:

Like stock spacing:
Code:
adb shell settings put secure sysui_nav_bar "space[0.25WC],contextual;home;back,space[0.25WC]"
or
adb shell settings put secure sysui_nav_bar 'space[0.25WC],contextual;home;back,space[0.25WC]'
More comfy:
Code:
adb shell settings put secure sysui_nav_bar "space,contextual;home;back,space"
or
adb shell settings put secure sysui_nav_bar 'space,contextual;home;back,space'
To return back to stock:
Code:
adb shell settings delete secure sysui_nav_bar
 
Last edited:

bruceas

Member
Oct 9, 2007
39
11
28
If i try this command
adb shell settings put secure sysui_nav_bar "space,contextual;home;back,space"
this is the output. How i can solve it?

/system/bin/sh: home: not found
/system/bin/sh: back,space: not found

P.S. Now it works. The solution is to use this command:
adb shell settings put secure sysui_nav_bar 'space,contextual;home;back,space'

" to '

Thanks.
 
Last edited:
  • Like
Reactions: _mysiak_

_mysiak_

Senior Member
Apr 1, 2009
2,317
1,325
183
If i try this command
adb shell settings put secure sysui_nav_bar "space,contextual;home;back,space"
this is the output. How i can solve it?

/system/bin/sh: home: not found
/system/bin/sh: back,space: not found

P.S. Now it works. The solution is to use this command:
adb shell settings put secure sysui_nav_bar 'space,contextual;home;back,space'

" to '

Thanks.
Thanks for the update, it seems to be related to the Windows regional settings on a PC (?). On my personal PC it works with double quotes ", on my work PC with single '. I've update the instructions.

Edit: if you split command into two, it works with double quotes as well
1. adb shell
2. settings put secure sysui_nav_bar "space[0.25WC],contextual;home;back,space[0.25WC]"
 
Last edited:
  • Like
Reactions: JCRpure and bruceas

arjo656

Member
Apr 8, 2007
40
5
28
For those wanting to have the back button on the right side (where it naturally belongs :)), it's simple with ADB:

Like stock spacing:
Code:
adb shell settings put secure sysui_nav_bar "space[0.25WC],contextual;home;back,space[0.25WC]"
or
adb shell settings put secure sysui_nav_bar 'space[0.25WC],contextual;home;back,space[0.25WC]'
More comfy:
Code:
adb shell settings put secure sysui_nav_bar "space,contextual;home;back,space"
or
adb shell settings put secure sysui_nav_bar 'space,contextual;home;back,space'
To return back to stock:
Code:
adb shell settings delete secure sysui_nav_bar
hello, sorry for this "stupid question" but, how to use ADB? where can i find it to enter those commands?
i've installed the usb driver, unlocked oem, and activated usb debug on the phone. but i don't know what to do after...
 

arjo656

Member
Apr 8, 2007
40
5
28
Either put adb.exe to Windows PATH, or you must change directory before running adb (for example "cd c:/platform-tools").
ok thanks, now it works with the .exe in win path, i've got the pop-up asking to allow usb debug, but when i enter any command , i've got this

/system/bin/sh: home: not found
/system/bin/sh: back,space: not found

i've tried the 4 differents lines normal and confy
 

_mysiak_

Senior Member
Apr 1, 2009
2,317
1,325
183
ok thanks, now it works with the .exe in win path, i've got the pop-up asking to allow usb debug, but when i enter any command , i've got this

/system/bin/sh: home: not found
/system/bin/sh: back,space: not found

i've tried the 4 differents lines normal and confy
You have probably some unusual language/regional settings on your PC. Try it this way:
Code:
1. adb shell
2. settings put secure sysui_nav_bar "space,contextual;home;back,space"
..
3. exit
 
  • Like
Reactions: arjo656

arjo656

Member
Apr 8, 2007
40
5
28
just by curiosity, is it possible to move the task killer/cleaner button from the left to the right when i open the recent app list?
to avoid having to scroll left through the whole list, and have direct access to clean
 

antoine62

Senior Member
Jan 27, 2019
182
49
38
just by curiosity, is it possible to move the task killer/cleaner button from the left to the right when i open the recent app list?
to avoid having to scroll left through the whole list, and have direct access to clean
Dont kill app, they will use more power when relaunching them, they use almost no power when in background.
 

_mysiak_

Senior Member
Apr 1, 2009
2,317
1,325
183
just by curiosity, is it possible to move the task killer/cleaner button from the left to the right when i open the recent app list?
to avoid having to scroll left through the whole list, and have direct access to clean
No idea, I wasn't even aware of this button. As antoine62 said, it's totally useless. If you need to kill an app, just swipe it away from recent menu (or click on details and "force stop" if the app works with background service).
 

arjo656

Member
Apr 8, 2007
40
5
28
Sorry, my translation may not have been clear, in french we have the "effacer tout" (clear all) button on the left of the recently used apps, i took a screenshot.
And as a right hand writer, i find it useless to swipe all the list to the left before accessing this button, i would like to put it directly on the right of the list so when i swipe up from the bottom, i Can clear the list immediatly.
 

_mysiak_

Senior Member
Apr 1, 2009
2,317
1,325
183
Sorry, my translation may not have been clear, in french we have the "effacer tout" (clear all) button on the left of the recently used apps, i took a screenshot.
And as a right hand writer, i find it useless to swipe all the list to the left before accessing this button, i would like to put it directly on the right of the list so when i swipe up from the bottom, i Can clear the list immediatly.
That button should not be really used at all, it just kills all cached apps. Stock Android is pretty good at memory management. There is really no point in force killing all the apps manually.
 
  • Like
Reactions: arjo656

arjo656

Member
Apr 8, 2007
40
5
28
You have probably some unusual language/regional settings on your PC. Try it this way:
Code:
1. adb shell
2. settings put secure sysui_nav_bar "space,contextual;home;back,space"
..
3. exit
hello mysiak, i updated to android 10 yesterday against my will (see other post), i tried to do the same procedure, but it doesn't work anymore, any idea?
i did
./adb shell
settings put secure sysui_nav_bar "space,contextual;home;back,space"
exit
 
Last edited:

_mysiak_

Senior Member
Apr 1, 2009
2,317
1,325
183
hello mysiak, i updated to android 10 yesterday against my will (see other post), i tried to do the same procedure, but it doesn't work anymore, any idea?
i did
./adb shell
settings put secure sysui_nav_bar "space,contextual;home;back,space"
exit
I don't have Android 10 yet and it seems that Google killed this feature (why oh why). I found this app which might help, give it a try and let us know. https://play.google.com/store/apps/details?id=nu.nav.bar
 

lowmanager

New member
May 9, 2020
1
0
0
Hi,
Today i updated my phone to android 10 and I have same problem as arjo656. I tried app that you posted here, but now I have app's buttons and aslo original android's buttons. It looks weird. Didn't you find any way how to change it by adb again?
 

Phil_gloves

Senior Member
May 16, 2016
85
13
8
Matera/Torino
Hi, I followed this guide https://forum.xda-developers.com/mi-a3/how-to/button-nav-hack-t3997527 to get back the three buttons (as in the previous versions of Android), and wanted to combine the two "hacks" to get back the 3 nav bar buttons but with the back button on the right, and the contextual on the left, but when I use your command via adb, the contextual button disappears, even tho in the command it's still there, I attach two pics to understand better :)
 

Attachments

_mysiak_

Senior Member
Apr 1, 2009
2,317
1,325
183
Hi,
Today i updated my phone to android 10 and I have same problem as arjo656. I tried app that you posted here, but now I have app's buttons and aslo original android's buttons. It looks weird. Didn't you find any way how to change it by adb again?
Nope, Google removed the interface for navbar customization in Android 10. I just keep stock 2 buttons navbar and use "Edge gestures" app for one hand operation (it's even on sale right now, grab it while you can:)).

Hi, I followed this guide https://forum.xda-developers.com/mi-a3/how-to/button-nav-hack-t3997527 to get back the three buttons (as in the previous versions of Android), and wanted to combine the two "hacks" to get back the 3 nav bar buttons but with the back button on the right, and the contextual on the left, but when I use your command via adb, the contextual button disappears, even tho in the command it's still there, I attach two pics to understand better :)
For 3 buttons navbar replace "contextual" with "recent". For example:
Code:
adb shell settings put secure sysui_nav_bar "space,recent;home;back,space"
Edit: if you want to keep "contextual" button as well, this might work (can't test it as I'm on Android 10 already):
Code:
adb shell settings put secure sysui_nav_bar "contextual;space,recent;home;back,space"
 
Last edited:
  • Like
Reactions: Phil_gloves