I'm trying to turn in the led on boot for a custom thing.....
Anyways the usual echo wont work, i've tried
echo 255 > /sys/class/leds/red/brightness
echo 1 > /sys/class/leds/red/brightness
and blue and green.
When i try
echo 255 > /sys/class/leds/button-backlight/brightness
the buttons light up fine, but leds won't light up...
I'm guessing i'm doing something wrong here, any help?
+1 Same here.
Aaahh said:
I'm trying to turn in the led on boot for a custom thing.....
Anyways the usual echo wont work, i've tried
echo 255 > /sys/class/leds/red/brightness
echo 1 > /sys/class/leds/red/brightness
and blue and green.
When i try
echo 255 > /sys/class/leds/button-backlight/brightness
the buttons light up fine, but leds won't light up...
I'm guessing i'm doing something wrong here, any help?
Click to expand...
Click to collapse
Are you still having a problem or did you fix it? I might have a couple of ideas
sent from my amazingly awesome OnePlus One with Stereo Mod
Don't forget to hit thanks!
abhi08638 said:
Are you still having a problem or did you fix it? I might have a couple of ideas
sent from my amazingly awesome OnePlus One with Stereo Mod
Don't forget to hit thanks!
Click to expand...
Click to collapse
I would be pleased to be enlightened!
Aaahh said:
I would be pleased to be enlightened!
Click to expand...
Click to collapse
Well under /sys/class/leds/led:flash_0, there is a trigger file so that might be causing the blue green and red brightness to be overwritten or not allowed to activate. Try changing the brightness in this directory, I think limit is 1000
sent from my amazingly awesome OnePlus One with Stereo Mod
Don't forget to hit thanks!
That is the flash led, I think the thread is about turning on the notification led from shell. I having the same issue (not able to turn on the notif. led with the above commands). Any solutions so far?
Related
I just performed the root technique for my GS3 and now over every home screen and app drawer screen i get a yellow text overlay. Does anybody know how to get rid of it? It seems to be a system status display.
I guess my phone was put into factory mode for some reason... I'm not sure why. Oh well I found out how to fix it in another thread. See the Quote Below:
Odia said:
# echo -n ON > /efs/FactoryApp/factorymode
(and yes ON is the correct setting to turn it off)
Click to expand...
Click to collapse
the lights always stay off even in complete darkness whether on auto brightness or not
any way i can fix this without using an app?
i tried changing some values in framework-res but it didnt work
With your settings?
No.sorry
Sent from my HTC One S using TrickDroid 4.0.0
kevin0905 said:
any way i can fix this without using an app?
Click to expand...
Click to collapse
You can control those leds through
/sys/class/leds/button-backlight/max_brightness
/sys/class/leds/button-backlight/brightness
/sys/class/leds/button-backlight/currents
You could make an init.d script to set some values you like and then make them read-only.
There are probably nicer ways, but I don't know.
-Jobo
How many colors does the notification led of Motorola g has? I have read that you have v only the white colour.
This is true?
I believe that to be true. I installed light flow on my g the other day and despite my best efforts to change the led color, it stayed white.
Sent from my XT1034 using Tapatalk
Fuuuuuuuu.....
peslap said:
Fuuuuuuuu.....
Click to expand...
Click to collapse
Well, white is better than nothing...
Maybe they will release a patch on 25th dec which enables the rgb in led....surprise surprise
Sent from xda app-developers app
Unfortunately they removed the RGB Led, which was present in the pre-release versions.
So its only white.
This user apparently has a yellow LED (look at his second pic) http://forum.xda-developers.com/showthread.php?p=48668745
EDIT: Nevermind, that's not the led.
Sent from my XT1034 using Tapatalk
pisherthefisher said:
This user apparently has a yellow LED (look at his second pic) http://forum.xda-developers.com/showthread.php?p=48668745
EDIT: Nevermind, that's not the led.
Sent from my XT1034 using Tapatalk
Click to expand...
Click to collapse
The led is on the right side of the camera.
Sent from my XT1033
This makes me remember the times of the Cliq XT, Cliq and Backflip, lol...
If you remove the battery cover (or Moto Shell) if the LED is blinking you can see from a hole that is iluminating green... it's a multicolored led? I don't know, but i swear that i see a green blink after removing the battery cover and seeing thru a little hole... not joking.
Woah a hidden multicolored led?
Sent from Samsung Chat
It seems that there are two different drivers enabled:
Code:
CONFIG_LEDS_QPNP=y
CONFIG_LEDS_QPNP_RGB=y
As the name of the second config suggests, that's for an RGB LED.
There are some chances that Motorola is shipping some devices with an RGB LED, but is forcing them to stay white in order to make all the devices look equal.
Maybe something like this could help
Code:
find /sys | grep leds-qpnp
If in the list you should get there's "leds-qpnp-rgb", then you have an RGB LED.
I'm actually not sure of this, I don't even have the device and I just quickly looked at the sources. In any case, looking in /sys could easily solve "the problem".
pmzqla said:
It seems that there are two different drivers enabled:
Code:
CONFIG_LEDS_QPNP=y
CONFIG_LEDS_QPNP_RGB=y
As the name of the second config suggests, that's for an RGB LED.
There are some chances that Motorola is shipping some devices with an RGB LED, but is forcing them to stay white in order to make all the devices look equal.
Maybe something like this could help
Code:
find /sys | grep leds-qpnp
If in the list you should get there's "leds-qpnp-rgb", then you have an RGB LED.
I'm actually not sure of this, I don't even have the device and I just quickly looked at the sources. In any case, looking in /sys could easily solve "the problem".
Click to expand...
Click to collapse
Did anyone try this or found a way to have color led?
Thanks
AFIK "find" command is not part of stock Android commands. Could be got it using BusyBox, but that one installs under /system which, if modified, could imply problems receiving an OTA.
Well the only LED colour referred to in /sys is white, so no surprises there.
[email protected]_umts:/ $ find /sys -type d|grep leds-qpnp|egrep -v 'power|charging'
find: /sys/kernel/debug/tracing: Permission denied
/sys/bus/spmi/drivers/qcom,leds-qpnp
/sys/bus/spmi/drivers/qcom,leds-qpnp-rgb
/sys/devices/leds-qpnp-rgb-e4a17c00
/sys/devices/leds-qpnp-rgb-e4a17c00/leds
/sys/devices/leds-qpnp-rgb-e4a17c00/leds/white
/sys/devices/leds-qpnp-e4a17800
/sys/devices/leds-qpnp-e4a17a00
/sys/devices/leds-qpnp-e4a1b000
/sys/devices/leds-qpnp-e4a1b000/leds
/sys/devices/leds-qpnp-e4a1b000/leds/wled:backlight
/sys/devices/leds-qpnp-e4a1c000
/sys/devices/leds-qpnp-e4a1c000/leds
/sys/devices/leds-qpnp-e4a1c000/leds/led:flash_torch
/sys/devices/leds-qpnp-e4a1c000/leds/led:flash_0
/sys/devices/leds-qpnp-e4a1c000/leds/led:flash_1
/sys/devices/leds-qpnp-e4a1ae00
ferossan said:
AFIK "find" command is not part of stock Android commands. Could be got it using BusyBox, but that one installs under /system which, if modified, could imply problems receiving an OTA.
Click to expand...
Click to collapse
You are right. If you use terminal emulator and you have a busybox binary you could simply do:
Code:
#with busybox in /sdcard:
mkdir ~/bin
cp /sdcard/busybox ~/bin/
cd ~/bin/
chmod 755 busybox
for i in `busybox --list`; do ln -s busybox $i; done
and make terminal emulator execute this command (from the settings)
Code:
export PATH=~/bin:$PATH
At least that's what I did, I just got this device and I prefer not to root immediately, but I wanted to use some busybox tools, even if I can't do much with them.
superusr said:
Well the only LED colour referred to in /sys is white, so no surprises there.
[email protected]_umts:/ $ find /sys -type d|grep leds-qpnp|egrep -v 'power|charging'
find: /sys/kernel/debug/tracing: Permission denied
/sys/bus/spmi/drivers/qcom,leds-qpnp
/sys/bus/spmi/drivers/qcom,leds-qpnp-rgb
/sys/devices/leds-qpnp-rgb-e4a17c00
/sys/devices/leds-qpnp-rgb-e4a17c00/leds
/sys/devices/leds-qpnp-rgb-e4a17c00/leds/white
/sys/devices/leds-qpnp-e4a17800
/sys/devices/leds-qpnp-e4a17a00
/sys/devices/leds-qpnp-e4a1b000
/sys/devices/leds-qpnp-e4a1b000/leds
/sys/devices/leds-qpnp-e4a1b000/leds/wled:backlight
/sys/devices/leds-qpnp-e4a1c000
/sys/devices/leds-qpnp-e4a1c000/leds
/sys/devices/leds-qpnp-e4a1c000/leds/led:flash_torch
/sys/devices/leds-qpnp-e4a1c000/leds/led:flash_0
/sys/devices/leds-qpnp-e4a1c000/leds/led:flash_1
/sys/devices/leds-qpnp-e4a1ae00
Click to expand...
Click to collapse
Thanks.
I looked again at the sources and there are no traces of RGB leds, just "white" and "charging" (link to Entropy512's ref repo. Sorry, I'm not allowed to post links): github.com/Entropy512/kernel_motorola_falcon_reference/blob/moto_323/arch/arm/boot/dts/msm8226-moto-common.dtsi#L443
"white" is configured as QPNP_ID_LED_MPP and "charging" as QPNP_ID_ATC, so I don't think there's an RGB LED, which require three different channels, each differently configured (QPNP_ID_RGB_RED, QPNP_ID_RGB_GREEN, QPNP_ID_RGB_BLUE).
Anyway, CONFIG_LEDS_QPNP is for "charging" and CONFIG_LEDS_QPNP_RGB for "white". I find interesting the fact that no pwm-channel is specified for "charging" and why does it use a different driver?
If there's anyone with a rooted device reading this, what happens running the following?
Code:
su
echo 255 > /sys/class/leds/charging/brightness
That should put this so called "charging" LED to its maximum brightness.
pmzqla said:
That should put this so called "charging" LED to its maximum brightness.
Click to expand...
Click to collapse
Sounds like this http://www.xda-developers.com/android/surprising-news-moto-x-has-a-notification-light/
Dear all,
I'm sorry to bother you all in this tread also but does anyone managed to put the white LED working with missed calls?.
I've tried almost every trick and tip but still, nothing.
Cheers,
David
pmzqla said:
If there's anyone with a rooted device reading this, what happens running the following?
Code:
su
echo 255 > /sys/class/leds/charging/brightness
That should put this so called "charging" LED to its maximum brightness.
Click to expand...
Click to collapse
That does indeed turn on the LED during charging. Thanks for that!
Image RGB
This is a pre version of the phone and have rgb active.
i hope motorola update this function.
Thank you all for investigate to this very useful function.
I'm still on JB, but looking at the recent sources that Motorola released I saw that a "new LED" was added and it's named "rgb".
This LED has an additional sysfs file, "control", which allows you to adjust its color. I don't know if can actually do that, but you can try it.
This is how the input is read:
Code:
sscanf(buf, "%x %u %u %u %u", &rgb, &delay_on, &delay_off,
&ramp_up, &ramp_down);
so you should do something like this from terminal emulator/adb (maybe I'm wrong):
Code:
su
echo EE0000 500 500 1 1 > /sys/class/leds/rgb/control
echo 255 > /sys/class/leds/rgb/brightness
EDIT:
You can maybe try different colors replacing EE0000 in the command above with another hex value.
Hey everyone,
I want to flash the camera LED (Not the notification LED) on incoming call , message , and SMS / MMS .
I have tried just about all the free apps on the market attempting to do so, with no / little luck. Some just don't work at all, and a few will flash on TEST mode but not actually work when ringing. [Edit: Some work great on SMS / text but NOT ringer ... wtf ???]
I found one or two that will flash AFTER the ringer stops, but not consistently and nothing works like it should. Also nothing will actually flash while the phone is ringing. I tried Flashlight Notifier but you have to pay for PRO to use the ringer option, which I am afraid to do since nothing else worked....
I am using ViperOne 3.2.1 on HTC One M8 -- I have also tried the VenomTweaks settings of notification flash and added people and phone but that doesn't work either.
A few apps that I tried have Accessibility on/off service, which I have enabled and still no luck.
Any suggestions ?
Thanks !
BaLLZaCH said:
Hey everyone,
I want to flash the camera LED (Not the notification LED) on incoming call , message , and SMS / MMS .
I have tried just about all the free apps on the market attempting to do so, with no / little luck. Some just don't work at all, and a few will flash on TEST mode but not actually work when ringing. [Edit: Some work great on SMS / text but NOT ringer ... wtf ???]
I found one or two that will flash AFTER the ringer stops, but not consistently and nothing works like it should. Also nothing will actually flash while the phone is ringing. I tried FLASHLIGHT NOTIFIER but you have to pay for PRO to use the ringer option, which I am afraid to do since nothing else worked.... (Flashlight Alerts is purchase also and again, I'm afraid to try since nothing free came even close to working correctly)...
I am using ViperOne 3.2.1 on HTC One M8 -- I have also tried the VenomTweaks settings of notification flash and added people and phone but that doesn't work either.
A few apps that I tried have Accessibility on/off service, which I have enabled and still no luck.
Any suggestions ?
Thanks !
Click to expand...
Click to collapse
Did you check out all the options xposed framework has to offer?
BaLLZaCH said:
Hey everyone,
I want to flash the camera LED (Not the notification LED) on incoming call , message , and SMS / MMS .
I have tried just about all the free apps on the market attempting to do so, with no / little luck. Some just don't work at all, and a few will flash on TEST mode but not actually work when ringing. [Edit: Some work great on SMS / text but NOT ringer ... wtf ???]
I found one or two that will flash AFTER the ringer stops, but not consistently and nothing works like it should. Also nothing will actually flash while the phone is ringing. I tried FLASHLIGHT NOTIFIER but you have to pay for PRO to use the ringer option, which I am afraid to do since nothing else worked.... (Flashlight Alerts is purchase also and again, I'm afraid to try since nothing free came even close to working correctly)...
I am using ViperOne 3.2.1 on HTC One M8 -- I have also tried the VenomTweaks settings of notification flash and added people and phone but that doesn't work either.
A few apps that I tried have Accessibility on/off service, which I have enabled and still no luck.
Any suggestions ?
Thanks !
Click to expand...
Click to collapse
You want it to flash as often as the notification led or just once when the initial notification comes in?
Sent from my HTC6525LVW using Tapatalk 2
dottat said:
Did you check out all the options xposed framework has to offer?
Click to expand...
Click to collapse
I didn't see anything in the XPosed world, any suggestions to search for ?
runandhide05 said:
You want it to flash as often as the notification led or just once when the initial notification comes in?
Sent from my HTC6525LVW using Tapatalk 2
Click to expand...
Click to collapse
Well, just flashing on the original incoming call would be great.
In a perfect world mirroring the notification LED, at incoming call, on voicemail, sms and text all would be nice but all I really want is to flash while the phone is ringing....
BaLLZaCH said:
I didn't see anything in the XPosed world, any suggestions to search for ?
Well, just flashing on the original incoming call would be great.
In a perfect world mirroring the notification LED, at incoming call, on voicemail, sms and text all would be nice but all I really want is to flash while the phone is ringing....
Click to expand...
Click to collapse
I plan on working on some stuff this weekend, I'll add it to my list of things to look into, I know the leds can be controlled via a init like we did on the xoom's charging light.
Sent from my HTC6525LVW using Tapatalk 2
runandhide05 said:
I plan on working on some stuff this weekend, I'll add it to my list of things to look into, I know the leds can be controlled via a init like we did on the xoom's charging light.
Sent from my HTC6525LVW using Tapatalk 2
Click to expand...
Click to collapse
Awesome, that would be cool...
I know zero about Android code, but in my head it's just something like:
----------------------------------------------------------------------------------
On Rintone_Activate call Flashing_Timer
On Ringtine_DeActivate (Halt Flashng_Timer | Camera_Flash_OFF )
Module Flashing_Timer (
:Loop
Camera_Flash ON | Wait 1,1
Camera_Flash OFF | Goto Loop
)
----------------------------------------------------------------------------------
BaLLZaCH said:
Awesome, that would be cool...
I know zero about Android code, but in my head it's just something like:
----------------------------------------------------------------------------------
On Rintone_Activate call Flashing_Timer
On Ringtine_DeActivate (Halt Flashng_Timer | Camera_Flash_OFF )
Module Flashing_Timer (
:Loop
Camera_Flash ON | Wait 1,1
Camera_Flash OFF | Goto Loop
)
----------------------------------------------------------------------------------
Click to expand...
Click to collapse
So... Quite a funny outcome here...
So unless you write an app including permission to access torch, if torch is turned on in anyway (outside of an app with permission) the screen turns off...
So what I did was wrote a nice little script to monitor when /sys/class/leds/green/blink so when it's set to 1 /sys/class/leds/flash_0/brightness is echo > 200 for 500ms (half a second) then echo 0 > /sys/class/leds/flash_0/brightness . However because of what I have found when that does happen the screen goes black for a second while torch is flashing.
Il keep working on it to see if I can get something a little more usable.
Still having an issue monitoring /green led
Sent from my HTC6525LVW using Tapatalk 2
---------- Post added at 08:37 PM ---------- Previous post was at 08:19 PM ----------
ok so this is what ive come up with for the time being, since i see no foreseeable way around the screen flash issue, and there for dont see a point in dedicating more time to this.
download tasker.
create a new profile.
select event
select file
select file modified
type
Code:
/sys/class/leds/green/blink
then back out and create a task.
label it what ever you'd like
press the + and select code
select Run Shell
in the command field type
Code:
echo 200 > /sys/class/leds/flash_0/brightness
the check the box next to Use Root
back out and click the play icon bottom left, this will prompt you to allow su access.
all done, now in the phone settings under sounds and notification select what app light notifications you want to use, and whenever the green light changes from on or off status the torch will flash once.
runandhide05 said:
So... Quite a funny outcome here...
So unless you write an app including permission to access torch, if torch is turned on in anyway (outside of an app with permission) the screen turns off...
So what I did was wrote a nice little script to monitor when /sys/class/leds/green/blink so when it's set to 1 /sys/class/leds/flash_0/brightness is echo > 200 for 500ms (half a second) then echo 0 > /sys/class/leds/flash_0/brightness . However because of what I have found when that does happen the screen goes black for a second while torch is flashing.
Il keep working on it to see if I can get something a little more usable.
Still having an issue monitoring /green led
Sent from my HTC6525LVW using Tapatalk 2
---------- Post added at 08:37 PM ---------- Previous post was at 08:19 PM ----------
ok so this is what ive come up with for the time being, since i see no foreseeable way around the screen flash issue, and there for dont see a point in dedicating more time to this.
download tasker.
create a new profile.
select event
select file
select file modified
type
Code:
/sys/class/leds/green/blink
then back out and create a task.
label it what ever you'd like
press the + and select code
select Run Shell
in the command field type
Code:
echo 200 > /sys/class/leds/flash_0/brightness
the check the box next to Use Root
back out and click the play icon bottom left, this will prompt you to allow su access.
all done, now in the phone settings under sounds and notification select what app light notifications you want to use, and whenever the green light changes from on or off status the torch will flash once.
Click to expand...
Click to collapse
Thanks for taking a stab at it, I will try it out in a few days if I ever get a chance...
Hello, I'm working on my own XPeria Z1 (c6943) porting and all is working except for the display brightness.
The brightness is supposed to range from 0..4095 as far as I know, but its max_brightness is set to 255. The result is the backlight is darker than it should be.
I tried tweaking thermanager.xml and init.rhine.rc (rhine board) with no avail. Seems like I'm unable to write to /sys/class/leds/wled:backlight/max_brightness. I can chown, chmod, but can't echo into it, nor by means of the init*.rc files. I can even echo to max_current, changing from 20 to 25.
Now I'm trying to fiddle with the kernel, but I'm still lost on how do I go there.
Any help on this?
My apologies if I am posting on the wrong forum, but I'm still out of privileges and new to xda (as a writer).
So I managed to resolve the problem. I had to tweak the kernel leds.h header file for this specific device.
$KERNEL/include/linux/leds.h
Code:
enum led_brightness {
LED_OFF = 0,
LED_HALF = 2047,
LED_FULL = 4095,
};
Thereafter, compiling, copying the newly-generated zImage as kernel into the proper dirs and we are good again.
Hope this helps anyone lost on the same issue.
laramaki said:
Hello, I'm working on my own XPeria Z1 (c6943) porting and all is working except for the display brightness.
The brightness is supposed to range from 0..4095 as far as I know, but its max_brightness is set to 255. The result is the backlight is darker than it should be.
I tried tweaking thermanager.xml and init.rhine.rc (rhine board) with no avail. Seems like I'm unable to write to /sys/class/leds/wled:backlight/max_brightness. I can chown, chmod, but can't echo into it, nor by means of the init*.rc files. I can even echo to max_current, changing from 20 to 25.
Now I'm trying to fiddle with the kernel, but I'm still lost on how do I go there.
Any help on this?
My apologies if I am posting on the wrong forum, but I'm still out of privileges and new to xda (as a writer).
Click to expand...
Click to collapse