Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,782,422 Members 43,412 Now Online
XDA Developers Android and Mobile Development Forum

[HOWTO] Enable software navigation buttons / disable hardware buttons

Tip us?
 
futurejohn
Old
#1  
Member - OP
Thanks Meter 17
Posts: 34
Join Date: Aug 2010
Default [HOWTO] Enable software navigation buttons / disable hardware buttons

One of the annoying things about the S4 is the lack of software navigation buttons. I was used to using them on my Nexus 4 so I really missed having them on my S4.

First of all, root is required to edit these files.

Basically, all you have to do is add 'qemu.hw.mainkeys=0' to the build.prop in /system and reboot to enable the software buttons. If you're happy with that you can stop there, but you can also disable the hardware buttons if you want.

Go to /system/usr/keylayout and open 'Generic.kl' in a text editor and find the lines that say 'key 139 MENU WAKE_DROPPED', 'key 158 BACK WAKE_DROPPED', and 'key 172 HOME' and place a # at the start of each line. Take care here because if you add a # to the wrong line, you won't have a way to wake the phone. Reboot and those hardware buttons will be disabled.

I've tested it with various apps and the phone resizes them appropriately. Software menu buttons appear where appropriate and video players cause the buttons to fade away. The only odd thing I've found is that the app drawer is shifted to a 4x4 layout instead of the regular 5x4. Also, home and back do not vibrate properly and I'm not sure which lines to edit to fix that.
The Following 11 Users Say Thank You to futurejohn For This Useful Post: [ Click to Expand ]
 
x111
Old
(Last edited by x111; 16th August 2013 at 02:29 AM.)
#2  
x111's Avatar
Senior Member
Thanks Meter 40
Posts: 291
Join Date: Jul 2009
Quote:
Originally Posted by futurejohn View Post
One of the annoying things about the S4 is the lack of software navigation buttons. I was used to using them on my Nexus 4 so I really missed having them on my S4.

First of all, root is required to edit these files.

Basically, all you have to do is add 'qemu.hw.mainkeys=0' to the build.prop in /system and reboot to enable the software buttons. If you're happy with that you can stop there, but you can also disable the hardware buttons if you want.

Go to /system/usr/keylayout and open 'Generic.kl' in a text editor and find the lines that say 'key 139 MENU WAKE_DROPPED', 'key 158 BACK WAKE_DROPPED', and 'key 172 HOME' and place a # at the start of each line. Take care here because if you add a # to the wrong line, you won't have a way to wake the phone. Reboot and those hardware buttons will be disabled.

I've tested it with various apps and the phone resizes them appropriately. Software menu buttons appear where appropriate and video players cause the buttons to fade away. The only odd thing I've found is that the app drawer is shifted to a 4x4 layout instead of the regular 5x4. Also, home and back do not vibrate properly and I'm not sure which lines to edit to fix that.

Do you know how to re-size screen buttons ?

p.s. everything works fine, but it to big ((
 
futurejohn
Old
#3  
Member - OP
Thanks Meter 17
Posts: 34
Join Date: Aug 2010
Quote:
Originally Posted by x111 View Post
Do you know how to re-size screen buttons ?

p.s. everything works fine, but it to big ((
The easiest way to do that is to change the lcd density. The default is 480 which makes everything MASSIVE. I find about 440 to be about perfect, but you can tweak it to find whatever is most comfortable for your eyes.

To change the lcd density, the simplest way is to go to build.prop and find the line that says 'ro.sf.lcd_density=480'. Change the 480 to whatever you want. Smaller numbers mean that things will be smaller and more spaced out and larger numbers will cause things to be larger and closer together. Reboot after you change the number and save the file for it to take affect.

You can also use tools like ROM Toolbox to make the edits if you find using an app easier to use than a text editor.

I recommend keeping a backup of your original build.prop for easy restoration.
The Following User Says Thank You to futurejohn For This Useful Post: [ Click to Expand ]
 
x111
Old
(Last edited by x111; 16th August 2013 at 04:37 AM.)
#4  
x111's Avatar
Senior Member
Thanks Meter 40
Posts: 291
Join Date: Jul 2009
Quote:
Originally Posted by futurejohn View Post
The easiest way to do that is to change the lcd density. The default is 480 which makes everything MASSIVE. I find about 440 to be about perfect, but you can tweak it to find whatever is most comfortable for your eyes.

To change the lcd density, the simplest way is to go to build.prop and find the line that says 'ro.sf.lcd_density=480'. Change the 480 to whatever you want. Smaller numbers mean that things will be smaller and more spaced out and larger numbers will cause things to be larger and closer together. Reboot after you change the number and save the file for it to take affect.

You can also use tools like ROM Toolbox to make the edits if you find using an app easier to use than a text editor.

I recommend keeping a backup of your original build.prop for easy restoration.

It works, but again buttons is too big and change ro.sf.lcd_density low than 440 will be too small, and also I need change just screen buttons, other staff looks nice for me with ro.sf.lcd_density 480.

Please, tell step by step how to change it.

Also, do you know how to disable light of sensor buttons? (very annoying)
 
futurejohn
Old
#5  
Member - OP
Thanks Meter 17
Posts: 34
Join Date: Aug 2010
Quote:
Originally Posted by x111 View Post
It works, but again buttons is too big and change ro.sf.lcd_density low than 440 will be too small, and also I need change just screen buttons, other staff looks nice for me with ro.sf.lcd_density 480.

Please, tell step by step how to change it.

Also, do you know how to disable light of sensor buttons? (very annoying)
The only way I can tell to just shrink the navigation bar is to edit the framework-res.apk. From my research, you have to decompile the apk, edit the navigation bar field in dimens.xml, and recompile the apk. I tried that but ended up having to restore my phone after I got a bunch of force closes.

It's obviously a bit more complex than what I just mentioned so I'll just have to mess around with it more before I know how to do it.

If anyone else has experience editing framework-res any help you could offer would be awesome.
The Following User Says Thank You to futurejohn For This Useful Post: [ Click to Expand ]
 
jedinegotiator
Old
#6  
jedinegotiator's Avatar
Senior Member
Thanks Meter 10
Posts: 253
Join Date: May 2011
Location: Roanoke
Quote:
Originally Posted by futurejohn View Post
One of the annoying things about the S4 is the lack of software navigation buttons. I was used to using them on my Nexus 4 so I really missed having them on my S4.

First of all, root is required to edit these files.

Basically, all you have to do is add 'qemu.hw.mainkeys=0' to the build.prop in /system and reboot to enable the software buttons. If you're happy with that you can stop there, but you can also disable the hardware buttons if you want.

Go to /system/usr/keylayout and open 'Generic.kl' in a text editor and find the lines that say 'key 139 MENU WAKE_DROPPED', 'key 158 BACK WAKE_DROPPED', and 'key 172 HOME' and place a # at the start of each line. Take care here because if you add a # to the wrong line, you won't have a way to wake the phone. Reboot and those hardware buttons will be disabled.

I've tested it with various apps and the phone resizes them appropriately. Software menu buttons appear where appropriate and video players cause the buttons to fade away. The only odd thing I've found is that the app drawer is shifted to a 4x4 layout instead of the regular 5x4. Also, home and back do not vibrate properly and I'm not sure which lines to edit to fix that.
Thanks!

Is there a way to disable the S4 menu and back buttons from lighting up?
 
Chahk
Old
#7  
Chahk's Avatar
Senior Member
Thanks Meter 162
Posts: 1,254
Join Date: Apr 2009
Location: New York
Quote:
Originally Posted by jedinegotiator View Post
Is there a way to disable the S4 menu and back buttons from lighting up?
CM10.2 has this toggle built-in.
Galaxy S4 GPe (I9505G/jgedlte) - Stock (4.4.4), rooted, Xposed. Recovery: CWM 6.0.4.7.
Moto X GSM (SIM-unlocked) - stock 4.4.3.
Acer A500 tablet - ROM: OmniROM 4.4.2 V12 | Recovery: TWRP-based REV 2.0 beta2
LG G Pad 8.3 GPe (V510) - stock 4.4.4.
Pebble Steel - ROM: stock 2.3.
Amazon Fire TV - stock.
The Following User Says Thank You to Chahk For This Useful Post: [ Click to Expand ]
 
jedinegotiator
Old
#8  
jedinegotiator's Avatar
Senior Member
Thanks Meter 10
Posts: 253
Join Date: May 2011
Location: Roanoke
Quote:
Originally Posted by Chahk View Post
CM10.2 has this toggle built-in.
No way to do it without Cyanogen?
 
Immix
Old
#9  
Immix's Avatar
Senior Member
Thanks Meter 21
Posts: 151
Join Date: Apr 2005
Location: Mumbai, IN
Anyone? Also there is no vibration pressing the back and home keys on the navbar. Reading the SIII and Note forums, I believe this is due to the lack of vibration support in kernel. Can anyone confirm?
 
kamirza
Old
(Last edited by kamirza; 5th October 2013 at 12:20 PM.)
#10  
Senior Member
Thanks Meter 101
Posts: 774
Join Date: Jul 2008
Quote:
Originally Posted by futurejohn View Post
One of the annoying things about the S4 is the lack of software navigation buttons. I was used to using them on my Nexus 4 so I really missed having them on my S4.

First of all, root is required to edit these files.

Basically, all you have to do is add 'qemu.hw.mainkeys=0' to the build.prop in /system and reboot to enable the software buttons. If you're happy with that you can stop there, but you can also disable the hardware buttons if you want.

Go to /system/usr/keylayout and open 'Generic.kl' in a text editor and find the lines that say 'key 139 MENU WAKE_DROPPED', 'key 158 BACK WAKE_DROPPED', and 'key 172 HOME' and place a # at the start of each line. Take care here because if you add a # to the wrong line, you won't have a way to wake the phone. Reboot and those hardware buttons will be disabled.

I've tested it with various apps and the phone resizes them appropriately. Software menu buttons appear where appropriate and video players cause the buttons to fade away. The only odd thing I've found is that the app drawer is shifted to a 4x4 layout instead of the regular 5x4. Also, home and back do not vibrate properly and I'm not sure which lines to edit to fix that.
I have tried adding that qemu.hw.mainkeys=0 on build.prop but the soft keys dont come and on every press the systemUI stopping sign comes. Anything else I can do to avoid this. tried it with apex, nova and next launcher. Using omega ROM 14.1

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes