Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[HOWTO] Enable software navigation buttons / disable hardware buttons

OP futurejohn

15th August 2013, 08:54 PM   |  #1  
OP Member
Thanks Meter: 18
 
34 posts
Join Date:Joined: Aug 2010
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 12 Users Say Thank You to futurejohn For This Useful Post: [ View ]
16th August 2013, 03:27 AM   |  #2  
x111's Avatar
Senior Member
Thanks Meter: 46
 
333 posts
Join Date:Joined: Jul 2009
More
Quote:
Originally Posted by futurejohn

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 ((
Last edited by x111; 16th August 2013 at 03:29 AM.
16th August 2013, 03:55 AM   |  #3  
OP Member
Thanks Meter: 18
 
34 posts
Join Date:Joined: Aug 2010
Quote:
Originally Posted by x111

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: [ View ]
16th August 2013, 04:27 AM   |  #4  
x111's Avatar
Senior Member
Thanks Meter: 46
 
333 posts
Join Date:Joined: Jul 2009
More
Quote:
Originally Posted by futurejohn

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)
Last edited by x111; 16th August 2013 at 05:37 AM.
17th August 2013, 02:14 AM   |  #5  
OP Member
Thanks Meter: 18
 
34 posts
Join Date:Joined: Aug 2010
Quote:
Originally Posted by x111

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: [ View ]
18th August 2013, 04:46 AM   |  #6  
jedinegotiator's Avatar
Senior Member
Flag Fairfax, VA
Thanks Meter: 23
 
262 posts
Join Date:Joined: May 2011
More
Quote:
Originally Posted by futurejohn

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?
18th August 2013, 02:07 PM   |  #7  
Chahk's Avatar
Senior Member
Flag New York
Thanks Meter: 165
 
1,264 posts
Join Date:Joined: Apr 2009
More
Quote:
Originally Posted by jedinegotiator

Is there a way to disable the S4 menu and back buttons from lighting up?

CM10.2 has this toggle built-in.
The Following User Says Thank You to Chahk For This Useful Post: [ View ]
19th August 2013, 01:09 AM   |  #8  
jedinegotiator's Avatar
Senior Member
Flag Fairfax, VA
Thanks Meter: 23
 
262 posts
Join Date:Joined: May 2011
More
Quote:
Originally Posted by Chahk

CM10.2 has this toggle built-in.

No way to do it without Cyanogen?
26th August 2013, 05:30 AM   |  #9  
Immix's Avatar
Senior Member
Flag Mumbai, IN
Thanks Meter: 21
 
154 posts
Join Date:Joined: Apr 2005
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?
5th October 2013, 01:18 PM   |  #10  
Senior Member
Thanks Meter: 101
 
788 posts
Join Date:Joined: Jul 2008
Quote:
Originally Posted by futurejohn

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
Last edited by kamirza; 5th October 2013 at 01:20 PM.

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes