yashsingh1/xdaforums huggingface dataset:
[HD2 Android NAND Development] themadproducer:
ph03n!x, I am not sure I am following this thread correctly...but with Typhoon 3.6.4 and flashing notifications all set within CM Settings, drain stays well below 5ma...in fact,,,it's not even noticeable because I normally drain 1-5ma on standby anyhow. Does that make sense?
[HD2 Android NAND Development] dharvey4651:
I can confirm that in using:

HierOS kernel 1.8.3

lights.qsd8k.so in system/lib

and my GingerSense ROM posted here in Android Nand Development that the blinking notification LED's work, the auto-brightness works(tested with flashlight method in dark room) and also, the screen dims for about 3 seconds before the screen times out.

Give it a shot folks.
[HD2 Android NAND Development] g30rg10u:
@ph03n!x im on kefir 0.9.7.3 and had the LED blinking xx mA (30-50).

This occured when phone was below 15% of battery and started blinking for out of battery notification.

I used to had the same in older kernels.. blinking though was never 100% functioning.

Any suggestions?
[HD2 Android NAND Development] ph03n!x:
We of course workarounds - the other one apart from the one you posted is using the custom brightness library (which does not flash LED) and use LED Me Know from the market. But the objective is to have the issue fixed - bring it that much closer to a native phone...

lol.. I use Swype, and that is my signature when I post from the XDA App :)

The battery drain in not a consistent issue but rather sporadic, check this post by @tyween... Also see @g30rg10u post quoted below :)

That said, this is not a deal breaker issue, but nevertheless an issue that is best fixed - who knows what else will get fixed when we fix this?!! :D

Thanks @dharvey4651, I will try it later this week!

All - would be great if someone can try this too...

If you don't mind losing the blinking LED functionality, try the other library - until we fix this bug ;)
[HD2 Android NAND Development] trex3300:
I am on tytung R11 kernel and v3.0 Nand rom.

- My Auto Brightness and blinking LED Notification works

- No power drain

- Light dims for few seconds before it goes out, and in a dark room, Auto Brightness brightens when an LED flashlight was pointed directly at it.

Everything seems to work great.

I also noticed that I have

3 lights

files in system/libs/hw

(1) Lights.htccleo.so (9.57KB)

(2) Lights.mahimahi.so (9.64KB)

(3) Lights.qsd8k.so (9.53KB)

The system/libs/hw also contains 3 matching sensors.xxx.so files plus 2 other files. Hope that help.
[HD2 Android NAND Development] siddharth singh:
Hi... I have LIGHTS.QS8DK but custom levels don't seem to work for auto brightness... And my led flashes on notifications... Am using miui and trying clp clk ppp kernel r12
[HD2 Android NAND Development] ayyu3m:
Editing...
[HD2 Android NAND Development] siddharth singh:
Here is the lights. Qs8dk from my miui rom.. Both led flashing and auto brightness work properly :D.. Custom brightness doesn't seem to work

http://db.tt/KTwo0UtT

Ut is 9.6kb
[HD2 Android NAND Development] clyder:
This is the same file as in HyperDroid 3. Although in HD3 it is named lights.htcleo.so but I just did a compare by content and it is identical.

On Hyperdroid also auto brightness works withouth working custom backlight levels and working LED's.

While betatesting Hyperdroid we had a discussion weather to use this lib or the libs with working custom BL levels, but we went for this one since noone on the team really cared much for that feature. I like flashing LED's, and never tried to use custom backlight levels so dont really know what I am missing there.

edit:

with this libs screen dims before turning off only when brightness is set to manual value. If I turn auto brightness on, after timeout expires it just switches off. Not sure how it is supposed to work.
[HD2 Android NAND Development] siddharth singh:
How did you compare the contents.. If you decompiled it... Then please tell me how you did it?. Cuz as far as I have read... It is impossible to decompile. So file
[HD2 Android NAND Development] clyder:
I haven't decompiled it... I just did a file compare with Total Commander. It has a compare by content option, so it compares two files byte by byte...
[HD2 Android NAND Development] Looki75:
Typo here!

The auto brightness needs to:

* Dim in dark room ("brightening" would hurt your eyes)

* Brighten in sunlight ("dimming" would makes everything un-readable)
[HD2 Android NAND Development] wheeliemonster:
Hi All,

I don't think we've seen any new behaviour in the lights libraries being discussed.

We have two versions:

1) Auto-brightness works, but not custom levels. Screen dims when brightness manually set. LED flashes work.

2) Custom brightness works but LEDs do not flash. UNLESS using particular kernels, when low battery causes amber...green...off flash pattern. Notification LEDs do not flash however.

If, however, anyone has different behaviour than those described above, please enlighten me! :)

Big thank you to all people testing...
[HD2 Android NAND Development] leaskovski:
Can we actually define how the notifications LED should work?? People have different views on this, but shouldnt the default behaviour be the same as how the device would work running its original OS (WinMob)?

New message notification: Flashing Green LED

New battery warning notification: Flashing Amber LED

Charging: Solid Amber LED

Fully Charged whilst charging: Solid Green LED

I don't know what used to happen when you received a message and you were charging at the same time, so someone would have to confirm that one.

Anyway, with my setup, my devices works like this....

When Auto brightness is enabled, if I put my hands over the ear peice, the screen brightness levels change. In this case it decreases. If I then remove them, the brightness increases.

When disabling the Auto Brightness, if I change the brightness level, the screen brightness changes as per my changes.

LED notifications enabled. When I receive a message, my LED flashes amber with a 3 second interval.

When charging, i have a solid amber LED

When fully charged and plugged in, I have a green LED.
[HD2 Android NAND Development] Tak3r07:
Could someone post a lights.qsd8k.so which should work on typhoon cm7 ?

I've just found this one:

www.pocketpc.ch/hd2-android-builds-...hd-v3-1-w-sense-kernel-rafpigna-1-7-oc-3.html

But it seems quite strange, coz f.e. my hardkeys are flashing on low battery and i dont really know if custom a.b. is working. Flashing led notification does not.
[HD2 Android NAND Development] pyrorob:
you know i see so many different lights so files here, some are the same with different names, maybe it would be better if people posted a crc32 hash value with them so at least if they have different names we can tell them apart more efficiently then just with the file sizes
[HD2 Android NAND Development] karmadelic702:
I do not know if there is any value in this or if this provides any additional avenues to persue, but I noticed the following in the change log for the next CM nightly. The config.xml file has entries for LED and autobrightness.

http://review.cyanogenmod.com/#patc...rameworks/base/core/res/res/values/config.xml

Hope this helps. - Jeff
[HD2 Android NAND Development] Tak3r07:
<!-- Default color for notification LED is white -->	<!-- Default color for notification LED is green -->

<color name="config_defaultNotificationColor">#ffffffff</color>	95	<color name="config_defaultNotificationColor">#ff00ff00</color>

This only affects the color.
[HD2 Android NAND Development] karmadelic702:
Read the rest of the code when you download the xml file. There were array entries for custom backlight levels as well.

Edited to include below info:

-<resources>

<!-- Flag indicating whether we should enable the automatic brightness in Settings. config_hardware_automatic_brightness_available is not set, so we will use software implementation -->

<bool name="config_automatic_brightness_available">true</bool>

<!-- Our amoled doesn't animate well. -->

<bool name="config_animateScreenLights">false</bool>

<!-- disable menu hard key on Bravo in non-pattern lockscreen -->

<bool name="config_disableMenuKeyInLockScreen">true</bool>

<!-- Array of light sensor LUX values to define our levels for auto backlight brightness support. The N entries of this array define N + 1 zones as follows: Zone 0: 0 <= LUX < array[0] Zone 1: array[0] <= LUX < array[1] ... Zone N: array[N - 1] <= LUX < array[N] Zone N + 1: array[N] <= LUX < infinity Must be overridden in platform specific overlays -->

-<integer-array name="config_autoBrightnessLevels"> <item>200</item> <item>400</item> <item>1000</item> <item>3000</item> </integer-array>

<!-- Array of output values for LCD backlight corresponding to the LUX values in the config_autoBrightnessLevels array. This array should have size one greater than the size of the config_autoBrightnessLevels array. -->

-<integer-array name="config_autoBrightnessLcdBacklightValues"> <item>35</item> <item>55</item> <item>70</item> <item>70</item> <item>250</item> </integer-array>

<!-- Array of output values for button backlight corresponding to the LUX values in the config_autoBrightnessLevels array. This array should have size one greater than the size of the config_autoBrightnessLevels array. -->

-<integer-array name="config_autoBrightnessButtonBacklightValues"> <item>255</item> <item>255</item> <item>0</item> <item>0</item> <item>0</item> </integer-array>

<!-- Array of output values for keyboard backlight corresponding to the LUX values in the config_autoBrightnessLevels array. This array should have size one greater than the size of the config_autoBrightnessLevels array. Bravo has no keyboard so all values are zero. -->

-<integer-array name="config_autoBrightnessKeyboardBacklightValues"> <item>0</item> <item>0</item> <item>0</item> <item>0</item> <item>0</item> </integer-array>
[HD2 Android NAND Development] Bib_x:
No news on this issue?
[HD2 Android NAND Development] ph03n!x:
Not yet - HeirOS does not have the source for kernel v1.7.5 - which gave me flashing lights with the custom auto brightness levels version of the lights module. Lets see how it works with the .35 kernel :)
[HD2 Android NAND Development] wheeliemonster:
According to wahack in the TyphooN thread custom brightness and LEDs working with HierOS 1.8.5...

Sent from my HD2
[HD2 Android NAND Development] ph03n!x:
Let me check that - when you say custom brightness, you do mean custom levels for auto-brightness, right?
[HD2 Android NAND Development] wheeliemonster:
He doesn't actually specify custom auto-brightness, but does say he's swapped the lights lib. The default one in TyphooN has working auto-brightness, so I assumed that because he's swapped libraries, he must mean custom auto

(I could, of course, have misread/assumed that incorrectly!)

Here's the post: http://xdaforums.com/showpost.php?p=19030897&postcount=19744
[HD2 Android NAND Development] vivebatu:
Just installed Hieros 1.8.5 kernel on typhoon rom 3.7.4 and can confirm that custom auto backlight is working with blinking led....I changed some predefined screen dim levels and also created some new levels and all seems to be working OK...cheers
[HD2 Android NAND Development] wheeliemonster:
Did you also swap the lights.htcleo.so file or use the one included with TyphooN 3.7.4?

Thanks

Sent from my HD2
[HD2 Android NAND Development] Bib_x:
Nothing new to report with the new kernels?
[HD2 Android NAND Development] ph03n!x:
Not yet - lets have a 100% working kernel that has all features of the current .32 kernels and then we'll get into testing mode :)
[HD2 Android NAND Development] Looki75:
Tasker Profile to enable custom auto-brightness!!!

I programmed a very simple Tasker profile which acts as the CM7 custom auto-brightness feature.

Thanks to this profile, I could keep the original lights lib to have blinking LED notifications, + the Tasker profile enables me to have the custom auto-brightness.

So I have both blinking LED and custom auto-brightness!

Ok, the tasker profile is less user-friendly (in terms of interface) than the CM7 feature. But it works and the easy part is that: if you use already the CM7 feature, the thresholds (sensor) and values (brightness) are the same:

Sensor thresholds: 0-10240

Brightness scale: 0-255

I am sharing here this profile, which contains my own values for Sensor-Brightness. You can easily import it in your Tasker and adapt the values if necessary.

Of course you need to have "custom brightness" unchecked in Android parameters AND CM7 settings!

If other members are willing to test it, I will be happy to get feedback (better programming, battery use, etc...)!

Thanks,

Looki
[HD2 Android NAND Development] ph03n!x:
Thanks a lot @Looki75! I have updated the first post to point to your workaround, and will post my experience.
[HD2 Android NAND Development] Looki75:
After using my workaround for a day, I notice a limitation.

Each time tasker is writing a value into the screen brightness, it makes the soft keyboard close if it was visible.

This becomes very annoying if you are writing an SMS in a light-changing environment: the keyboard disappear all the time...

Does anybody know how to prevent that with tasker?
[HD2 Android NAND Development] aled99:
Don't know if there is a proper solution, this is a suggestion from the tasker FAQs http://tasker.dinglisch.net/faq-problem.html#u
[HD2 Android NAND Development] Looki75:
Thanks for the hint.

However, as it is said, when you uncheck the "immediate" option, the brightness is not updated until you switch on/off the display.

I also thought about another workaround which appears to not work: I wanted to have a variable which is at 1 when the keyboard is visible and 0 when not; with the Auto-brightness profile to do nothing if the var was at 1.

Unfortunately, there is no context for "soft keyboard visible" (there is just one for a hardware keyboard)...

Other ideas???
[HD2 Android NAND Development] essi_baba:
Work Perfect

Im use Desire HD Qualiz 1.2

with lights.qsd8k.so in Dorimanx mirror in firest post notification not work ,but with file(Attached file) work perfect.

and with Tasker & Auto Brightness.xml on first post ,Auto Brightness now work grate

Thank you :D
[HD2 Android NAND Development] karapialis:
Thanks for this Looki75, but i have a problem setting it up. When i try to import your profile to tasker iget this 'failed to import'. I really want to test this, any suggestions?
[HD2 Android NAND Development] milaq:
liblights with autobrightness, custom b/l levels, blinking notifications

a few days ago, i was writing a lights library for the ideapad a1 and thought i could revisit the leo liblights.

so here it is, for everyone to test :)

the following stuff should work:

autobrightness

custom autobrightness values

blinking leds (e.g. for notifications) - green and amber

static leds (e.g. for charging) - green and amber

screen dimming

custom screen dim level

instructions:

download the attached file

unpack lights.htcleo.so

delete any prior lights library (i.e. lights.* in /system/lib/hw/)

push lights.htcleo.so to /system/lib/hw/

set the correct permissions (should be the same as on all other libs in that folder)

reboot

test, review, and make sure to report back here ;)

cheers

EDIT: my test setup was:

rom: CM7 nightlies (see sig)

kernel: tytung
[HD2 Android NAND Development] karapialis:
Thank you,i will test this immediately.

Edit: Thank you so much Milaq. It works perfect. Custom brightness, notification all work on Dorimanx rom and hopefully all others.

I hope all hd2 chefs and users will show appreciation to your work.

Thanks again
[HD2 Android NAND Development] kantjer:
Thanks!!!!!!!!!!!

I just tried it and almost everything seems to work, the only thing I can see is that I don't have the amber charging light, even if the battery isn't 100% charged the light is green. No big problem though.

Al the rest like notifications and custom screen dim levels are working.
[HD2 Android NAND Development] wheeliemonster:
The charging light goes green at 90% or so, I believe.

Thanks to the dev - I will test this now (am actually using ICS, so will test on that!!)

If this is fixed (as it appears to be), then you will forever be a god in my mind!! :)
[HD2 Android NAND Development] kantjer:
You could be right, mine was at 98%. Nothing to worry about, just different from what I was used to see.

Even if it stayed green at all times while charging it is still a huge improvement compared to the old liblights.
[HD2 Android NAND Development] clyder:
Just tested this on hyperdroid and after few quick tests I havent found anything wrong. LED's work as it should and custom levels appears to be working. Also scren dim works with auto brightness enabled.

great work!
[HD2 Android NAND Development] wheeliemonster:
Bingo! You da man/woman.

Tested on ICS - had to use LEDmeKnow to get the LEDs to go but have fully dimmed screen and flashing LEDs.

Whaddayaknow? That man/woman (sorry I don't know!) milaq is a genius! :):cool:

EDIT: Actually - there could be one issue. When charging, after receiving a notification and clearing it, the charge light does not return to the "on" state.

Anyone else seen the same or is this a ledmeknow/ics issue?
[HD2 Android NAND Development] milaq:
thanks for testing :)

always great to get some direct feedback
[HD2 Android NAND Development] karapialis:
Upon charging i had a missed called but the light still stayed amber without blinking in CM7. When i cleared the notification the light still constant amber. Is this correct or not?

haha. It's been so long since fully functional days i don't remember the correct pattern.

I unhooked from charging after a missed call and wow, blinking green light... Hooked it again and constant amber. Clear the notification and still constant amber 88 percent and charging. All this in CM7.

Milaq is da man, genious, wonderman...

---------- Post added at 02:29 PM ---------- Previous post was at 01:52 PM ----------

The green light lit on 90 percent, but i am too contempt right now to ***** about it. If Milaq could fix this too, it would be ideal ofcourse.
[HD2 Android NAND Development] ph03n!x:
This is FANTASTIC!! Thanks a lot Milaq! Looking at the feedback, looks like you have nailed this one! I am testing it rightaway!
[HD2 Android NAND Development] ph03n!x:
First post updated!!! Anyone did the custom autobrightness level tests??
[HD2 Android NAND Development] ogonzuhnina:
I did, and failed.

my suspicion is that the rom I am currently using might be not compatible. (Hyperdroid CM7 2.1).

I'll try to update (but I seam to be too lazy) to some more up to date CM7 and report back

looking forward for more customautobrightness tests
[HD2 Android NAND Development] kantjer:
I'm using custom autobrightness levels, and it works!!!!!!
[HD2 Android NAND Development] ayyu3m:
Nice. Gonna test this out now...

EDIT: (Review based entirely with the current kernel i m using)

- Replaced exactly as instructed. Corrected permissions too and Rebooted.

- Notification doesnt work. No leds blink after message or miss calls. No led is lit when charger is connected as well.

- Custom brightness works.

- Auto brightness works only once when "auto-brightness" option is selected in "Display". There after doesnt work.

Thankx. Hope this fix gets improved. I m using marc1706's kernel 1.0.8 and the rom as in my signature.
[HD2 Android NAND Development] Looki75:
this is purely fantastic!!! Big big thanks!!!
[HD2 Android NAND Development] timsss:
I have posted a request in HeirOS' kernel thread, meanwhile can those who use earlier versions (1.7.2 or so) confirm if they have working LED Notifications when you use a working auto-brightness configuration please?
[HD2 Android NAND Development] ph03n!x:
CWM Zip file

I've made a a clockworkmod flashable zip package with @Milaq's fix.

Installing:

Copy the zip file to your SD Card

Back up your current ROM in ClockWorkMod

Flash this file

Reboot

This package will insert the following files in /system/lib/hw:

lights.htcleo.so

lights.bravo.so

lights.leo.so

lights.qsd8k.so

All of them are the same file, renamed to match most (if not all ROMs). This is because the file that will be used by your ROM will depend on how your device is named in build.prop.

If you face any issues, just do an advanced restore and restore the /system partition, and get in touch with the chef who cooked your ROM.
[HD2 Android NAND Development] ph03n!x:
Check out the CWM Zip I have posted, it *might* work as I have covered htcleo, leo, bravo and qsd8k nomenclatures.

Not sure if you are talking about my observation that HeirOS kernel 1.7.5 is working, but we are way past that - we have an actual fix!!
[HD2 Android NAND Development] Mafioso:
I just flashed the new libs, however I feel the new libs are causing to lit up the screen way too bright for the light for my taste :(

Can anybody post a tut or a link, what all the custom brightness parameters consist of ? In cm7 settings, adjusting auto blacklight levels seems a very technical task and I can't make out what means what :o

Its much easier in Sense ROMS (I've tried NRGZ's), you can set auto brightness and then there are 3 option to further fine tune it depending on your preference if you like brightly lit screen or not so bright (guess it adjusts threshold levels in background). I hope somebody can make it simple for cm7 roms also :D

Also it used to work fine before this libs also :confused:
[HD2 Android NAND Development] ph03n!x:
Try this link from Dorimanx's ROM Thread... - http://xdaforums.com/showpost.php?p=15609473&postcount=3
[HD2 Android NAND Development] Ultraboss:
Just tested your libs on my Sensation ROM, not working at all.

Is it a way to get a custom "power management" widget like in CM7 roms for Sense roms ??
[HD2 Android NAND Development] ph03n!x:
Alright, just tested @Milaq's light library in my CM7 nightly dated 17th Feb (Dorimanx Kernel v4.7), with a few tweaks on Dorimanx's suggested custom light levels. IT WORKS BEAUTIFULLY!!!!!!!!

I really am not sure how light levels are controlled in Sense-based ROMs. Hope a Dev or a Chef can help?
[HD2 Android NAND Development] marzinho:
TyphooN CyanogenMod 7 Nightly v3.7.6[2.3.7][A2SD][tytung r14]

- notification LED blinking OK

- charging LED solid/amber-to-green change OK

- autobrightness OK

- custom CyanogenMod autobrightness levels and settings OK
[HD2 Android NAND Development] smokin901:
ROM : MIUI v4 ICS 2.2.17 Beta 10/11

- Notification LED blinking OK

- Charging LED solid/amber-to-green change OK

- Auto-brightness OK

- Screen Dim Before Turnoff when Auto-brightness Enabled Yes
[HD2 Android NAND Development] SnoopHTC:
Repport form my phone :)

ROM : IceCreamTosti v0.7a [AOKP23/4.0.3]

Tested with CWM version posted here

- Notification LED blinking OK :) (with LED me know ;))

- Charging LED solid amber OK :)

- Auto-brightness OK :)

- Screen Dim Before Turnoff when Auto-brightness Enabled OK :):)

Many thanks for your work !!!
[HD2 Android NAND Development] ph03n!x:
Can you try flashing the CWM version I had posted here?
[HD2 Android NAND Development] kikisp:
how to test if auto brightness is working?
[HD2 Android NAND Development] trex3300:
Read the first post.
[HD2 Android NAND Development] SnoopHTC:
Hello Ph03n!x, Yes I can and I will do ;), just a question before flash your zip : no perm command in your updater-script for the libs, it's normal? :) Thanks

EDIT : FULL WORKING !!!!!!!!!!!!! THANKS A LOT IS GREATEST !!!! (I just make a fix perm in cvwr to be sure after flash your zip and before reboot ;))
[HD2 Android NAND Development] smokin901:
permission required is 644 and owner root. You can add

set_perm_recursive(0,0,644,644,"/system/lib/hw");
[HD2 Android NAND Development] ph03n!x:
I thought of the permissions too - but it automatically took 644 in my tests, and worked like it should, hence decided to "reduce the lines of code" :D
[HD2 Android NAND Development] ayyu3m:
thankx for the cwm zip. m familiar with replacing library files and i renamed this lights library to match with the one in my system\lib\hw which is lights.qsd8k.so

so this seems to be an issue with sense roms as i saw couple other comments also.
[HD2 Android NAND Development] securecrt:
It works!! thank you !