[APP][root] pwm control - red charging led[Any OS KK-N] - Sprint HTC One (M8)

Disclaimer:
Use at your own risk, might cause damage to led light or affect other led performance, or make the red laser burn your eyes
I have tested it on my m8_whl device for over 3 months and have seen no issues caused or damages so far (regards to temperature/battery drain/led functionality).
Description:
Simple app changes pwm_cofficient value of amber(red) led light from the range 0 (4 is minimum visible) to 255(maximum)
I made this app because of dim/dirty led charging light not visible enough (sometimes I get fooled by screen-on caused by discharge in charger even if its not connected properly in wall outlet)
More info:
- root is required to modify the value of pwm_coefficient
- effect takes place after charging light is reactivated by unplugging-plugging USB
- doesn't affect notifications/low-battery pulse light
- changed value is reset on reboot
- works on any rooted variant of HTC One M8 (tested on Sprint variant)
- works on all Android ROMs (tested KK, LP, MM, N)
if you dont want the app or want to add the code to init.d on startup:
Code:
echo X > /sys/class/leds/amber/pwm_coefficient
X value range: 0 (minimum) 255(maximum)
I also know this isn't the best way to modify led brightness but it works and doesn't require modifying kernels( and it took me more time to make this post than make the app)
Please let me know if there are other ways to modify led brightness and if possible blink(pulse) brightness
Credits:
- Everyone on xda who has helped me understand what is android
- Tasker (UI)

Related

how much diffrence between Auto backlight&manual battery consuming ??

how much diffrence between Auto backlight&manual in battery consuming
is there any experience ???
nobody knows?
One week ago, I changed the option for backlight to 5 min instead of normal 30sec. I even changed the backlight on while making calls (tweak cabfile). I don't notice any more batteryconsumption. This is a overall experience.
I think more brightness on the display will be more battery consuming than backlight settings.
neptunes50 said:
One week ago, I changed the option for backlight to 5 min instead of normal 30sec. I even changed the backlight on while making calls (tweak cabfile). I don't notice any more batteryconsumption. This is a overall experience.
I think more brightness on the display will be more battery consuming than backlight settings.
Click to expand...
Click to collapse
Thanks! I think you are right
What ever option you choose that cuts Electricity flow saves Batts.
So yes turning the screen all the way down when only doing calls and at night helps a lot!
Note also that the auto-dim function doesn't ever dim the light right down (no matter how dark it gets) - the lowest it reaches is equivalent to the manual brightness level 3.
Mathew

[Q] battery optimized ROM

I have seen pretty many ROMs here, but am unable to make out which ROM is best optimized keeping battery life in mind. Could anyone please help suggest me a ROM or two that give the most of the battery life. Please.
You could take any ROM that will work with a kernel supporting OC/UV (like Setiron's) and use Xan's voltage app to limit the top speed of the CPU to something less than stock (1ghz is stock, your choices would be 800, 400, 200, 100)
Then apply an undervolt as low as you can go while still being stable.
This will of course result in a slower device, but that's the tradeoff. Less speed for more battery life.
Do note that the screen is the largest user of power by far and thus you can make the most difference by keeping the backlight as low as tolerable and shut it off whenever you aren't actively using it.
Da_G said:
You could take any ROM that will work with a kernel supporting OC/UV (like Setiron's) and use Xan's voltage app to limit the top speed of the CPU to something less than stock (1ghz is stock, your choices would be 800, 400, 200, 100)
Then apply an undervolt as low as you can go while still being stable.
This will of course result in a slower device, but that's the tradeoff. Less speed for more battery life.
Do note that the screen is the largest user of power by far and thus you can make the most difference by keeping the backlight as low as tolerable and shut it off whenever you aren't actively using it.
Click to expand...
Click to collapse
Thanks Da_G. I did use SetCPU, and set the speed to 800, but for some reason it is giving me lower battery life compared to without SetCPU. So took it out.
Also, I have my screen brightness turned all the way down with auto set to off.
I meant to ask for a ROM that has all the battery hogging stuff in it removed/optimized.
I am currently like 45% left after about 8 hours with moderate usage. Trying to see if I can stretch more than this.
My today's usage statistics:
1. 11 hours 25 min 4 secs since unplugged
2. Battery remaining: 63%
3. Voice calls: 1h 10m 15s
4. Display: 1h 15m 42s
5. 2 gmail accounts with push turned on with about 10 mails delivered today
6. google voice with push all time with about 100-120 messages delivered using push
a. I do not have SetCPU.
b. I have my brightness set to 0, with auto-brightness turned off.
c. I used SamServMode to turn on EDGE, and 3G turned off since the phone was off charging hook. In short, on EDGE all the time.
d. Static but nice, colored wall paper.
Could anyone suggest me if this is good enough. And any ROM that could get me battery atleast on par with what I am getting.
A few of my ideas:
1. Use a dark colored theme. Our nice SUPER AMOLED screens don't use up much power to draw black - so the more black - the merrier.
2. Be careful of what extra apps running. Things like widget locker are one more app to run. Go slender. Theme's are okay if they replace files like frameworkres.apk but if they run in background (see it under processes) then that's bad.
3. Be extra careful of making sure you are fully charged when you flash. This means, charge, turn off, charge, turn on, charge, flash. I get a little more charge when I go back to eclair stock .
also note that 95% of battery is the screen
Everything else that was said before me was spot on so try that too.
fatttire said:
A few of my ideas:
1. Use a dark colored theme. Our nice SUPER AMOLED screens don't use up much power to draw black - so the more black - the merrier.
2. Be careful of what extra apps running. Things like widget locker are one more app to run. Go slender. Theme's are okay if they replace files like frameworkres.apk but if they run in background (see it under processes) then that's bad.
3. Be extra careful of making sure you are fully charged when you flash. This means, charge, turn off, charge, turn on, charge, flash. I get a little more charge when I go back to eclair stock .
also note that 95% of battery is the screen
Everything else that was said before me was spot on so try that too.
Click to expand...
Click to collapse
Thank you kind sir. I shall do this. But I am not flashing anymore.
I loaded the AOSP ROM from Spaceman here
Code:
http://forum.xda-developers.com/showthread.php?t=827153&page=36
and am getting pretty much the battery backup I was getting with stock.
Thanks a bunch everyone who helped me on this.

My screen's White-Tracking (yours will be different)

I got my replacement unit yesterday (screen lift on an 8GB model) and decided to check the white balance out of curiosity.
I used the Flashlight app from flash-the-brain, which offers a full range of brightness values, though without any numbers to go with them, so the actual brightness is only approximate. I used a Spyder 2 colorimeter (old and slow, but produced readings in line with a newer iDisplay I borrowed a while ago) and the monitor WB pre-calibration mode from my calibration software. Readings were taken where the measurement stabilised, and I generally waited around 30secs to be sure.
100%: 6305
90%: 6225
80%: 6187
70%: 6210
60%: 6235
50%: 6243
40%: 6252
30%: 6212
20%: 6034
10%: 6292
The dip at 20% was reproducible. Below 10% it was impossible to get a stable reading, probably because of light leakage along the glossy screen.
I've calibrated quite a few monitors over the years, and these numbers out-of-the-box are pretty damn good IMHO. But there's no guarantee this will have any relation to the white-balance on other displays.
[Note: For those who aren't into screen calibration, the numbers are all supposed to be 6500K. LCD screens typically vary from this number, in some cases by thousands of Kelvin]
Good data, what color did you use, white? Have you tried a few tones of grey to see how it handles the LCD color but consistent backlight? ie: Leave backlight at whatever is reasonable, 75%, higher? And adjust the background tone.
Not sure if that app will let you do that, but you could create a few png's and view them in JustPictures.
I just used a flashlight app with adjustable colour - the numbers on the left are approximate grey values. The actual backlight intensity remained the same throughout.

[Tutorial] [V20x] Disable / Adjust Thermal Protection for Slow AC Charge & Tegra 3

[Tutorial] [V20x] Disable / Adjust Thermal Protection for Slow AC Charge & Tegra 3
Part 1 - Disabling Thermal Protect during Charging that will result in Slow Charge (USB Current) issue on AC supply
Our LG 4X has an in built function to restrict heat build-up during AC charge, when the phone is already warm after intensive use.
Unrestricted heat build-up will potentially result in damaging chips.
But sometimes even when the use isn't highly intensive under cool envoirment factor the current is still restricted by this somewhat over-sensitive and unadjustable feature. Consequentially when user is using the phone for long duration apps (ie watching movie) while phone is under AC outlet charge battery will still run out, albeit at a slower pace.
Below is the steps to disable this function:
Dial 3845#*880# to enter hidden menu (do not press the green dial button!)
Navigate to 'Module Test'
Navigate to 'Charging Test'
Tick 'Unlimited temperature charging'
Exit Hidden Menu
Charge using AC outlet
If charging cable was already plugged in and in USB current, disconnect and reconnect to see result
Only works on V20x Jellybean ROMs.
Phone restart will return this function to its normal state.
Part 2 - Disable / adjust Tegra auto throttling for thermal protection that will result in game lags during high chip temperature
Besides protecting our devices by controlling heat from charging current, 4x HD also has an inbuilt mechanism to restrict overheating of the chip during intense 3D gaming or graphic heavy applications.
When the heat is detected to have reached a certain level, this mechanism automatically scales down the CPU to prevent anymore excessive heat from being produce. However, scaling down the CPU will also produce significant lag for the user application.
To adjust this function, user will have to follow the guide below:
To adjust this function, user will have to follow the guide below:
Device Requirement: Root, Root capable file browser
Navigate to directory /d/tegra_thermal
Open-for-edit temp_throttle. Set to user preference, typically above 65000
Save
Do the same for temp_throttle_skin
Save
You are now good to go
Settings will revert after phone reboot.
Thanks alekthefirst for his contribution here
USE THIS GUIDE ON YOUR OWN RISK AND DISCRETION. YOU MIGHT DAMAGE THE SILICONE CHIPS / YOUR SIM CARD / SD CARD AFTER PROLONGED USE UNDER HIGH TEMPERATURE CONDITIONS.​
Click to expand...
Click to collapse
I just changed it and it seems to be okay - I'll report back soon.
someth1ng said:
I just changed it and it seems to be okay - I'll report back soon.
Click to expand...
Click to collapse
i like to take screenshot that it works but how do i take screenshot of heat? lol?
This should show that my phone doesn't switch to USB current when the heat is high
Red = Temperature
White = Percentage
Green = Voltage
Botton yellow bar = charge status
White bar = display on
L2Deliver said:
Observed that Low Current warning did not appear even when phone is burning hot (i mean you can bake bacon on it).
Click to expand...
Click to collapse
So thanks for this hint, and bacon joke After all this is MultiPurpose device
is it possible to just increase the temperature ? i think the temperatur protection is very low . Because on v10h never had this prob...
V20B has significantly increased thermal protection activation temperature. To less aggressive user its presense now will hardly be felt.
updated for official V20 release
Do you guys think there's any way to set this, or the changes this implements (it must be changing something, probably in files), into a script or something that could be executed at will (or maybe even through a tool like Tasker)?
skryptus said:
Do you guys think there's any way to set this, or the changes this implements (it must be changing something, probably in files), into a script or something that could be executed at will (or maybe even through a tool like Tasker)?
Click to expand...
Click to collapse
on theory there's a file somewhere, but where is it?
The files for that are named temp_shutdown, temp_throttle and temp_throttle_skin found in /d/tegra_thermal, u can change the values, but next boot overrides. Someone could make a script for Script-Manager, which run after boot and set the values new, or sets high and low via widgets (Script-Manager can create widgts I think)...
U have to change the values to about 71000 or more, shutdown should be left as 90000 (setttings in V20a)
Bogeyof said:
The files for that are named temp_shutdown, temp_throttle and temp_throttle_skin found in /d/tegra_thermal, u can change the values, but next boot overrides. Someone could make a script for Script-Manager, which run after boot and set the values new, or sets high and low via widgets (Script-Manager can create widgts I think)...
U have to change the values to about 71000 or more, shutdown should be left as 90000 (setttings in V20a)
Click to expand...
Click to collapse
doesn't work on charging thermal protection. these settings are for tegra 3's thermal protection by controlling throttle when the heat becomes too high.
L2Deliver said:
doesn't work on charging thermal protection. these settings are for tegra 3's thermal protection by controlling throttle when the heat becomes too high.
Click to expand...
Click to collapse
I thought we talk about both, disable thermal protection of charging (done via hidden menu) and disable thermal protection (down throttling) on overheating, ur right, thats for more cpu power / less throttling...
Bogeyof said:
I thought we talk about both, disable thermal protection of charging (done via hidden menu) and disable thermal protection (down throttling) on overheating, ur right, thats for more cpu power / less throttling...
Click to expand...
Click to collapse
ah right, sorry i didn't catch that.
i can add this topic to first post. thanks
updated first post in tegra thermal protection.
i tested
I tested this no change at all as far as cpu mhz cpu still throttles to 1000mhz to one core when playing anything even the gba emulator it starts fine dual core 1400mhz then when it throttles to 10000mhz one core it lags madly after playing for 5 minutes i thought this would work.
edited thermal-throttle to 80000 i assume 80c
thermal skin to 55000 maybe 55c for outer layer of the phone so your skin won't burn.
L2Deliver said:
on theory there's a file somewhere, but where is it?
Click to expand...
Click to collapse
There are files for each group of two cores under
d\tegra_throtle
listed as
throtle_table0
throtle_table1
but i dont understand how they work
hope you can....!
good luck.......
As i am frustrated with this issue ( brightness falls to 87% and then to 70% after a 10 minutes video playback ) and i am not rooted can you guys confirm that the trick ( Part2) works ?
I ask this because i didn't want to root my phone and this procedure demands root.
ipred said:
As i am frustrated with this issue ( brightness falls to 87% and then to 70% after a 10 minutes video playback ) and i am not rooted can you guys confirm that the trick ( Part2) works ?
I ask this because i didn't want to root my phone and this procedure demands root.
Click to expand...
Click to collapse
for the tegra thermal adjustment you have to be rooted.
btw there's no other phone with easier and safer root method than 4x. and androids are meant to be rooted
L2Deliver said:
for the tegra thermal adjustment you have to be rooted.
btw there's no other phone with easier and safer root method than 4x. and androids are meant to be rooted
Click to expand...
Click to collapse
I rooted my phone, edited and saved the 2 files at 85000 each.During the procedure my temperature had already dropped to 87% due to high temperature and couldn't go up after the edit of the 2 files.Then i waited for phone to get colder and then i watched a 20 minutes youtube video on full screen and with 100% brightness.The brightness didn't fall !!!!
Thanks a lot for the guide !!!

Adaptive Brightness Issue

I've had this weird glitch with adaptive brightness and it seems to happen occasionally. When adaptive brightness is enabled the brightness get's set to 70% ( Estimate ) This doesn't happen all time I would say once a day. When I try and lower the brightness it will not get lowered until I turn adaptive brightness off. The only way I can get adaptive brightness to work correctly is when I power cycle the device. At first I thought it was the light sensor was malfunctioning, but did a test and it seems to be functioning properly.
Things that I have tried:
- *#0*# then went to Sensor then light senor. Confirmed that the sensor is working
- I also cleared data in device care via settings > apps
- Wiped cache partition via recovery
Any ideas? wiping the device is a last resort
Bump
dia_naji said:
I've had this weird glitch with adaptive brightness and it seems to happen occasionally. When adaptive brightness is enabled the brightness get's set to 70% ( Estimate ) This doesn't happen all time I would say once a day. When I try and lower the brightness it will not get lowered until I turn adaptive brightness off. The only way I can get adaptive brightness to work correctly is when I power cycle the device. At first I thought it was the light sensor was malfunctioning, but did a test and it seems to be functioning properly.
Things that I have tried:
- *#0*# then went to Sensor then light senor. Confirmed that the sensor is working
- I also cleared data in device care via settings > apps
- Wiped cache partition via recovery
Any ideas? wiping the device is a last resort
Click to expand...
Click to collapse
The Twilight blue filter works wonders with adaptive brightness on your phone. I love it.

Categories

Resources