[OOS] Control led colors through shell and strange numbers ?

J0kker

Senior Member
Mar 15, 2012
396
189
73
Hi all,
I'm running xXx custom OOS based rom and i really like it.
But there is a small thing that bothers me, led lights during night (charging and notifications).
So i've done some research with shell commands (through ADB for ease of use) and i endeed up with some promising things.
using the
Code:
adb shell settings get system battery_light_full_color
i can retrieve the number associated to the battery light full color, so i tried every possibilities through the settings directly from the phone (i changed the color, ran the command for each available color) and here are my results:

default= -16711936
Dark blue= -16776961
cyan= -12517377
orange= -49152
green= -12517632
red= -65536
yellow= -256
purple= -65281
pink= -65472
(Yes, there is a minus in front of the numbers)

I've played around with the command
Code:
adb shell settings put system battery_light_full_color number
with different numbers to see if we can get other colors than the one provided directly from oos settings, and it seems like we can.
For example
Code:
adb shell settings put system battery_light_full_color 00
turns the led off (i guess it turns to black ?)
So, i can use this to set my led off during night with tasker through commands like
Code:
adb shell settings put system battery_light_full_color
adb shell settings put system battery_light_low_color
adb shell settings put system battery_light_medium_color
but it's easier to turn this off by
Code:
adb shell settings put system battery_led_charging 0
But what's interesting is that for example the number 2560 turns the led to green but very very dimmed, and i would be happy if i could find the numbers to dimm all other colors so that i could not totally turn the led to black during night.

If you're wondering how i found those commands, i simply ran "adb shell settings list system" and it gave me a complete list, you can do the same with "adb shell settings list global" and "adb shell settings list secure".

So, here's my question, do someone know what these numbers are ?


One more thing, the command to turn off or on the notification light pulse is
Code:
adb shell settings put system notification_light_pulse number
where number is 1 for on and 0 for off.
 
  • Like
Reactions: hipunk and n0j0e
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone