[GUIDE][HOW-TO]Disable Hardware Keys Lights and Function

hdorius

Senior Member
Jan 17, 2011
1,163
846
0
This Guide Will Disable Hardware Keys (Home, Menu, Back, Search) Light and make it disabled completely so we can use the on screen button like nexus phone in AOSP based ROM (AOKP/PACMAN/Codefirex)
NOTE: Don't Try This in CM Based Rom because CM don't have any on-screen button mod

For Disable The Hardware Keys Light :
Add The Following code to /system/etc/init.d/90userinit
Code:
echo 0 > /sys/class/leds/button-backlight/max_brightness
chmod 755 > /sys/class/leds/button-backlight/max_brightness
and reboot

For Disable The Hardware Keys Function Completely
Navigate to /system/usr/keylayout/synaptics-rmi-touchscreen.kl (maybe it's touchscreen dependent mine is synaptic,i can't try for other)
For atmel is atmel-touchscreen.kl, for elan is elan-touchscreen.kl
Open it as text editor and delete all content of it and save and reboot

To Restore the Hardware Keys Light and Function
Just Copy and Paste the Backup File to the destination (/system/etc/init.d, /system/usr/keylayout)

NOTE: Don't Forget to Backup The ROM,default 90userinit, default touchscreen layout .kl before trying...
 
Last edited:

Magpie42

Senior Member
Dec 28, 2011
77
33
0
Stuttgart
Hi hdorius,

maybe it's just typos, but, it will not work the way you describe it.

You have to remove ">" from the chmod command line and change 755 to 644.

BTW: for CM based ROMs, there is a tweak, too (using the file "brightness" etc.),
but it's more easy to just use the app "Keyboard Backlight Controller" from the market.

Cheers, Magpie
 

aljazirrr

Senior Member
Sep 26, 2012
393
201
0
Castellon
This Guide Will Disable Hardware Keys (Home, Menu, Back, Search) Light and make it disabled completely so we can use the on screen button like nexus phone in AOSP based ROM (AOKP/PACMAN/Codefirex)
NOTE: Don't Try This in CM Based Rom because CM don't have any on-screen button mod

For Disable The Hardware Keys Light :
Add The Following code to /system/etc/init.d/90userinit
Code:
echo 0 > /sys/class/leds/button-backlight/max_brightness
chmod 755 > /sys/class/leds/button-backlight/max_brightness
and reboot

For Disable The Hardware Keys Function Completely
Navigate to /system/usr/keylayout/synaptics-rmi-touchscreen.kl (maybe it's touchscreen dependent mine is synaptic,i can't try for other)
For atmel is atmel-touchscreen.kl, for elan is elan-touchscreen.kl
Open it as text editor and delete all content of it and save and reboot

To Restore the Hardware Keys Light and Function
Just Copy and Paste the Backup File to the destination (/system/etc/init.d, /system/usr/keylayout)

NOTE: Don't Forget to Backup The ROM,default 90userinit, default touchscreen layout .kl before trying...
In Viper DHD you have this on Viper tweaks cheers:p:p:p

Sent from my HTC Desire HD using xda premium
 

hdorius

Senior Member
Jan 17, 2011
1,163
846
0
Hi hdorius,

maybe it's just typos, but, it will not work the way you describe it.

You have to remove ">" from the chmod command line and change 755 to 644.

BTW: for CM based ROMs, there is a tweak, too (using the file "brightness" etc.),
but it's more easy to just use the app "Keyboard Backlight Controller" from the market.

Cheers, Magpie
I've tested myself and worked before I posted it and yes the cm have that tweaks,but I doesn't work for me when I set,btw thx

Sent from my HTC Desire HD using Tapatalk 2
 

Magpie42

Senior Member
Dec 28, 2011
77
33
0
Stuttgart
I've tested myself and worked before I posted it
So you have no clue at all what theses commands do?!
Sorry, but if you don't know what things do, you should not recommend them.

Your `chmod 755 > /sys/class/leds/button-backlight/max_brightness` will not change the mode of the file as needed,
but overwrite the 0, you previously wrote into "max_brightness", making the first command completely superfluous.
It ends up in a completely empty "max_brightness" file - if we think positive, assuming best case.
In worst case, STDERR has previously been redirected to STDOUT and your command will even result in a "max_brightness" file containing this:
Code:
chmod 755
Usage: chmod [OPTION] <MODE> <FILE>
  -R, --recursive         change files and directories recursively
  --help                  display this help and exit
The effect of this - or empty - content is in fact unpredictable and only depends on the robustness of the routine, which evaluates the content of "max_brightness".
In your case, you may have been on the lucky side, cause the routine in your ROM seems to return a 0 in case of failure,
setting the value for brightness to 0 - so your "testing success" is nothing less than just sheer coincidence.
A less robust implementation may just crash, leaving your phone unbootable, in a boot loop or s/th even worse.

Cheers, Magpie
 

biobio76

Senior Member
Feb 19, 2013
820
565
0
increase the hardware button britness on JB 4.2.1

So you have no clue at all what theses commands do?!
Sorry, but if you don't know what things do, you should not recommend them.

Your `chmod 755 > /sys/class/leds/button-backlight/max_brightness` will not change the mode of the file as needed,
but overwrite the 0, you previously wrote into "max_brightness", making the first command completely superfluous.
It ends up in a completely empty "max_brightness" file - if we think positive, assuming best case.
In worst case, STDERR has previously been redirected to STDOUT and your command will even result in a "max_brightness" file containing this:
Code:
chmod 755
Usage: chmod [OPTION] <MODE> <FILE>
  -R, --recursive         change files and directories recursively
  --help                  display this help and exit
The effect of this - or empty - content is in fact unpredictable and only depends on the robustness of the routine, which evaluates the content of "max_brightness".
In your case, you may have been on the lucky side, cause the routine in your ROM seems to return a 0 in case of failure,
setting the value for brightness to 0 - so your "testing success" is nothing less than just sheer coincidence.
A less robust implementation may just crash, leaving your phone unbootable, in a boot loop or s/th even worse.

Cheers, Magpie

Hi Guys,

can someone please help me and suggest me a way to increase the britness of the hardware button on my ZOPO 980 who is running JB 4.2.1
I have tried to edit the build.prop but did not find any line to modify , and I would guess this is not the right way.

thanks
 

Waheed Hassan

Senior Member
Aug 29, 2013
158
148
0
Sharjah
Viper DHD 3.0.1

in viperdhd this options is available in venom tweaks, version 3.0.1 is the latest and most stable version with complete sense 4.1 UI. I suggest you to try it once. :)
 

ankitrajj

Senior Member
Nov 18, 2014
87
23
0
27
ahmedabad
www.ankitrajj.blogspot.com
total mess . anything related to disabling keylight and disable keys won't work for me . i am having note n7000 . first i enabled navigation bar and tried everything what was mentioned above , even i did tried replacing 755 with 644 and removing > but didnt work anything
 

hdorius

Senior Member
Jan 17, 2011
1,163
846
0
total mess . anything related to disabling keylight and disable keys won't work for me . i am having note n7000 . first i enabled navigation bar and tried everything what was mentioned above , even i did tried replacing 755 with 644 and removing > but didnt work anything
Maybe it don't compatible with samsung phone, i just tested it on my desire hd,sorry..
 

bunnyy

Senior Member
Feb 16, 2018
668
617
93
This Guide Will Disable Hardware Keys (Home, Menu, Back, Search) Light and make it disabled completely so we can use the on screen button like nexus phone in AOSP based ROM (AOKP/PACMAN/Codefirex)
NOTE: Don't Try This in CM Based Rom because CM don't have any on-screen button mod

For Disable The Hardware Keys Light :
Add The Following code to /system/etc/init.d/90userinit
Code:
echo 0 > /sys/class/leds/button-backlight/max_brightness
chmod 755 > /sys/class/leds/button-backlight/max_brightness
and reboot

For Disable The Hardware Keys Function Completely
Navigate to /system/usr/keylayout/synaptics-rmi-touchscreen.kl (maybe it's touchscreen dependent mine is synaptic,i can't try for other)
For atmel is atmel-touchscreen.kl, for elan is elan-touchscreen.kl
Open it as text editor and delete all content of it and save and reboot

To Restore the Hardware Keys Light and Function
Just Copy and Paste the Backup File to the destination (/system/etc/init.d, /system/usr/keylayout)

NOTE: Don't Forget to Backup The ROM,default 90userinit, default touchscreen layout .kl before trying...
Brother can you help me up enabling button light in samsung exynos 7580 as button light feature is disabled in the RR sources.
Please it would be a great help to me struggling from months for the fix .
 
Last edited: