Hi,
I want to create a script that make keyboard LED blink when there is an sms or a missed call. The problem is I don't know how to control this LED and how to watch for event like sms or missed call.
If someone could help it will be fine.
Thank you
Edit: I found that we can control LED in sys/device/platform/button-backlight ( or something like that ) but when I change brightness to 0 it go back to 125.
Sent from my XT720 using xda-developers app
I think what you are seeing might be the light sensor resetting the value when automatic brightness mode is enabled. There's a lookup table that sets lcd and button backlight to specific values based on the ambient light reading. So... If you have automatic brightness enabled in settings, try disabling that and see if the behavior changes.
Sent from my Milestone XT720 using xda premium
Mioze7Ae said:
I think what you are seeing might be the light sensor resetting the value when automatic brightness mode is enabled. There's a lookup table that sets lcd and button backlight to specific values based on the ambient light reading. So... If you have automatic brightness enabled in settings, try disabling that and see if the behavior changes.
Sent from my Milestone XT720 using xda premium
Click to expand...
Click to collapse
I was thinking about automatic brightness but the goal is to control LED with automatic brightness. Have you an idea to set a value in a script to watch for sms ?
Sent from my XT720 using xda app
Zachary57 said:
I was thinking about automatic brightness but the goal is to control LED with automatic brightness. Have you an idea to set a value in a script to watch for sms ?
Sent from my XT720 using xda app
Click to expand...
Click to collapse
Which ROM are you running? To get that working on CM7 you probably have to modify either the framework or fjfalcon's liblights (but it shouldn't be too bad if you're patient and can search/read code somewhat). IIRC the ledmeknow app will blink the button leds if automatic brightness isn't interfering but I haven't tried that in a long time. One downside is that an app/script that does blinking will keep your kernel awake. (My understanding is that the low-level firmware runs the blinks on the three-leds which allows the kernel to sleep, but driving from an app/script will keep the kernel awake i.e. look for the "blink" file in the same directory as the "brightness" file)
https://github.com/CyanogenModXT720...a_sholest/blob/gingerbread/liblights/lights.c
Mioze7Ae said:
Which ROM are you running? To get that working on CM7 you probably have to modify either the framework or fjfalcon's liblights (but it shouldn't be too bad if you're patient and can search/read code somewhat). IIRC the ledmeknow app will blink the button leds if automatic brightness isn't interfering but I haven't tried that in a long time. One downside is that an app/script that does blinking will keep your kernel awake. (My understanding is that the low-level firmware runs the blinks on the three-leds which allows the kernel to sleep, but driving from an app/script will keep the kernel awake i.e. look for the "blink" file in the same directory as the "brightness" file)
Click to expand...
Click to collapse
I am under cronosX. I will try to find the files.
Sent from my XT720 using xda app
I searched for lights.c in the ROM but couldn't find. More there isn't blink file but that I know is that ledmeknow change brightness value from 0 to 125 to make led blink.
You spoke about framwork can you tell me wich file it is ? I found that : http://forum.xda-developers.com/showthread.php?t=928608 but I don't know if it is the correct file.
Thank you
EDIT : So after few more search I found that I have to edit service.jar (source : http://forum.xda-developers.com/showthread.php?t=1546302)
Zachary57 said:
I searched for lights.c in the ROM but couldn't find. More there isn't blink file but that I know is that ledmeknow change brightness value from 0 to 125 to make led blink.
You spoke about framwork can you tell me wich file it is ? I found that : http://forum.xda-developers.com/showthread.php?t=928608 but I don't know if it is the correct file.
Thank you
EDIT : So after few more search I found that I have to edit service.jar (source : http://forum.xda-developers.com/showthread.php?t=1546302)
Click to expand...
Click to collapse
/system/lib/hw/lights.sholest.so
I found a thread that include a service only file here : http://forum.xda-developers.com/showthread.php?t=1723749&page=1
Can someone tell me which file into service.jar I have to mod ? because now I am abble to open and mod it and I have services.jar from other phones where it work so I want to know which file to compare.
Related
hi,is there anyway u can up the brightness level on these phones its up full at the moment but still could do with being a bit brighter
Afaik you have to wait for custom roms to get that up'd
Regards Dousan...
e: maybe its enough with a custom kernel...
Well the screen is not that great on our phone which is why we get around 2 days battery life with average use even I would like the screen to be brighter but it will greatly reduce battery life
Sent from my R800i using XDA Premium App
Have you tried installing dazzle? This app has some niffty display controls for maxing out the brightness.
Sent from my R800i using XDA App
it all comes down to the fact SE does not allow us to disable auto brightness so even if you "crank" the brightness you still have to live with auto brightness controlling the brightness while settings 1 2 3 on the power control widget appear to turn it up it is still being controlled to an extent..
FrAsErTaG said:
it all comes down to the fact SE does not allow us to disable auto brightness so even if you "crank" the brightness you still have to live with auto brightness controlling the brightness while settings 1 2 3 on the power control widget appear to turn it up it is still being controlled to an extent..
Click to expand...
Click to collapse
Will probably at least take a recompile of the kernel.
An answer to this question is in the Arc section, from SE:
A question on how to disable auto-brightness on Xperia PLAY.
Unfortunately, being able to do this from userspace might be non-functional in the released kernel for Play. The engineering team is aware and it is something they are looking into for future releases, can’t comment if it will be supported though yet.
However, if you’re building your own kernel, you can modify the file arch/arm/mach-msm/board-semc_zeus.c
What you’re looking for is the structure “as3676_platform_data”, where you can change the “als_connected = 1” to “als_connected = 0”.
Click to expand...
Click to collapse
I'm not sure how this would work, but there is a parameter
in /sys/devices/i2c-0/0-0040/leds/lcd-backlight/als/ "enable" which by default is set to "1"
Might want to test something like
echo "0" > /sys/devices/i2c-0/0-0040/leds/lcd-backlight/als/enable
You need to be root to do this
NielDK said:
I'm not sure how this would work, but there is a parameter
in /sys/devices/i2c-0/0-0040/leds/lcd-backlight/als/ "enable" which by default is set to "1"
Might want to test something like
echo "0" > /sys/devices/i2c-0/0-0040/leds/lcd-backlight/als/enable
You need to be root to do this
Click to expand...
Click to collapse
this works
waz000000 said:
this works
Click to expand...
Click to collapse
I think it will be set back on reboot, but it may work to add that line to /etc/hw_config.sh
yeah doesnt remain after reboot, will add later and see if it works.
It's not something that bothers me tbh.
waz000000 said:
yeah doesnt remain after reboot, will add later and see if it works.
It's not something that bothers me tbh.
Click to expand...
Click to collapse
Nor me.
The auto brightness is actually pretty awesome in all fairness. I am going to leave mine on even when a fix comes out for it.
News for brightnes controll ?
Hi!
We all know that Motorola changed the brightness settings in 2.2.2 so the screen is on 100% less bright then on 2.1 (eclair).
The same thing is on CM7.1 which I use.
So my question is, is there any way to "over"bright Defy-s screen? Or a way to use eclair screen brightness settings on CM7? I need more brightness, that's why I'm asking
Please reply, mihovil13.
+1
Enviado desde mi Motorola DEFY®.
+1
I would greatly appreciate this if it can b done.
Anyone knows how?
I must say, I have not noticed a decrease in brightness at all.. Is there some proof? Did someone measure the strength, in lumen for instance?
My Defy shipped with froyo so idk about 2.1 but when i toggle brightness settings auto seemes to go just a little higher then full brightness for a sec so it does seem possible but i have no idea how. BTW im using CM7
mussio said:
My Defy shipped with froyo so idk about 2.1 but when i toggle brightness settings auto seemes to go just a little higher then full brightness for a sec so it does seem possible but i have no idea how. BTW im using CM7
Click to expand...
Click to collapse
Activate automatic brightness and edit the brightness levels to give full brightness (255) earlier or for all levels. The Motorola kernel enables a different brightness scaling (exponential instead of linear) when using the light sensor for whatever reason, which allows a higher total brightness as a side effect.
Sent from my MB525 using Tapatalk
Still didn't manage to do this...
I've measured, on CM7.1 Ep3 rls max brightness is equal to 70% brightness on official 2.2.2 or 2.3.6
maniac103 said:
Activate automatic brightness and edit the brightness levels to give full brightness (255) earlier or for all levels. The Motorola kernel enables a different brightness scaling (exponential instead of linear) when using the light sensor for whatever reason, which allows a higher total brightness as a side effect.
Sent from my MB525 using Tapatalk
Click to expand...
Click to collapse
Ah that explains! I use a toggle to easily switch between auto and 100% brightness because in some circumstances the screen is hard to read (most notably when standing in the shade but close to an area with bright sunlight). I always noticed the difference in max brightness between both modes and apparently it has some mathematical reason.
Use search
http://forum.xda-developers.com/showthread.php?t=1063310
Is there any way to disable the touch key lights on CM7? I know you can disable them with app or editing the wled file but they will turn back on all the time because CM7 ties the touch key light brightness into the brightness settings. So far its the only thing that is driving me crazy with CM7.
me2
Sent from my LG-P999 using XDA
Completely disable, not that I know of.
I know that they reset themselves every time you turn the screen on and off. Out of curiosity, why would you want to turn them off completely? Battery life isn't noticeably better, only on stock because it sets the keys all the way to the highest setting. If you don't have your display set to the highest brightness, you have nothing to worry about with the touch keys.
it is too bright.i like to set auto display
Sent from my LG-P999 using XDA
and i wanna led to be 0.1mA always in cm7
Sent from my LG-P999 using XDA
theking_13 said:
Completely disable, not that I know of.
I know that they reset themselves every time you turn the screen on and off. Out of curiosity, why would you want to turn them off completely? Battery life isn't noticeably better, only on stock because it sets the keys all the way to the highest setting. If you don't have your display set to the highest brightness, you have nothing to worry about with the touch keys.
Click to expand...
Click to collapse
I dont like them on when im playing games andni just dont need them. I know where the buttons are without the lights on.
You should be able to disable the LED touch lights by doing the following:
1. Settings -> Cyanogenmod Settings -> Display -> Automatic Backlight -> Edit Other Levels
2. Click "Edit other levels..."
3. Under "Buttons" set the four values of "255" to "0"
4. Click "Save & apply"
Although under CyanogenMod 7, as soon as you adjust the brightness the LED touch lights will come back on again, though this is fixed by simply turning your screen off and on again.
I have not used CyanogenMod in a while so this is just off hand and could be wrong.
If you set your screen brightness all the way down, that will change the touch key brightness. If you change to automatic brightness it will keep the key brightness but change the display.
Sent from my LG-P999 using XDA
stormageddon said:
You should be able to disable the LED touch lights by doing the following:
1. Settings -> Cyanogenmod Settings -> Display -> Automatic Backlight -> Edit Other Levels
2. Click "Edit other levels..."
3. Under "Buttons" set the four values of "255" to "0"
4. Click "Save & apply"
Although under CyanogenMod 7, as soon as you adjust the brightness the LED touch lights will come back on again, though this is fixed by simply turning your screen off and on again.
I have not used CyanogenMod in a while so this is just off hand and could be wrong.
Click to expand...
Click to collapse
Thats not an option in cm7.2
Joe333x said:
Thats not an option in cm7.2
Click to expand...
Click to collapse
As far as I can tell, not in CM 7.1 either. Unless its just a EB issue.
Sent from my amazing G2x running EaglesBlood and Faux.
Joe333x said:
Thats not an option in cm7.2
Click to expand...
Click to collapse
As I said, I have not used CyanogenMod in a while. It was a stab in the dark. However I did some searching around and found this little app in the Play Store that you might want to take a look at. Here
It does exactly what you want. I tested it and I was able to turn the lights off completely and you can set it to enable on boot.
stormageddon said:
As I said, I have not used CyanogenMod in a while. It was a stab in the dark. However I did some searching around and found this little app in the Play Store that you might want to take a look at. Here
It does exactly what you want. I tested it and I was able to turn the lights off completely and you can set it to enable on boot.
Click to expand...
Click to collapse
I remember this option on stable 7. 1 on the Vibrant, but haven't seen it on any rom on the G2x.
And good job linking to the SAME apps I mentioned. Lmao
Sent from my amazing G2x running EaglesBlood and Faux.
No app can fix this. All the apps do is edit the wled which cyan sets on its own every time you turn the screen off or adjust the brightness. Example: You download an app that adjusts key brightness, you use it to adjust brightness and it works. Now you turn the screen off and on, that adjustment you made is now set back to where cyan had it. Same thing if you edit the wled. This is something that needs to be fix deeper down than an app or editing the wled file. Its something that needs to be edited within cyan it self.
theking_13 said:
I remember this option on stable 7. 1 on the Vibrant, but haven't seen it on any rom on the G2x.
And good job linking to the SAME apps I mentioned. Lmao
Sent from my amazing G2x running EaglesBlood and Faux.
Click to expand...
Click to collapse
Lol, I didn't see you post that. Great minds think alike?
Sent from my LG-P999 using xda premium
So, we all know that at the moment one of the main things that kills the battery life is the screen.
I don't know how you feel about it but I think the Z1 is really bright, even when at minimum. If we could lower the brightness beyond the normal controls wouldn't that help with the battery life?
Sent from my C6903 using xda app-developers app
kashppo said:
So, we all know that at the moment one of the main things that kills the battery life is the screen.
I don't know how you feel about it but I think the Z1 is really bright, even when at minimum. If we could lower the brightness beyond the normal controls wouldn't that help with the battery life?
Sent from my C6903 using xda app-developers app
Click to expand...
Click to collapse
Try lux_autobrightnes,
That app can lower the brightness lower than the system ..
Gesendet von meinem C6903 mit Tapatalk 2
chitose_ndy said:
Try lux_autobrightnes,
That app can lower the brightness lower than the system ..
Gesendet von meinem C6903 mit Tapatalk 2
Click to expand...
Click to collapse
Thanks for that! Sounds like a good app. I will try it and see the effect on the battery life, hopefully it will help.
Seconding the Lux Lite vote: https://play.google.com/store/apps/details?id=com.vitocassisi.luxlite
With it set to Dynamic and Day, in profile editor change:
Lux - 0 = -55
Luma - 1 = -55
and leave all other variables the same.
That seems to give me a good range of brightness for my eyes - readable in bed with no lights on in the room without waking my partner and full brightness in head on daylight.
Hi, I'm looking for a way to decrease the backlight brightness.
Right now even a full black screen lights up my bedroom and I
have the related slider at the minimum with the adaptive setting
turned on. I've tried a few apps but none of them changed the
illumination of blacks.
erdokovyz said:
Hi, I'm looking for a way to decrease the backlight brightness.
Right now even a full black screen lights up my bedroom and I
have the related slider at the minimum with the adaptive setting
turned on. I've tried a few apps but none of them changed the
illumination of blacks.
Click to expand...
Click to collapse
Ummm try the app I posted a link to that does exactly what you asked?
Uvaavu said:
Ummm try the app I posted a link to that does exactly what you asked?
Click to expand...
Click to collapse
I've tried that along with a few others. It couldn't dim the backlight beyond what is possible
with the stock brightness slider. After a while it just changes the white point, the blacks
keep glowing the same.
erdokovyz said:
I've tried that along with a few others. It couldn't dim the backlight beyond what is possible
with the stock brightness slider. After a while it just changes the white point, the blacks
keep glowing the same.
Click to expand...
Click to collapse
It's physically impossible to reduce the brightness at a Lux of zero beyond what the panel/kernel allow. However you CAN apply a dark filter over the entire screen to simulate the effect of reducing the brightness. This appears to be what Lux Lite and Velis Autobrightness both do.
It works fine for me and when viewing the screen in the dark there is very little light emitted using the settings I stated above. However if you don't make the changes I stated above you won't see the darkening effect.
Uvaavu said:
It's physically impossible to reduce the brightness at a Lux of zero beyond what the panel/kernel allow.
Click to expand...
Click to collapse
That's a shame. :\ When my phone is docked it shows a full screen
clock: black background, dark gray digits so any screen filter would
just decrease contrast. I guess I'll need to fix a dark plastic sheet to
the dock to physically cut down the brightness.
I ended up putting a microfiber screen cleaning cloth over the device. It's wrinkle resistant
and big enough so it covers both the front and the back without slipping off. It doesn't look
like it but when near the screen it let's through a surprising amount of light making the
fullscreen clock easily readable. Compatible with all Android versions and doesn't require
rooting.
May I ask, it is possible to dim the three buttons below with Lux?
Sent from my C6903 using xda app-developers app
HEY...l have a problem like you ~ l want to turn my brightness lower but l cant download the app you said . (when l open the page you gave , google play said you cant download this app in this region, l'm Chinese, l'm in china now ) so can you do me a favour that upload two apps ( lux_autobrightnes and Lux Lite) to another page(Links) so l can download? thank you very much ~ such as network disk~ or another something~:laugh:
Uvaavu said:
It's physically impossible to reduce the brightness at a Lux of zero beyond what the panel/kernel allow.
Click to expand...
Click to collapse
The kernel allows 4095 brightness steps, I'm not sure what the stock slider does, but I'm pretty sure the lower values aren't even touched.
I started developing a Lux plugin, but ran into a bug with lux itself, I'll try to contact the dev for help.
Sent from my C6903 using xda app-developers app
I use this: easier than lux
https://play.google.com/store/apps/details?id=com.haxor&hl=en_GB
Guys i have an arc S and just have a small suggestion (not sure it will work on ur device but i dont think there is any harm in doing it)
If u have root
I have created a script to lower my brightness below the actual amount, i didnt use any app from playstore as it actually just placed a black overlay on the screen and the brightness was actually still the same
Well go to my Contributions in my signature and under scripts look at the brightness Adjuster script
Try it
Do not set too low value
I also do not know the default value on ur device so sorry
Sent from my LT18i
Samsung j7 prime can't change brightness after root. Some time brightnes slider work after reboot but after my screen turn off and turn on again my screen get high brihtness and i can't change it from brightnes slider. I must reboot and reboot again. And get hightnest brighntness again. What i can do for fix it?
Whats wrong wit mu phone ( Note. After screen turnt off an i turn on have blingked on top screen and get hightnes brightnest again) anu idea?
J7 prime not have auto brightness fitur.
Hi!
I would like something like this https://forum.xda-developers.com/t/...ness-fix-torch-light-not-photo-flash.3872858/ for my Xperia 5 II.
Or if there is a setting for it. I have read on some webpages that maybe you could boost it in settings. This site https://smartandroid.fr/en/comment-allumer-la-lampe-torche-de-son-sony-xperia-5-2/ is about "Xperia 5" (not "Xperia 5 II") and say:
Slide the notification bar down
Go to the settings shortcut page on which your » Lamp »
Rather than clicking on the logo to light it, click on the text: » Lamp ", In this way you will access the torch settings of your Sony Xperia 5
You can now move the slider to manage the intensity of your flash. Namely that the device will save the setting and that it will have this intensity during the next ignition
I cant find that setting on my Xperia 5 II.
I have also tried this:
I go to Settings
There, at the top, I search for "Flash"
Now I see the setting "Flashlight", but nothing happens what I try to choose it.
Is there any magic out there to turn up the light?
Hi raffe,
I'm glad you posted this as I was looking to ask this question myself. The flashlight is really dim compared to my old phone so it would be great to turn up the brightness (lumens).
I also have no response when I look at settings and search torch. And no way to find other options for this feature. I even looked on Developer Tools.
Hopefully someone can help....?
Maybe the problem is, there is only one led diode..
Agree the "torch" is incredibly woeful, worst I've seen to be honest.
if you make a photo then you see that the led can be pretty bright even brighter than everyother phone I've had. Problem is that sony sets it low to allow it to go on for couple of hours winthout overheating.
I'm looking into it myself, if I find anything then I'll let you guys know
So it's me again. I have a solution but it requires root
Release v1.4.6 · BRoy98/GodlyTorch
Merge pull request #2 from TheDorkKnightRises/patch Fix LED file path for OnePlus One (bacon), proper device names for OP Merge pull request #3 from TheDorkKnightRises/patch Fix default double-...
github.com
Download this app and select device google pixel 2 it allows you to control the torch brightness
But be careful and don't burn your finger by setting it to 100% max bright like me hah. The 10% is normal brightness 20% is brighter than every other device and 30% is enough for myself
Qbus2002 said:
So it's me again. I have a solution but it requires root
Release v1.4.6 · BRoy98/GodlyTorch
Merge pull request #2 from TheDorkKnightRises/patch Fix LED file path for OnePlus One (bacon), proper device names for OP Merge pull request #3 from TheDorkKnightRises/patch Fix default double-...
github.com
Download this app and select device google pixel 2 it allows you to control the torch brightness
But be careful and don't burn your finger by setting it to 100% max bright like me hah. The 10% is normal brightness 20% is brighter than every other device and 30% is enough for myself
Click to expand...
Click to collapse
Thanks! That worked well
Wish there was a solution without root.
Qbus2002 said:
So it's me again. I have a solution but it requires root
Release v1.4.6 · BRoy98/GodlyTorch
Merge pull request #2 from TheDorkKnightRises/patch Fix LED file path for OnePlus One (bacon), proper device names for OP Merge pull request #3 from TheDorkKnightRises/patch Fix default double-...
github.com
Download this app and select device google pixel 2 it allows you to control the torch brightness
But be careful and don't burn your finger by setting it to 100% max bright like me hah. The 10% is normal brightness 20% is brighter than every other device and 30% is enough for myself
Click to expand...
Click to collapse
Good find! I only wish there were an easier way to toggle flashlight on/off to a preset intensity. The app doesn't provide a shortcut.
CazeW said:
Wish there was a solution without root.
Click to expand...
Click to collapse
The brightness setting may be hidden. On my Samsung simply long pressing the flashlight icon toggle takes you to the brightness control.
It was purely by accident that I discovered it as that's the only way to access it.
I agree that root shouldn't be required for such a simple thing.
Crap it
homerlovesbeer said:
I agree that root shouldn't be required for such a simple thing.
Crap it
Click to expand...
Click to collapse
It's probably buried in the settings or a 3rd party flashlight app can be used to access the brightness controls.
I would use the former rather than the latter...
blackhawk said:
It's probably buried in the settings or a 3rd party flashlight app can be used to access the brightness controls.
I would use the former rather than the latter...
Click to expand...
Click to collapse
If it's buried then it's buried so deep that it doesn't exist.
CazeW said:
If it's buried then it's buried so deep that it doesn't exist.
Click to expand...
Click to collapse
With Samsung there's no rythm or reason; double tapping or long pressing to access unindicted drop down menus. They are far and few in between so finding one tends to be a shock.
Another reason I seldom upgrade the firmware.
Maybe Sony is more sane but don't count on it.
Play with it...
I had to un-root the phone. When I rooted, the one app that could change the light intensity worked, but three other apps (financial and banking) said they would not start on a rooted phone and I never could get past that. Back to square 1 ;-(
Does anyone know the current version of an app like this? The application works well enough. But the problem is that two flash leds don't work at the same time. It lights up white or yellow alone, but both do not work at the same time. I have a Xiaomi Mi 9 device and I find the flash led running in the developer test interface of the device and the flash led running from the normal interface does not find a difference in lighting twice or three times.
raffe said:
Hi!
I would like something like this https://forum.xda-developers.com/t/...ness-fix-torch-light-not-photo-flash.3872858/ for my Xperia 5 II.
Or if there is a setting for it. I have read on some webpages that maybe you could boost it in settings. This site https://smartandroid.fr/en/comment-allumer-la-lampe-torche-de-son-sony-xperia-5-2/ is about "Xperia 5" (not "Xperia 5 II") and say:
Slide the notification bar down
Go to the settings shortcut page on which your » Lamp »
Rather than clicking on the logo to light it, click on the text: » Lamp ", In this way you will access the torch settings of your Sony Xperia 5
You can now move the slider to manage the intensity of your flash. Namely that the device will save the setting and that it will have this intensity during the next ignition
I cant find that setting on my Xperia 5 II.
I have also tried this:
I go to Settings
There, at the top, I search for "Flash"
Now I see the setting "Flashlight", but nothing happens what I try to choose it.
Is there any magic out there to turn up the light?
Click to expand...
Click to collapse
any help for galaxy a8 2018 ?? i have a problem Torchlight Intensity Control