[Galaxy A3, A5, A7, A8, A9 Android Development] Twiq:
WHAT IS THIS?

It is just a simple mod to turn off the TouchKey Light permanently without the need to install boot time scripts or 3rd party apps. If you're not familiar with the name, maybe SoftKey Button Light or the Recents/Menu and Back button key lights will give you the idea. This will not disable or break the button functions itself, just the lights.

now before i get post replies saying "but on {insert rom name} by {insert developer name} you could turn ON/OFF this feature from {insert menu name}".. i'm going to make it clear :

This mod is intended to be used on A500 variants with Custom ROM and

NOT

Stock Based ROMS, at the time of writing, most (if not all) custom roms/kernel for A5 can't turn this off permanently

This mod is intended only for people who want the touchkey lights to be OFF all the time/permanently

TECHNICAL NOTES

I'm almost embarrassed releasing this and calling this a mod, but then again there must be some other people that surely want this feature but have no clue how to turn this off. so here it goes :silly:

The library modded is /system/lib/hw/lights.msm8916.so *duh*

patched offset is at BD8 or 3032 and it's a 1 byte patch which effectively forcing the lib to push value 0 to /sys/class/sec/../../devices/virtual/sec/sec_touchkey/brightness everytime it is triggered to turn on the lights.

list of events/triggers affected by this mod

rt5033-charger-online

msm-usb-online

mmc0 (mount/dismount i think)

mmc1 (mount/dismount i think)

rt5033-fuelgauge-online

ps-online

wireless-online

usb-online

ac-online

battery-charging-or-full

battery-charging

battery-full

battery-charging-blink-full-solid

making a boot time script to write 0 to brightness won't make permanent change because there are low level events that triggers the lib to push value 1.

making a service to always set the value to 0 isn't an elegant solution also because it will hog up your memory.

revoking permissions (if you can) to brightness will likely derp the logger and may cause wakelocks.

PREREQUISITES

1. As mentioned earlier, you must have a custom rom installed.

2. Custom recovery to flash this zip. (using flashfire, flashify and similar tools have not been tested, you could try and report)

3. Downloaded modded lib zip file and saved to your device

INSTALLATION / REVERTING

Golden rule : make backups before doing these steps, or just backup this file : /system/lib/hw/lights.msm8916.so

i have tested these zips on my device several of times without issue

Method 1 :

1. Boot into recovery

2. Flash zip (A500x_TouchkeyLibPatcher-Twiq.zip)

3. Enjoy :highfive:

Method 2 : no longer used

1. Extract lights.msm8916.so from the zip file and put it in your device's storage

2. Using filemanager with elevated permissions (Root Explorer, Mixplorer etc) copy the file into /system/lib/hw/

3. If you could set Owner/Group then set it to ROOT then set the permission to 644 or -rw-r-r-

4. reboot and enjoy :highfive:

if my provided libs are not working out for you please attach your original lib here so i can take a look at it.

UPDATES / CHANGELOGS

01/02/2017

added support for A700FD variant

note: don't worry about the zip's filename, it should work fine with A7 too..

it's perfectly safe, library with unknown checksums will not be patched or replaced

15/08/2016

I have removed the old flashable zip and replaced it with a better and safer one as it checks for MD5 checksums, library with unknown checksums will not be patched or replaced.

With some shell script magic, now you only need 1 flashable zip to conveniently toggle On/Off the lights.

Flash OFF, Flash ON :highfive:

11/08/2016

initial release

seperate flashable zips for known A5 library