up to 1% accuracy battery Mod - Samsung Galaxy Player 4.0, 5.0

I have extracted framework-res.apk from a Galaxy player 5.0(2.2) and put 1% battery mod in it
The file is not tested as i don't have the player at this moment, so TAKE YOUR OWN RISK!
Feedback is appreciated.
View attachment 835896

Let us know if this works, I may root if it does!

I am testing the file with a player bought in hong kong
It seems that for some reasons, the battery level step up or down every 5%
but good news is it should do no harm to your player too

l_ung said:
I am testing the file with a player bought in hong kong
It seems that for some reasons, the battery level step up or down every 5%
but good news is it should do no harm to your player too
Click to expand...
Click to collapse
I suspect that changing the framework-res.apk is not sufficient. My player is also modded to include battery icons for 1% increment but I still see an increment of 5%.
I've looked up some similar mods for other android devices, it seems that modification to the services.jar is needed. e.g. http://forum.xda-developers.com/showthread.php?t=1278136
We may want to look at how it is done on other devices.

The 5% increment appears to go all the way down into the kernel. I've never seen it report anything but 5% increments.
The fuel gauge architecture seems completely different from GalaxyS phones despite the hardware similarities.

BMW shows it going down in 5% increments, but the mV readings are much more accurate. Is there a way to use the mV values for displaying %?

tcat007 said:
BMW shows it going down in 5% increments, but the mV readings are much more accurate. Is there a way to use the mV values for displaying %?
Click to expand...
Click to collapse
Technically yes - if you knew how Maxim's ModelGauge algorithm works. But this is a major trade secret for them, so it's unknown how they manage to get reasonable battery SoC estimations from voltage only.
The problem is that battery voltage depends not just on state of charge, but on load. The moment you connect a charger - BOOM the voltage goes up significantly. Increase load significantly - voltage drops. (And actually, even Maxim's algorithm used in the MAX17040 and 17042 fuel gauges fails here - a heavy load right after a FG reset confuses the chip, making it report low. This is why Galaxy S II devices will experience significant SoC estimate drops when they are rebooted at low battery due to the battery load that happens on boot.)

Related

OEM charger doesn't keep up? Requiring assistance, please!

Hello, guys. I know this post is awfully long, but please, bear with me
I am fairly new to Sammy, as I just got the S2 (I9100, not some other variant... it's the very original) three days ago. I rooted it, flashed CWM, and already tried a few ROMs. I'm sticking to MIUIv4 (WIUI, actually) for the moment, as I loved having MIUI on my previous devices.
There's just one thing that makes me wanna throw rocks at this phone... and that's not the Super AMOLED+ screen that has stains / ghosting effect... it's the CHARGER.
I believe the charger I'm using is original - it was in the package, so... it can't be a copy, lol. It says it can output 700mA at 5V, which is pretty standard... but it seems like it just doesn't do its job!!!
I've had three HTC devices before, and the HTC charger is just a brick that you plug into the socket, and then plug a USB cable in it (just like Motorola's and Apple's recently). It outputs 1A at 5V.
The Motorola ATRIX I previously owned had a charger that was outputting 850mA at 5.1V. Charging that 1900 mAh beast battery would take just a little over 3 hours!
I no longer own the ATRIX (sold it to get the S2, actually), but I did borrow a HTC charger (with a HTC USB cable) to see if I could charge my S2 faster. Nopes. The charger barely gave the S2 0.5 amps... which is normal, since I hear two pins must be connected in order for the Samsung phone to draw maximum power.
My Galaxy S2 is charging painfully slow with this original charger. I installed Battery Monitor Widget and let it log the battery charging overnight - the log file is attached below this post.
At the very first line of that text file, you can see the charging began. I let the phone turned on, with the screen off, to charge overnight. Wi-Fi, Mobile Data, BT, GPS, Auto-sync was off. It was just in auto 2G/3G mode. That hardly matters!
It looks like the phone is drawing 641mA constantly. It doesn't top 700mA, but that's okay - neither did the HTC phones reach more than 900mA, when the charger was able of 1A output.
It took the SGS2 exactly two hours and 50 minutes to fully charge. Given the fact that the charger outputs 700mA, and the battery is 1650mA, I'd say that's right. A 1900mAh battery was completely charged in 3 hours and something, with a 850mA output charger.
Still, that's painfully slow. I had the HTC EVO 3D, which has a 1730mAh battery. Charging that (@1A) would take little over two and a half hours. I could even browse the web via Wi-Fi or do something else on the phone and the battery would still be completely charged in less than three hours (unless I play a game on 3G with max brightness on, of course).
Also, when the battery was at 1% at lunchtime, I plugged in the charger. I continued to send text messages and browse the web via Wi-Fi (screen brightness was on minimum). The battery level did not rise from 1% even after 5 minutes! You can see that in the battery log. Yes, the phone's battery was almost dead in less than three hours.
Oh, also, the first day I got the phone, after I finished rooting and flashing MIUI and everything... I was playing Dark Legends, over Wi-Fi (screen was at lowest, again). Battery got down to 6%, I plug it into the charger. Ten minutes later, battery was down to 2% ! ! ! So, the charger cannot keep up !
I did my homeworks and did a "bit" of Google searching... it turns out the charger is just as it is. But this is just ridiculous.
-----
I remember seeing something on Twitter several months ago... an article regarding an app that would let you adjust how much power the Galaxy S2 can draw from the charger it's connected to, simply by dragging around a slider. I'm not wrong, I DID see such an article - I just can't find it anymore!
Anyone... any suggestions, please?
Also, please note that I am in Europe, Romania, so I can't just go to a shop and find the most awesome charger that outputs 2A for $5 like you guys can (there, in the US)... It's not really at hand for me, lol.
So, conclusion is the phone can consume more amps during usage than the stock charger can supply.
Either reduce the power usage (lower brightness, disable WiFi/BT) when you're using the phone during charging or get a more powerful charger (although I remember the latest stock ICS kernels don't like charging at a higher voltage than the stock charger supplies, so you'll probably have to install a different kernel which doesn't have this limitation).
Oh, and please stop the non-sense about being in Romania and not having options to buy, the market's full of all kinds of chargers. Get out of the house and search, "lol".
This is not uncommon.
In fact, with my PREVIOUS phone, the SE Mini Pro (the original one), it was actually possible to drain the battery till the phone shut down, even on it's original charger.
With some modified power settings, mostly in CPU voltages, it is quite possible to have the SII charge properly even while in use, but bear in mind, it will take longer to charge if you are using it.
VAXXi said:
So, conclusion is the phone can consume more amps during usage than the stock charger can supply.
Either reduce the power usage (lower brightness, disable WiFi/BT) when you're using the phone during charging or get a more powerful charger (although I remember the latest stock ICS kernels don't like charging at a higher voltage than the stock charger supplies, so you'll probably have to install a different kernel which doesn't have this limitation).
Click to expand...
Click to collapse
Playing Dark Legends, via 3G this time (so the power consumption would be higher, right?), screen at FULL BRIGHTNESS, Bluetooth and GPS activated. Battery Monitor Widget tells me the current being drawn is 641mA. Looks like the phone draws 641mA when charging, ~80% of the time.
The only problem seems to be when the battery level is LOW. Then, no matter what you do, the power level just doesn't rise.
With HTC / Motorola, the power draw was maximum when the battery was at its (almost) lowest level, and would decrease as the battery was filling. With the SGS2, it looks like it draws 640mA from 0% to 70%, THEN it begins to slow down.
VAXXi said:
Oh, and please stop the non-sense about being in Romania and not having options to buy, the market's full of all kinds of chargers. Get out of the house and search, "lol".
Click to expand...
Click to collapse
Oh, but trust me, I have. You know, in our country, even cheap Chinese copies are over-rated. It's hard to find stuff like what they have in the US .
I've seen some sort of a digital charger, so-to-say, which would allow you to set the amperage and voltage that was being outputted. It was able of throwing out anything from .5 to 2 amps, at 3.7 - 5.5V (given your choice). Guess what : friend got it from the States...
You don't see such stuff here, in Romania.
Oh well...
Sideromelane said:
This is not uncommon.
In fact, with my PREVIOUS phone, the SE Mini Pro (the original one), it was actually possible to drain the battery till the phone shut down, even on it's original charger.
With some modified power settings, mostly in CPU voltages, it is quite possible to have the SII charge properly even while in use, but bear in mind, it will take longer to charge if you are using it.
Click to expand...
Click to collapse
On the HTC EVO 3D and Motorola ATRIX, it was yet to be proven whether undervolting the CPU would increase battery life or not. Undervolting as much as 200mV only reduced the ammount of heat that was generated (especially during gaming sessions). Although current = heat... the power consumption didn't seem to change a bit!
I even tried to downclock the CPU to 400 MHz - power draw would still not be sufficient in order for the phone to charge (when the battery level was under 10%). Everything was turned off, light on lowest, CPU pretty low... still going down, lol.
I have also experienced this in the past.... which was rather annoying if I must say however, recently I haven't had this issue, although it still charges quite slowly, it's slightly faster than before. I noticed this difference after I decreased the voltage from the cpu in each step, yes my phone is heavy undervolted thanks to magic config, might want to check that out, but it's still as smooth as ever without a hint of lag props to the hyperdroid team...they are the best in my opinion, I use their rom since the hd2 days recommend their rom to all galaxy s2 users.
Anyway, my point is, I can have my screen in full brightness and still use the phone as is when off charge and it will continue to charge. Also, battery life isn't an issue for me anymore after undervolting, I can live with 15 hours battery life under extreme heavy usage with full screen brightness of 4-5 or more hours of screen on time....and that's with 1650mah battery. I plan to get an official 2000mah battery which will increase it's life more
Samsung Galaxy SII Xtreme ED
Xtreme Energy-Xtreme Power to Live
Impossible made Possible
shadyr25 said:
I have also experienced this in the past.... which was rather annoying if I must say however, recently I haven't had this issue, although it still charges quite slowly, it's slightly faster than before. I noticed this difference after I decreased the voltage from the cpu in each step, yes my phone is heavy undervolted thanks to magic config, might want to check that out, but it's still as smooth as ever without a hint of lag props to the hyperdroid team...they are the best in my opinion, I use their rom since the hd2 days recommend their rom to all galaxy s2 users.
Anyway, my point is, I can have my screen in full brightness and still use the phone as is when off charge and it will continue to charge. Also, battery life isn't an issue for me anymore after undervolting, I can live with 15 hours battery life under extreme heavy usage with full screen brightness of 4-5 or more hours of screen on time....and that's with 1650mah battery. I plan to get an official 2000mah battery which will increase it's life more
Samsung Galaxy SII Xtreme ED
Xtreme Energy-Xtreme Power to Live
Impossible made Possible
Click to expand...
Click to collapse
That's... impressive.
I'm using MIUIv4 (WIUI) wth Siyah v3.2.6.3 kernel. For some reason, if I undervolt even -50mV, the phone freezes :/
Formhault said:
That's... impressive.
I'm using MIUIv4 (WIUI) wth Siyah v3.2.6.3 kernel. For some reason, if I undervolt even -50mV, the phone freezes :/
Click to expand...
Click to collapse
That's.... weird. I thought siyah kernal was more undervolt friendly :/ besides, I read somewhere that not every galaxy s2 can handle undervolting whilst some can. Rather, it could be the kernal too, I use the redpill kernal provided from the hyperdroid team, it's not the best in benchmark wise but what the heck... it doesn't stop to lag, it's extremely fast and responsive, great battery life, undervolt support for further improvements... you won't even notice any slowness compared to high benchmark devices. Red pill kernal is well optimised. I use noop scheduler and conservative governor, it's amazing how redpill handles this. Try it some time. Could solve your problem.
Samsung Galaxy SII Xtreme ED
Xtreme Energy-Xtreme Power to Live
Impossible made Possible
Formhault said:
The only problem seems to be when the battery level is LOW. Then, no matter what you do, the power level just doesn't rise.
Click to expand...
Click to collapse
Just like your 48x CD burner doesn't write at 48x from start to finish, that's how the charging current is not constant; it depends on the remaining capacity, charging algorithms, etc. You're using a special case and asking too much, the solution has been given already (powerful charger and modified kernel to allow a higher charging current and voltage).
Formhault said:
You don't see such stuff here, in Romania.
Click to expand...
Click to collapse
Yes you do. I got a 1A Energizer charger which really gives 1A for less than 10$. The variable supply you're describing can be found in any proper electronics shop, try "Maica Domnului" street
VAXXi said:
Just like your 48x CD burner doesn't write at 48x from start to finish, that's how the charging current is not constant; it depends on the remaining capacity, charging algorithms, etc. You're using a special case and asking too much, the solution has been given already (powerful charger and modified kernel to allow a higher charging current and voltage).
Click to expand...
Click to collapse
Yeah, I know that. That's exactly what I'm saying. The algorithm is different on the S2, it seems.
On all HTC devices I had, the current draw was at its highest (~900mA) when the battery was near depletion, and as the battery was filling up, the current draw was slowly decreasing. On the S2, it looks like it's the other way around. When the battery is nearly empty (1%), barely 100mA are being drawn. As it fills up, near 10% or so, the current draw remains steady at ~641mA, and decreases only past the 70% point.
Good thing is, the current draw remains steady at 641mA, no matter how much I stress the phone! That's astonishing - the other day, the battery was LEAKING 600mA instead of GETTING 641mA when the simplest tasks were done (no stress, that is), during charging...
Guess the guy who had this phone before me didn't really ever charge up the battery properly He said he had an iPhone charger back at home; I told him "nevermind, keep it".
shadyr25 said:
That's.... weird. I thought siyah kernal was more undervolt friendly :/ besides, I read somewhere that not every galaxy s2 can handle undervolting whilst some can. Rather, it could be the kernal too, I use the redpill kernal provided from the hyperdroid team, it's not the best in benchmark wise but what the heck... it doesn't stop to lag, it's extremely fast and responsive, great battery life, undervolt support for further improvements... you won't even notice any slowness compared to high benchmark devices. Red pill kernal is well optimised. I use noop scheduler and conservative governor, it's amazing how redpill handles this. Try it some time. Could solve your problem.
Samsung Galaxy SII Xtreme ED
Xtreme Energy-Xtreme Power to Live
Impossible made Possible
Click to expand...
Click to collapse
The benchmarks are simply amazing; even with the CPU downclocked to 800 MHz...
I'll look for that kernel, hope it's MIUIv4-compatible. Thank you!
VAXXi said:
Yes you do. I got a 1A Energizer charger which really gives 1A for less than 10$. The variable supply you're describing can be found in any proper electronics shop, try "Maica Domnului" street
Click to expand...
Click to collapse
Everyone's talking about a specific shop down that street... and I never got to actually go there. Guess I gotta look for it... Was kind of doubting it was much of a big deal.
-----
I thought posts made within a specific time range were supposed to merge... That obviously didn't happen. Sorry for the multi post

Script to control Nexus 10 charge between 35%-55%

According to battery university, the optimal charge level for storage is 40%, and it's best to limit your depth of discharge as much as possible. Thinkpads have had a function to do just that, with the excellent tp_smapi module enabling the functionality under Linux.
I turns out Nexus 10 with OmniROM has a way to disable charging even when the AC power is plugged in via the file /sys/devices/virtual/power_supply/manta-battery/charge_enabled. I've created a script that uses this functionality to keep charge between 35%-55%. You can modify STOPLIMIT and STARTLIMIT to with desired charge levels. You can optionally create /data/local/etc/battery/STOPLIMIT and /data/local/etc/battery/STARTLIMIT and put the values in there. Those values would override the values in the script.
I start the service with 3C Toolbox Pro with a script that calls
Code:
su -c /data/local/bin/charge_control.sh &
Requirements:
Device: Nexus 10
ROM: OmniROM HOMEMADE20141102
Rooted
busybox installed
The ROM can be found in this thread: http://forum.xda-developers.com/showthread.php?t=2705229
It may work under other configurations, but above is the configuration I've tested it under. Battery university reference: http://batteryuniversity.com/learn/article/how_to_prolong_lithium_based_batteries
Expected increase in battery longevity
Battery longevity (to 80% original life) should increase from under 1 year to over 5 years by using this script. More below.
The battery university article indicates the battery will last from 300-500 cycles with a full depth of discharge, and 150-250 cycles with maximum charge voltage of 4.3V. The Nexus 10 does charge with very high voltages above 4.3V to get the battery to 100% charge. That means your battery will last less than a year in the most extreme cases. For example, your battery will have 80% capacity after 300 days if you do a full charge every other day with 4.3V. My device reached the 80% battery life cycle in about 1 year, and then got progressively and rapidly worse, until I replaced the battery with 40% original life after 20 months.
With this script, battery life should increase to 1200-2500 cycles between 25%-50% depth of discharge, and 1200-2000 cycles with battery voltage limited to under 4V at full charge. So battery life should increase to 6.5 years up to over 13 years charging it up to 55% every day!
I have had this tablet since release and always plug it into the charger when going to sleep. I typically use the device from 100% to 60% each day. This device is over 2 years old now and still has the same screen on time each charge cycle as day one.
Thanks for sharing.
esprout said:
According to battery university, the optimal charge level for storage is 40%, and it's best to limit your depth of discharge as much as possible. Thinkpads have had a function to do just that, with the excellent tp_smapi module enabling the functionality under Linux.
I turns out Nexus 10 with OmniROM has a way to disable charging even when the AC power is plugged in via the file /sys/devices/virtual/power_supply/manta-battery/charge_enabled. I've created a script that uses this functionality to keep charge between 35%-55%. You can modify STOPLIMIT and STARTLIMIT to with desired charge levels. You can optionally create /data/local/etc/battery/STOPLIMIT and /data/local/etc/battery/STARTLIMIT and put the values in there. Those values would override the values in the script.
I start the service with 3C Toolbox Pro with a script that calls
Code:
su -c /data/local/bin/charge_control.sh &
Requirements:
Device: Nexus 10
ROM: OmniROM HOMEMADE20141102
Rooted
busybox installed
The ROM can be found in this thread: http://forum.xda-developers.com/showthread.php?t=2705229
It may work under other configurations, but above is the configuration I've tested it under. Battery university reference: http://batteryuniversity.com/learn/article/how_to_prolong_lithium_based_batteries
Click to expand...
Click to collapse
Could you point me in the right direction so that I could run this script? I'm on Dirty Unicorns ROM.
omgi0wn said:
Could you point me in the right direction so that I could run this script? I'm on Dirty Unicorns ROM.
Click to expand...
Click to collapse
Check that your kernel supports the system interface /sys/devices/virtual/power_supply/manta-battery/charge_enabled. You need to be rooted, and then you can open a terminal and
Code:
cat /sys/devices/virtual/power_supply/manta-battery/charge_enabled
to make sure the file exists to control charging.
The script also relies on /sys/devices/virtual/power_supply/manta-battery/capacity to check battery capacity. You can similarly check with:
Code:
cat /sys/devices/virtual/power_supply/manta-battery/capacity
But if you have charge_enabled in that folder, you most likely also have capacity as well.
After that, you would simply run the script with ./charge_control.sh &
mymusicathome said:
I have had this tablet since release and always plug it into the charger when going to sleep. I typically use the device from 100% to 60% each day. This device is over 2 years old now and still has the same screen on time each charge cycle as day one.
Click to expand...
Click to collapse
Looks like someone won the battery lottery. My tablet shuts down before it even gets to 50% charge these days, it's super frustrating.
Has anyone tried this on stock Lollipop?
_Raziel666 said:
Has anyone tried this on stock Lollipop?
Click to expand...
Click to collapse
Confirm work on stock Lollipop 5.1.1 (LMY48I).
Since,
Code:
/sys/devices/virtual/power_supply/manta-battery/capacity
was not found, after some time of browsing I've found
Code:
/sys/devices/virtual/power_supply/manta-battery/subsystem/ds2784-fuelgauge/capacity
You'll need to modify the respective line 22 in script to
Code:
charge=$(cat /sys/devices/virtual/power_supply/manta-battery/subsystem/ds2784-fuelgauge/capacity)
Good advice.. I usually change it to 80% seems to still last a lot and I got it 1 month after the release.
I never charge it to 100% since I know it will mess up the battery.
Is it possible to find "charge_enabled" for Nexus 7 (2013, flo, razor) in Android KitKat 4.4.4?
"online" and "capacity" can be found easily in "sys/class/power_supply".
I've tried "lsof | grep healthd", but didn't identify read/write flag "charge_enabled" or similar.
Recently found a solution by customizing kernel here: Battery life extender
However applying this patch to stock kernel is not a solution for ordinary user.
shcholeh said:
Recently found a solution by customizing kernel here: Battery life extender
However applying this patch to stock kernel is not a solution for ordinary user.
Click to expand...
Click to collapse
Did it work for you? If so, can you tell me what control files you edited and what android version you are on?
Im on LineageOS 14.1 and i tried changing the enable_charge value to one but the app still said my device is not supported (yet).

ZeroLemon Fuel Gauge Fix Samsung Galaxy Note 4 [BETA]

First Beta Release on Lollipop BioShock
Alright guys, I have shaped this mod up to the best of my abilities and I present to you the Bravo version of it. I will get other kernel versions of this mod out but in the mean time I am sticking with the Original work space one based off of the Lollipop BioShock 3.10.40. I know this is the older version, but I will mass update ALL the kernels really soon. Basically everything (even the app) are enclosed into 1 ZIP file so all you have to do is flash the Kernel and you are ready to go. A couple of things I would like to get out there:
1. You should have a Fully charged ZL Battery. I wouldn't say before flashing this as you can re-calibrate the app, but I would recommend that you do so to avoid any confusion.
2. When you charge the battery with this mod, yes the percentage does charge fast and it will most likely show 100% BEFORE the battery reaches 100%. There is a issue with the current/mA flow readings IN the app and that will be fixed in the near future. Please understand that TRUE 100% is when the phone says "Fully Charged 100%, Unplug Charger" not when the Fuel gauge (next to the clock) says 100%.
3. Some people ask "Will the app Accurately calculate the battery to avoid shutting down at lets say 15% or still running 1% for days like normal"? And the answer to that is most likely Yes, and Possibly no. I say yes to the first part because you can put in the different drain values of each component in the Note 4 so that the app can detect the draining and calculate accordingly. Now, I will warn you that I have never used this mod to do a full complete drain. So I will say I wouldn't recommend letting the battery go all the way down to 15% (just as a safety net if you plan on going out, etc) in-case the battery does hit 3.4 volts which is the Note 4's 0% Shutdown target. And the 1% mod is almost unlikely.
4. Finally, I have received your messages and Emotion Kernel seems to be the popular Kernel at this time (I will be using it in the coming days also) so I will get to that next once I get the source code loaded. (KitKat users, you are not forgotten) I will also be posting the Kernel files so that Kernel devs can make different variants once I hear from you guys on how this mod is working. To me, I think its great. From the way it was before I can say its a Improvement from the drain calculation side. The charging side needs work, but hey, you hardly have to charge the dang thing anyways lol.
Now to the Installation
Of course, I would recommend that you do a backup of course and that you have a backup kernel with you. Basically, if you can use this kernel http://forum.xda-developers.com/note...-2014-t2962744 It should work.
Once you have flashed the file below "BioShock_N910T_TW_LP_Extended_Battery_Mod_OFFICIA L_BRAVO.zip", you should also wipe delvik and cache just to make sure everything goes smoothly. If the mod was successfully installed, your battery level should read "101%". It will read 101% every time you reboot just to keep things clean and then go back to the App's fuel gauge level 1 minute after boot.
If it shows 101%, go into your Apps and you should see a App called "Fuel Gauge Extended..." Open that app up and wait about 3-5 seconds for everything to populate (Done to keep battery usage down). Make sure to check Start on Boot if you want the service to start with the phone (which I think EVERYONE should do) and then tap start monitor. You might get a SuperSU permission screen which you want to grant permissions to. Once you see the Status saying "Running" go down to the debug area to the "Patch Status" string and it should report "ok/[success]]" and your real battery gauge should read whatever the Software Status says.
This app also doesn't have the on screen dedicated 3-dot menu buttons so you have to go old fashioned and how down the left menu soft-key for a second until a menu pops up at the bottom which shoes Start Full Charge, Set full battery, and configuration. This is where you can calibrate your battery so that once you fully charged your battery, you go into the app and select "Set full battery" to set the app and battery capacity to 100%. Please note that this will take anywhere from 30 seconds to 1 minute to update the battery meter globally. You don't want to press either one of these when you already have calibrated the battery before and you are at half a charge as you will lose your capacity remaining level and accuracy until you fully charge again.
Under configuration, you can make the app calibrate to 100% every time your phone displays "Fully charged, disconnect charger". You can also disable the notification under Notification Icon.
Hardware current is where you can change the different consumption values of each component. I wouldn't mess around here too much as you could create a imbalance within the app calculations.
And basically that's pretty much it. IF and SHOULD you have any problems, just reply here or shoot me a PM and I will help you to the best of my abilities.
Thank you guys for your patience and I hope you enjoy this beta mod.
About the values that you input, this would lead to inconsistencies wouldn't it? Like how would we be able to know the exact values? Is it possible to use the values in the Fuel Gage chip?
e.g. It still says there is charge in the battery, but there is none, and the phone just switches off in the middle of use?
jayden485 said:
About the values that you input, this would lead to inconsistencies wouldn't it? Like how would we be able to know the exact values? Is it possible to use the values in the Fuel Gage chip?
e.g. It still says there is charge in the battery, but there is none, and the phone just switches off in the middle of use?
Click to expand...
Click to collapse
While this maybe true, you also have to take into consideration that the battery already does this without this mod when it stays at 1% for extended periods of time. Also, there is a file in the framework-res.apk that has all the power profiles of each component in its mAH values. But I am pretty sure with this mod, I wouldn't think you would drain the battery all the way to 2 or 5% expecting to go another day or to go to work with it. When you get down to 5%, the screen dims automatically so that alone would force people to charge the phone. But that is a good question. Now the ONLY Time the percent values would be off is when you use the phone in recovery mode for extended periods of time or when you charge the phone when the phone is off, you have to go into the app and reset to 100%. I am working on a code which makes the percent automatically go to 100% when voltages hit fully charged.
7 Hours off battery.
Sent from my SM-N910T using XDA Free mobile app
TheLoneWolf20 said:
While this maybe true, you also have to take into consideration that the battery already does this without this mod when it stays at 1% for extended periods of time. Also, there is a file in the framework-res.apk that has all the power profiles of each component in its mAH values. But I am pretty sure with this mod, I wouldn't think you would drain the battery all the way to 2 or 5% expecting to go another day or to go to work with it. When you get down to 5%, the screen dims automatically so that alone would force people to charge the phone. But that is a good question.
Click to expand...
Click to collapse
So we don't have to find values? Is that how the Fuel Gage chip does it? How confident are you in how accurate this will be?
jayden485 said:
So we don't have to find values? Is that how the Fuel Gage chip does it? How confident are you in how accurate this will be?
Click to expand...
Click to collapse
The fuel chip uses voltage levels as well as values stored in the kernel to come up with a near accurate reading. What I can do is put the stock battery in and set the app to the stock capacity and see if the app capacity matches up with the Fuel gauge capacity. But I am pretty confident that it will be accurate. Again, even if we get to 5 or 3% battery before shut down, its MUCH better than getting to 1% and still have 55% battery left. And that can be fixed.
The app can tell the different brightness levels from 0 to 255, Rather bluetooth, wifi, gps is on or off, talking on phone, etc. and it auto adjusts accordingly.
Sent from my SM-N910T using XDA Free mobile app
Now we are cooking with gasoline
It couldn't be any worse than not doing anything so.
Sent from my SM-N910T using XDA Free mobile app
following this thread to see results, as my zerolemon is yet to arrive later this month so can't really test anything
Warnahly said:
following this thread to see results, as my zerolemon is yet to arrive later this month so can't really test anything
Click to expand...
Click to collapse
Alright no problem. I didn't release anything yet until I make sure everything is super stable.
I'm waiting for the release
I had to delay releasing the beta because I found a major issue with the current polling fix which shut down charging prematurely because it didn't poll any Temperature and Voltage levels form the Thermistors. But I have found the string I was looking for all along and I will begin going the back door way. Once I can get that done, I will have no problem releasing the beta for testing. Before I officially post it on here, I want to give it to a select people first to let them try it out and report back to me any issues they encounter so if you are interested in Testing it, please send me a PM. I have a couple of people already down. ALSO, Please put down what kernel you are using, The Source Code link of the kernel and the Variant of your Note 4. I am working with the BioShock Kernel right now and I am planning to do a Emotion version as well. For those who are on AOSP or AOKP kernels / ROMS shoot me a PM and I can see what I can do. Once again, I want to thank you guys for your continued patience.
One more thing, It also helps to charge your ZL Battery all the way to 100%
Congrats! Persistence pays off.
Emotion kernel for me
I finally got the polling redirected so that the phone still reads the Temp, Voltage, Current, and other values which makes sure that the battery remains safe. Only the calculated capacity from the App will go through the system. I could release it right now, but I want to fix one more value before it passes me.
Running more test before I pass it on to some of you guys for your testing. I have the Temperature, Current and Voltage sensors working now I just need to make the current percent value stick with the file so when I do a restart, it doesn't jump up.
Sent from my SM-N910T using XDA Free mobile app
First Beta Release on Lollipop BioShock
Alright guys, I have shaped this mod up to the best of my abilities and I present to you the Bravo version of it. I will get other kernel versions of this mod out but in the mean time I am sticking with the Original work space one based off of the Lollipop BioShock 3.10.40. I know this is the older version, but I will mass update ALL the kernels really soon. Basically everything (even the app) are enclosed into 1 ZIP file so all you have to do is flash the Kernel and you are ready to go. A couple of things I would like to get out there:
1. You should have a Fully charged ZL Battery. I wouldn't say before flashing this as you can re-calibrate the app, but I would recommend that you do so to avoid any confusion.
2. When you charge the battery with this mod, yes the percentage does charge fast and it will most likely show 100% BEFORE the battery reaches 100%. There is a issue with the current/mA flow readings IN the app and that will be fixed in the near future. Please understand that TRUE 100% is when the phone says "Fully Charged 100%, Unplug Charger" not when the Fuel gauge (next to the clock) says 100%.
3. Some people ask "Will the app Accurately calculate the battery to avoid shutting down at lets say 15% or still running 1% for days like normal"? And the answer to that is most likely Yes, and Possibly no. I say yes to the first part because you can put in the different drain values of each component in the Note 4 so that the app can detect the draining and calculate accordingly. Now, I will warn you that I have never used this mod to do a full complete drain. So I will say I wouldn't recommend letting the battery go all the way down to 15% (just as a safety net if you plan on going out, etc) in-case the battery does hit 3.4 volts which is the Note 4's 0% Shutdown target. And the 1% mod is almost unlikely.
4. Finally, I have received your messages and Emotion Kernel seems to be the popular Kernel at this time (I will be using it in the coming days also) so I will get to that next once I get the source code loaded. (KitKat users, you are not forgotten) I will also be posting the Kernel files so that Kernel devs can make different variants once I hear from you guys on how this mod is working. To me, I think its great. From the way it was before I can say its a Improvement from the drain calculation side. The charging side needs work, but hey, you hardly have to charge the dang thing anyways lol.
Now to the Installation
Of course, I would recommend that you do a backup of course and that you have a backup kernel with you. Basically, if you can use this kernel http://forum.xda-developers.com/not...pment/kernel-bioshock-1-5-dec-4-2014-t2962744 It should work.
Once you have flashed the file below "BioShock_N910T_TW_LP_Extended_Battery_Mod_OFFICIAL_BRAVO.zip", you should also wipe delvik and cache just to make sure everything goes smoothly. If the mod was successfully installed, your battery level should read "101%". It will read 101% every time you reboot just to keep things clean and then go back to the App's fuel gauge level 1 minute after boot.
If it shows 101%, go into your Apps and you should see a App called "Fuel Gauge Extended..." Open that app up and wait about 3-5 seconds for everything to populate (Done to keep battery usage down). Make sure to check Start on Boot if you want the service to start with the phone (which I think EVERYONE should do) and then tap start monitor. You might get a SuperSU permission screen which you want to grant permissions to. Once you see the Status saying "Running" go down to the debug area to the "Patch Status" string and it should report "ok/[success]]" and your real battery gauge should read whatever the Software Status says.
This app also doesn't have the on screen dedicated 3-dot menu buttons so you have to go old fashioned and how down the left menu soft-key for a second until a menu pops up at the bottom which shoes Start Full Charge, Set full battery, and configuration. This is where you can calibrate your battery so that once you fully charged your battery, you go into the app and select "Set full battery" to set the app and battery capacity to 100%. Please note that this will take anywhere from 30 seconds to 1 minute to update the battery meter globally. You don't want to press either one of these when you already have calibrated the battery before and you are at half a charge as you will lose your capacity remaining level and accuracy until you fully charge again.
Under configuration, you can make the app calibrate to 100% every time your phone displays "Fully charged, disconnect charger". You can also disable the notification under Notification Icon.
Hardware current is where you can change the different consumption values of each component. I wouldn't mess around here too much as you could create a imbalance within the app calculations.
And basically that's pretty much it. IF and SHOULD you have any problems, just reply here or shoot me a PM and I will help you to the best of my abilities.
Thank you guys for your patience and I hope you enjoy this beta mod.
Awesome work man, I look forward to using this. On lollipop it seems my zL runs about a 15% battery difference from actual to estimated. This would be of great help.
:good::good:
JDevil said:
Awesome work man, I look forward to using this. On lollipop it seems my zL runs about a 15% battery difference from actual to estimated. This would be of great help.
:good::good:
Click to expand...
Click to collapse
No problem, I am happy it is working for you.
TheLoneWolf20 said:
No problem, I am happy it is working for you.
Click to expand...
Click to collapse
Ah, I have yet to test the mod. Have to do a backup first because I'm not too sure bioshock will run Verizon without complications. I haven't tried any other kernels running Jasminerom with kexec.

Degraded battery BCL device lag

I've noticed a lot of posts on the subreddit recently complaining about lag when under a claimed particular battery percentage. This will explain the functional reason and allow some insight into perhaps modification using root.
I got my A7 new only a few months ago so my battery hasn't degraded enough to have the issue yet. I did notice the lagging symptom before I ran my battery flat recently. I've got an interest in battery life after modding around on my last device a Sony Z3C and since then the A7 too.
From experience I know /sys/class/power_supply/bms/device/v_cutoff_uv 3200000 is the voltage threshold at which my Z3C shuts down. Battery configuration varies a lot by models, the A7 lacks this writable file.
On the A7 I found these related writable files in /sys/class/power_supply/bcl/device/
high_threshold_ua 4200000
low_threshold_ua 3400000
vph_high_thresh_uv 35000000
vph_low_thresh_uv 3300000
Google search provides this generic related documentation. The initial description paragraphs translated in lay terms describes a CPU throttling function based on battery voltage and current load limits. https://android.googlesource.com/ke...mentation/devicetree/bindings/arm/msm/bcl.txt
Of direct interest is "vph-low-threshold-uv: The battery voltage threshold below which the BCL driver starts monitoring the battery current thresholds and mitigates the CPU on the event of high load."
Also "vph-high-threshold-uv: The battery voltage threshold above which the BCL driver clears the previously applied mitigation, disables the battery current monitoring, and starts monitoring for low battery voltage."
The "-threshold-uamp" descriptions don't match the A7's provided values of seemingly voltage rather than micro amps. Assuming they're voltages of 4.2 and 3.4 but I can't guess how they take effect.
What this means for those with slowed devices under a particular percentage, check your battery voltage to see if this is the cause using a battery app or something like DevCheck. BMS State of Charge fuel gauge percentage is a varying arbitrary number influenced by numerous functions and algorithms, in other words it's a meaningless number to troubleshoot. If your battery voltage is under 3.3V at something like 50%, your battery is severely degraded and the fuel gauge is completely off, you could perhaps try setting /sys/module/qpnp_fg/parameters/restart 1 (it will restart fuel gauge calibration and the setting will automatically go back to 0). Alternatively we could try to disable the Battery Current Limit but I suspect the purpose of it is to prevent Nexus 6P style sudden early shutdowns which require an external charger to jump start them again. In any case at least this info will help those diagnose why and how degraded their battery is.
Infy_AsiX said:
I've noticed a lot of posts on the subreddit recently complaining about lag when under a claimed particular battery percentage. This will explain the functional reason and allow some insight into perhaps modification using root.
I got my A7 new only a few months ago so my battery hasn't degraded enough to have the issue yet. I did notice the lagging symptom before I ran my battery flat recently. I've got an interest in battery life after modding around on my last device a Sony Z3C and since then the A7 too.
From experience I know /sys/class/power_supply/bms/device/v_cutoff_uv 3200000 is the voltage threshold at which my Z3C shuts down. Battery configuration varies a lot by models, the A7 lacks this writable file.
On the A7 I found these related writable files in /sys/class/power_supply/bcl/device/
high_threshold_ua 4200000
low_threshold_ua 3400000
vph_high_thresh_uv 35000000
vph_low_thresh_uv 3300000
Google search provides this generic related documentation. The initial description paragraphs translated in lay terms describes a CPU throttling function based on battery voltage and current limits. https://android.googlesource.com/ke...mentation/devicetree/bindings/arm/msm/bcl.txt
Of direct interest is "vph-low-threshold-uv: The battery voltage threshold below which the BCL driver starts monitoring the battery current thresholds and mitigates the CPU on the event of high load."
Also "vph-high-threshold-uv: The battery voltage threshold above which the BCL driver clears the previously applied mitigation, disables the battery current monitoring, and starts monitoring for low battery voltage."
The "-threshold-uamp" descriptions don't match the A7's provided values of seemingly voltage rather than micro amps. Assuming they're voltages of 4.2 and 3.4 but I can't guess how they take effect.
What this means for those with slowed devices under a particular percentage, check your battery voltage to see if this is the cause using a battery app or something like DevCheck. BMS State of Charge fuel gauge percentage is a varying arbitrary number influenced by numerous functions and algorithms, in other words it's a meaningless number to troubleshoot. If your battery voltage is under 3.3V at something like 50%, your battery is severely degraded and the fuel gauge is completely off, you could perhaps try setting /sys/module/qpnp_fg/parameters/restart 1 (it will restart fuel gauge calibration and the setting will automatically go back to 0). Alternatively we could try to disable the Battery Current Limit but I suspect the purpose of it is to prevent Nexus 6P style sudden early shutdowns which require an external charger to jump start them again. In any case at least this info will help those diagnose why and how degraded their battery is.
Click to expand...
Click to collapse
Just curious since you pointed this out and me finding this delightful information, I'm at 92% right now with a voltage of 4064 MV, is that a bad sign of battery degradation?
troy5890 said:
Just curious since you pointed this out and me finding this delightful information, I'm at 92% right now with a voltage of 4064 MV, is that a bad sign of battery degradation?
Click to expand...
Click to collapse
Can't really know by that. Easier to notice at the low end, if you get the CPU lag under a particular percentage, check if voltage is below 3.3V.
Sent from my ZTE Axon 7 using XDA Labs
Infy_AsiX said:
Can't really know by that. Easier to notice at the low end, if you get the CPU lag under a particular percentage, check if voltage is below 3.3V.
Click to expand...
Click to collapse
I did it get a little lag when I was playing an emulation at 15%. I checked and it had a voltage of 3504 MV.
troy5890 said:
I did it get a little lag when I was playing an emulation at 15%. I checked and it had a voltage of 3504 MV.
Click to expand...
Click to collapse
Hm checking after when there's less current load won't show the real time voltage drop. To examine the BCL effect, probably need to watch voltage in real time, IIRC watching CPU freqs also shows the throttling. DevCheck pro can overlay cpu freqs, or Trepn profiler can for free IIRC. For a voltage and current overlay, can use CoolTool which is free for it's custom labels. Kind of technical yeah but has to be to figure this out. If anyone wants the CoolTool overlay custom settings, let me know.
If you straight up just want to test BCL off try setting the vph thresholds to 3000 3100 respectively, below shutdown cut off as to not take effect. Maybe it won't allow values less than cut off though, testing with monitoring the only sure way.
Sent from my ZTE Axon 7 using XDA Labs
Mine lags at any percentage, I can't browse Chrome as fast as I was able to in the past. Whenever I launch it, it lags, when switching tabs it lags, tapping the search bar takes the keyboard up to 5 seconds to appear... And it's not just Chrome, the whole phone got slow but mostly Chrome. I used to be able to smoothly manage up to 200 tabs, but now it even lags with only 20. I might try a factory reset soon, I hope it helps. Clearing recent apps didn't help at all, clearing the cache partition helped for a few hours, then it was lagging again.
i executed this /sys/module/qpnp_fg/parameters/restart 1 and my battery % dropped from 8% to 2%.I put it on the charger and its charging normal,also normal speed.
Why i have the feeling this is our bsm reset?
My battery has about 51% of its life left estimated below 20% it chugs hard. When thrown on a charger 0-30% takes about 10 seconds. I don't have root but can look at some point. I've upgraded to a mi Max 3 but my A7 is now my car multimedia system.
Infy_AsiX said:
I've noticed a lot of posts on the subreddit recently complaining about lag when under a claimed particular battery percentage. This will explain the functional reason and allow some insight into perhaps modification using root.
I got my A7 new only a few months ago so my battery hasn't degraded enough to have the issue yet. I did notice the lagging symptom before I ran my battery flat recently. I've got an interest in battery life after modding around on my last device a Sony Z3C and since then the A7 too.
From experience I know /sys/class/power_supply/bms/device/v_cutoff_uv 3200000 is the voltage threshold at which my Z3C shuts down. Battery configuration varies a lot by models, the A7 lacks this writable file.
On the A7 I found these related writable files in /sys/class/power_supply/bcl/device/
high_threshold_ua 4200000
low_threshold_ua 3400000
vph_high_thresh_uv 35000000
vph_low_thresh_uv 3300000
Google search provides this generic related documentation. The initial description paragraphs translated in lay terms describes a CPU throttling function based on battery voltage and current load limits. https://android.googlesource.com/ke...mentation/devicetree/bindings/arm/msm/bcl.txt
Of direct interest is "vph-low-threshold-uv: The battery voltage threshold below which the BCL driver starts monitoring the battery current thresholds and mitigates the CPU on the event of high load."
Also "vph-high-threshold-uv: The battery voltage threshold above which the BCL driver clears the previously applied mitigation, disables the battery current monitoring, and starts monitoring for low battery voltage."
The "-threshold-uamp" descriptions don't match the A7's provided values of seemingly voltage rather than micro amps. Assuming they're voltages of 4.2 and 3.4 but I can't guess how they take effect.
What this means for those with slowed devices under a particular percentage, check your battery voltage to see if this is the cause using a battery app or something like DevCheck. BMS State of Charge fuel gauge percentage is a varying arbitrary number influenced by numerous functions and algorithms, in other words it's a meaningless number to troubleshoot. If your battery voltage is under 3.3V at something like 50%, your battery is severely degraded and the fuel gauge is completely off, you could perhaps try setting /sys/module/qpnp_fg/parameters/restart 1 (it will restart fuel gauge calibration and the setting will automatically go back to 0). Alternatively we could try to disable the Battery Current Limit but I suspect the purpose of it is to prevent Nexus 6P style sudden early shutdowns which require an external charger to jump start them again. In any case at least this info will help those diagnose why and how degraded their battery is.
Click to expand...
Click to collapse
should we execute this line /sys/module/qpnp_fg/parameters/restart 1 (it will restart fuel gauge calibration and the setting will automatically go back to 0),when battery sits on 100%? then charge to 100% again,wipe batterystats,and reboot system? Can this be a proper way to calibrate the battery? When i charge my battery sometimes it says 5V at lockscreen

How To Guide How to limit charging on Pixel 6

With credit to VR-25 from Github:
If you edit these files and put you own values in then your phone will start charging when it drops below 75% and stop when it gets to 80%. (put your own values in, etc.)
I have only tested it briefly but it seems to work for AC and USB charging for me so far. No other apps or tweaks needed.
/sys/devices/platform/google,charger/charge_start_level:75
/sys/devices/platform/google,charger/charge_stop_level:80
EDIT: You need to be rooted to do this, and you need to reapply the settings after reboot.
I have a Tasker action that does this automatically 5 minutes after rebooting.
If only there was a way to use that without root :-S
What would be the purpose for this.
I always charged to a 100% and never had issues on my devices.
I use the adaptive charging overnight and think that will help with battery life.
vandyman said:
What would be the purpose for this.
I always charged to a 100% and never had issues on my devices.
Click to expand...
Click to collapse
If you do some reading you will see that charging over 80% and draining under 20% will significantly shorten the lifespan of your battery. This is important for those of us that have devices not sold in our country so getting replacement batteries would be very difficult and expensive. I have phones that are more than 9 years old and still going fine if charged like this.
Galaxea said:
If you do some reading you will see that charging over 80% and draining under 20% will significantly shorten the lifespan of your battery. This is important for those of us that have devices not sold in our country so getting replacement batteries would be very difficult and expensive. I have phones that are more than 9 years old and still going fine if charged like this.
Click to expand...
Click to collapse
If you would have read the correct information on this subject. You would know that this not true for today's battery technology.
This is nothing but a myth.
You will have a better chance looking for Bigfoot.
Why waste 40% of your battery use....
vandyman said:
If you would have read the correct information on this subject. You would know that this not true for today's battery technology.
This is nothing but a myth.
You will have a better chance looking for Bigfoot.
Why waste 40% of your battery use....
Click to expand...
Click to collapse
On the contrary. The most recent phones attempt to limit the time that they spend at 100% exactly because it's so bad for battery longevity. Having options like the OP's approach just gives users more flexibility, should they want more control than, in this case, Google's adaptive/AI approach.
And it's not 'wasting' 40% of the battery. Keeping between 80% and 20% just optimizes battery service life during those days you only actually only need 60% of it's possible capacity. When working from home that's often the case for me. I actually tend to use ~30% of the battery in a day. Better to charge it up daily to about 70% than all the way to 100% and let it go down to 10% over 3 days. If it's easy to do, why not?
Not quite the same, but EV design also has their batteries normally operating in the middle range so as not to compromise their service life...
Definitely not myth. The only myth is that lithium cells exhibit a memory effect and need to be deep discharged and fully recharged periodically to maintain their capacity. It's actually bad for them to do this! The only reason to do this would be in an attempt to recalibrate the software for the battery level gauge (at the cost of a little damage to the battery each time you do that).
vandyman said:
What would be the purpose for this.
I always charged to a 100% and never had issues on my devices.
Click to expand...
Click to collapse
Most folk don't notice reduction in battery capacity until it becomes severe. For example, a friend claimed it wasn't a problem charging his iPhone to 100% ritually. When he checked the OS, it said his battery capacity was 80% of what it was when new. He said he hadn't noticed it affect how long the phone lasted.
If your usage is such that you can predict how much capacity you need, you can choose to charge to 100% only those times you will actually need that capacity. Other times you can look after the battery so it's able to actually give near on 100% for longer, those times it's important to you.
Others who keep their phones a short time or are comfortable with the cost & inconvenience of a battery replacement, or simply don't care, don't have to worry....
WibblyW said:
On the contrary. The most recent phones attempt to limit the time that they spend at 100% exactly because it's so bad for battery longevity. Having options like the OP's approach just gives users more flexibility, should they want more control than, in this case, Google's adaptive/AI approach.
And it's not 'wasting' 40% of the battery. Keeping between 80% and 20% just optimizes battery service life during those days you only actually only need 60% of it's possible capacity. When working from home that's often the case for me. I actually tend to use ~30% of the battery in a day. Better to charge it up daily to about 70% than all the way to 100% and let it go down to 10% over 3 days. If it's easy to do, why not?
Not quite the same, but EV design also has their batteries normally operating in the middle range so as not to compromise their service life...
Definitely not myth. The only myth is that lithium cells exhibit a memory effect and need to be deep discharged and fully recharged periodically to maintain their capacity. It's actually bad for them to do this! The only reason to do this would be in an attempt to recalibrate the software for the battery level gauge (at the cost of a little damage to the battery each time you do that).
Click to expand...
Click to collapse
This all maybe good if you are planning on keeping your device for a few years.
Most people buy a new device every other year. If not once a year.
... and if you really want to knacker the battery, heat it up too!
Worst case scenario - using a sat nav app on your phone in the car on a hot day with the phone plugged into a car adaptor. It's going to be sitting there at elevated temperatures, possibly with the sun shining on it, whilst being kept at 100% battery....
I'm only a customer (and have no other affiliation) and like to tinker, so I got one of these for use in the car to limit temperature when charging and limit max charge. Not cheap, but ok compared with the cost of the phone https://chargie.org/
I'm sorry, but at the snails pace this phone charges I'd be very surprised if charging it to 100% every night will make any noticeable difference in the long run. I had a Xiaomi Mi10 Ultra with 120W fast charger. That phone used to charge from 0% to full in like 20 minutes. Now that's one way to quickly kill your battery.
The Pixel uses your alarm to adaptively charge the battery so it should never overcharge it anyway. I'd much rather us all of my battery than use it only between 20 and 80% just for it to last a little longer.
The files are overwritten on reboot so I created a Tasker task to write the values on reboot each time.
Biggenz said:
I'm sorry, but at the snails pace this phone charges I'd be very surprised if charging it to 100% every night will make any noticeable difference in the long run.
Click to expand...
Click to collapse
On what basis? All the research and tests are based on charge level not charge rate. Fast charging potentially just makes it worse...
But at the end of the day it's your phone. You'll charge it in whatever way works for you.
I feel like this post sort of misses the point. It clearly is aimed at those intending to keep their phones >1yr, it is stated explicitly.
I'm not rooted right now, so I've been using the AccuBattery app. One of the things it does it gives a notification every few minutes when the battery is at 80% or above so that you can physically unplug the phone from the charger. Obviously having this done automatically would be better, but I've been surprised at how well the notifications have worked in my case. Plus, I can always leave the phone plugged in if I know I need a full battery for some reason (ie a long day away from any charging source).
Galaxea said:
With credit to VR-25 from Github:
If you edit these files and put you own values in then your phone will start charging when it drops below 75% and stop when it gets to 80%. (put your own values in, etc.)
I have only tested it briefly but it seems to work for AC and USB charging for me so far. No other apps or tweaks needed.
/sys/devices/platform/google,charger/charge_start_level:75
/sys/devices/platform/google,charger/charge_stop_level:80
Click to expand...
Click to collapse
Dumb question but what did you use to write values into those files? Did you use a text editor (with root access) or just termux or something? I tried with the built in MiX text editor but it seems to choke once I open up the file.
Gibsonflyingv said:
Dumb question but what did you use to write values into those files? Did you use a text editor (with root access) or just termux or something? I tried with the built in MiX text editor but it seems to choke once I open up the file.
Click to expand...
Click to collapse
I used FX File Explorer (root option). Look for the #. SYSTEM (Root).
I was wondering if changing the file permissions after writing to them to read-only would make the changes stick, but I am sure the OS could still overwrite them...??
I wonder if there's a similar variable to tweak at what temperature the phone considers the battery is too hot and stops charging?
Galaxea said:
With credit to VR-25 from Github:
If you edit these files and put you own values in then your phone will start charging when it drops below 75% and stop when it gets to 80%. (put your own values in, etc.)
I have only tested it briefly but it seems to work for AC and USB charging for me so far. No other apps or tweaks needed.
/sys/devices/platform/google,charger/charge_start_level:75
/sys/devices/platform/google,charger/charge_stop_level:80
Click to expand...
Click to collapse
Did a bit of testing and it works fine. A few things I noticed:
1. Doesn't survive reboot. Now that I've set up MiX with pinned folders, I can make the change in seconds. Need to sit down and read through the acc documentation because AccA doesn't work. Would love to have an automatic solution. Miss my old Battery Charge Limit.
2. charge_start doesn't seem to matter. After all, if charge_start is set to 75 and the phone is at 70%, it shouldn't charge. But it does. I've kept mine at 0.
3. Point #2 is kinda beside the point, though, because charge_stop will stop at the set value and stay there. No noticeable increase in temperature from what I can see. Definitely less than when charging.
4. Still shows as charging rapidly when it hits the level. Is it rapidly cycling charging on and off? Or in a kind of micro-current state? Or this may be a true battery idle situation where all power is drawn from the adapter. Ampere and AccA just show "not charging".
Edit: With a bit of use today, it does seem to act like a normal min/max charge deal, so I set it at 75 start/76 stop. Not sure what was happening at first...maybe something to do with the adaptive charging since I still have that on. Either, way, no complaints. With my use case working from home, I have it plugged in most of the day and it'll only take me about a minute to change charge_stop to 100 when I'm planning to go out all day somewhere away from chargers. Not ideal, but still a big improvement. Changes my rating of the thing from maybe 3.5 stars to 4.5.

Categories

Resources