Dear all,
As I'm still collecting more posts to reach this silly 10-posts-until-you-can-write-in-the-development-boards-limit I thought about providing useful information
So as I always wanted it I implemented a patched intel_mdf_battery that supports forcing charger currents higher than the environment suggests.
Facts:
When you connect any "real" or "smart" device to a regular USB port, it can only draw 100 mA or up to 500 mA if the host allows. This limits charging speed to about 350 mA at our Razr I (because you have to substract some amount for running the smartphone, in addition there is a ~350 mA cap in the charging chip).
Mostly all current USB ports are able to deliver much more power. In addition, sometimes you want to use a wall charger that does not correctly express its capability to deliver more than 500 mA (by shorting D+/D-).
There comes this handy patch:
By writing to an existing sysfs node for charger control (previously that featured only _limiting_ the total input current to 500 mA), you can now override the input current limit a) to 950 mA b) to 1500 mA (limit given by Razr I hardware).
How to:
Patch your custom compiled kernel with attached patch and install it
write 5 (950 mA) or 6 (no limit) to
/sys/devices/ipc/msic_battery/charge_enable
Charging current will be updated on next status update, usually every 30 seconds. Watch that update in dmesg or just see the actual charging current in
/sys/devices/pci0000:00/0000:00:00.4/i2c-1/1-0036/power_supply/max170xx_battery/current_now (or current_avg for a few seconds average)
In addition I am looking forward to implementing a charge threshold as the battery identifies itself as a 4,35V model. Being charged to 4,35 volts for prolonged time periods has a drastic negative effect on battery life! I wanna have an override because mostly I charge the device every day. Would be a lot better to use the battery from 85 to 35 percent (so max. 4,1V or so) than from 100 to 50 percent.
Is there any interest in those patches published, made nice (maybe a gui control program) or integrated in existing custom mods?
WARNING: I TAKE NO RESPONSIBILITY FOR ANY HARM DONE TO YOUR DEVICES BY USING THIS CHARGE CURRENT OVERRIDE.
YOU REALLY CAN FRY YOUR USB PORT!
(but it is very unlikely. Know about those handy charge-only usb cables that charge at up to 1A? I use them on different kinds of devices all the time and never hat any problem)
Oh, btw, attached patch also patches an ARRAY OUT OF BOUNDS write in original code! I did not look into details but i think that it did not have any effect because there are very unimportand arrays declared directly after the affected one.
thats amazing, great job.
edit: chances fo seeing this on the stock kernel without unlocked bl?
YaPeL said:
thats amazing, great job.
edit: chances fo seeing this on the stock kernel without unlocked bl?
Click to expand...
Click to collapse
Well, the changed are not that hard and so far only implemented as a proof of concept...
Using with stock kernel not possible as that original driver is compiled into the kernel, so overriding it by module loading is not possible.
Awesome!
Have you considered submitting it as a patch to Omar's kernel? github 'link': github.com/oxavelar/XT890-Kernel-Gamma
I always been interested in this kind of stuff. If you didn't read this article yet you'll find some useful information about Lithium batteries :
batteryuniversity.com/learn/article/how_to_prolong_lithium_based_batteries
Setting the limit up to 4200mV instead of 4350mV would approximately reduce by 10% the autonomy and double the longevity. Motorola, as many others, seem to favour autonomy You'll do a great work if you succeed in finding how to do that !
How about USB 3 ? Is the limit still 350mA ? But for USB2 I think there is no point in increasing the limit. They're talking about it here but it lacks of technical details :
batteryuniversity.com/learn/article/charging_from_a_usb_port
Maybe you'll increasing the current up to 450mA, which would be nice actually.
USB 3 should handle 900mA while transferring data. It's close to the official charger (850mA at 5,1V). Could someone tell what current usb3 deliver on RAZR i ?
I'll try to find a way to implementing your patch because i've no idea Good work !
Sorry for my English
a-m13 said:
Setting the limit up to 4200mV instead of 4350mV would approximately reduce by 10% the autonomy and double the longevity. Motorola, as many others, seem to favour autonomy You'll do a great work if you succeed in finding how to do that !
Click to expand...
Click to collapse
Yeah, I know quite good about batteries, thanks Implementing that change is very straightforward and easy, but we will need a nice app to control the settings at runtime.
a-m13 said:
How about USB 3 ? Is the limit still 350mA ? But for USB2 I think there is no point in increasing the limit. [...]
Maybe you'll increasing the current up to 450mA, which would be nice actually.
USB 3 should handle 900mA while transferring data. It's close to the official charger (850mA at 5,1V). Could someone tell what current usb3 deliver on RAZR i ?
Click to expand...
Click to collapse
As the device is USB2, the host port would fall back to USB2 also and announce 500mA capability. All Limits we talk about are total input currents. Powermanagement ICs these days are specially made for requirements with limited input current (no one is really interested in the charge current, limit is nearly always the supply as in laptops or USB devices).
Please reread my first post. We are IGNORING the USB spec and just draw more power here. That is totally fine (although not recommended and in no way guaranteed by me) for most standard usb host ports.
a-m13 said:
I'll try to find a way to implementing your patch because i've no idea Good work !
Click to expand...
Click to collapse
Well, maybe you should not You need a complete build environment for that, should take you a few days if you have never done such things. Just wait for some binary releases.
Interesting idea
Hey all!
I checked my /sys/devices/ipc/msic_battery/charge_enable and it's value is 4.
Well, can I change it manually to 5 or 6? Or it will mess with the phone?
Thanks in advance
AthlonLozano said:
Hey all!
I checked my /sys/devices/ipc/msic_battery/charge_enable and it's value is 4.
Well, can I change it manually to 5 or 6? Or it will mess with the phone?
Click to expand...
Click to collapse
It's supposed to be 4 at default.
Writing 5 or 6 without my patch will not work (will return Value Error). With a patched kernel it will do exactly what stated above, so yes, it will mess with the phone to disable USB charging limit
Please, as always, read before doing anything...
PosixCompatible said:
It's supposed to be 4 at default.
Writing 5 or 6 without my patch will not work (will return Value Error). With a patched kernel it will do exactly what stated above, so yes, it will mess with the phone to disable USB charging limit
Please, as always, read before doing anything...
Click to expand...
Click to collapse
How and where to install this patch?
Related
In need to know the voltage across the diamond standard battery (900mAh) when the battery is fully charged and when the battery is fully discharged (the phone automatically switched off)
Could someone give me this information?
When my battery is low I read 3.2V
When my battery i high I read 4.1V
Is this correct?
That's about right, +-.1
Thanks, I've a lot of problems with the charging and discharging cicles, this information could help me to understand
While which is the charge current when the battery is fully discharged?
For my Diamond it can be very high, up to 800mA (I know it from BatteryStatus), it is a normal value?
wasm said:
While which is the charge current when the battery is fully discharged?
For my Diamond it can be very high, up to 800mA (I know it from BatteryStatus), it is a normal value?
Click to expand...
Click to collapse
Try a program, "PowerGuard", it's a very nice (and free) program developed by Muyz that will give you current and temp info, including graphs with a lot of flexibility in settings. You can get a good feel of where the current draws are. I think charge current is in the area of 700-800mA on initial charge.
Or another called Battlog. It,s better because it logs the measurements - on Powerguard it's difficult to see the actual (current, not in electrical, but in time sense ) measurement.
Thanks I'm going to try them
For now I'm testing Batlog...
This evening I'm going to make a full charging log, so I could post it tomorrow
Could you do the same? This could give me the possibility to compare them
I'm experimenting some problems with the charging circuit
mjaxa said:
Or another called Battlog. It,s better because it logs the measurements - on Powerguard it's difficult to see the actual (current, not in electrical, but in time sense ) measurement.
Click to expand...
Click to collapse
I agree with mjaxa, since your post I've found and installed Battlog. Works great on my Diamond. Very robust program and easy to read the log file or import into excel for analysis.
I have no idea why I didn't find this software when searching for a good battery monitor for my Diamond except I must have not used "log" in my searchs.
Thanx mjaxa.......
JRMX said:
Works great on my Diamond. Very robust program and easy to read the log file or import into excel for analysis.
Thanx mjaxa.......
Click to expand...
Click to collapse
I should, of course, also thank Palladium TD now that I've found the source for this fine program.
I'll also add that while the data logging is very good, I found that some of the functions do not work on my Diamond (US ROM 1.93). I know it's a beta program or maybe I just haven't figured it out yet. Using 0.2.3.130 beta I have noted:
No response on the help and other icon on the left side, battery temp read is off by a factor of 10 (noted on the Battlog thread) and cum use (mAh) does not display.
I'll post the comments on the correct thread.
In the following I reported the log of my battery charging cycle in txt and graphic format
If you can post comments or other logs, I'll appreciate
P.s. another bug in Battlog (I'think) is related to the sampling interval, as you can note observing the X axis on my plots: it is not constant in time
No one want help me with a charge/discharge log?
With the holidays I haven't had too much time to work with battlog and the phone use is not typical. I did run about 16 hrs of data and it does give some insight.
Charging overnight looked normal with current draw cycles at 2hr intervals for mail checks.
I was going to upload the excel file, but the format isn't permitted. The txt file is too large. I'll mess with it some more, but I didn't see anything that was unlike your data. 800ma on initial charges, -200ma on using various applications and phone calls, as much as -800ma on internet use and -9 to -20ma on locked standby. I did not see what I'm looking for which is an unexplainable deep discharge, overnight or during the day, I'll keep monitoring.
hello guys my cousin gave me his xperia and well I was happy. But one major problem. It's battery life. May I ask you guys what is the rating of your charger. mine is a charger not made by SE. I thought that if i would buy a new original charger then battery life would improve. I also think that the ROM installed on mine is not energy efficient. IDK . I'm so new to this
charger won't improve battery life, unless its not charging fully, which if it reports 100% it probably is, if its not an official rom then yes, battery can differ a lot
I have installed a couple of custom ROMs, and after a few months battery consumption increases significantly.
Doesn't sound very scientific, but between installing/uninstalling applications, modifying settings, I find I need to start off again with a fresh ROM.
The ROMs I use have Manila/Sense, I have a suspicion that the increased power requirement is a function of something having gone wrong with Manila.
I would try reinstalling the ROM and reinstalling all your applications again (NOT a restore, since you may reintroduce the problem)
maybe you can let me know if I can use a 1A charger for xperia? and where can I buy it. I mean what are the rating of your chargers? thanks
you can use any charger, since the appliance PULLS the current it needs.
Anything from a PC USB cable, to any generic charger, including a car charger.
Yes, some will take a bit longer to reach full charge if the rating is lower (like the USB feed) - but I understand your problem is the DIScharge, not the charge in itself.
Just some feedback from my experience
Agreed totaly:
paul c said:
you can use any charger.
Anything from a PC USB cable, to any generic charger, including a car charger.
Click to expand...
Click to collapse
I am using the original charger in my home, a PC USB cable from an external hard disk at home or at work and the car charger from a Mio Navigator that is left permanently in my car. The time needed to get to 100% differs according to each method used but it does complete. So how u charge is deffinately not an issue. I can also confirm that the device heats differently in each case from relatively cool to hot.
henryfranz2005 said:
I also think that the ROM installed on mine is not energy efficient. IDK . I'm so new to this
Click to expand...
Click to collapse
The issue of draining comes mostly from different roms configuration. Keep in mind that the battery after flashing needs a couple of days to pass and get charged one or two times so as to get to its max capacity. Also keep in mind that if u use for instance the WiFi or play some games or use an app that needs system resources battery will drain as hell regardless of rom. Personally with Valkyrie and Energy roms with a normal phone and messaging use I have managed to keep my X1 on for 3 to 3.5 days max. Other times I have had to plug it 2 times the same day due to heavy use...
BTW Henry we were all new once, no need to appologize.
Mr Black'd said:
Agreed totaly:
I am using the original charger in my home, a PC USB cable from an external hard disk at home or at work and the car charger from a Mio Navigator that is left permanently in my car. The time needed to get to 100% differs according to each method used but it does complete. So how u charge is deffinately not an issue. I can also confirm that the device heats differently in each case from relatively cool to hot.
The issue of draining comes mostly from different roms configuration. Keep in mind that the battery after flashing needs a couple of days to pass and get charged one or two times so as to get to its max capacity. Also keep in mind that if u use for instance the WiFi or play some games or use an app that needs system resources battery will drain as hell regardless of rom. Personally with Valkyrie and Energy roms with a normal phone and messaging use I have managed to keep my X1 on for 3 to 3.5 days max. Other times I have had to plug it 2 times the same day due to heavy use...
BTW Henry we were all new once, no need to appologize.
Click to expand...
Click to collapse
Thank you sir. I think the problem lies in the ROM i installed 826X personally i think it is energy efficient since i just use my phone for texting. (about 400 sms a day) and about 15 mins of wifi thank you.
Can you recommend a ROM which is known for it's efficiency (energy) thanks.
I personally use Energy this period. But keep in mind that rom selection is based on ones personal prefs. All of them are custom made and each cook has his own point of view. I guess that u will have to test a few before u can say with certainty that you like one in specific. Just keep trying...
thank you sir for being so helpful I will personally try the popular roms 3 roms down!
If your are using LP or MM and having issues, please check out the detailed guide from @the_poolee, right below the downloads
This is a native program for Android that addresses the wear done on Lithium-ion batteries by prolonged elevated voltage, high-resistance, and high heat charging. With lithium-ion batteries it is recommended to not quite charge to full capacity or keep the battery on the charger at an elevated voltage for lengths of time because making this a regular practice will rapidly degrade the battery.
Using apps that alert you that charging has completed or is 90% complete may be helpful but aren't always practical or convenient, such as over night charging, or as in my case a phone case with built in battery that charges itself and the phone at the same time, but it charges much more slowly and keeps the phones battery voltage elevated even after the phone has reached 100%.
I created MaxLife to make the handling of said situation convenient and entirely automatic. MaxLife runs as a background system service that interacts with the power_supply subsystem. Using a value chosen by you for the target battery percentage (or 90% default if not provided) monitors how far along your charge is until either you've disconnected the power source or your battery has charged to the target level you set. Upon reaching the target it stops the charging of the battery (even though the charger IS still connected) and suspends charging for a minimum of 15 minutes. After 15 minutes have passed however it still will not restart charging until the battery has fallen below your desired charge level.
This is perfect for trading a small amount of the battery's capacity for a longer and more reliable life of operation. Aside from keeping your battery's charge capped at the desired level it also beats the shortcomings of having to leave your phone unplugged overnight by assuring that it will be charged to the chosen percentage when you're ready to use it not leaving you with a potentially discharged battery due to overnight idle drain (whatever the cause may be e.g. wakelocks).
Prerequisites:
• init.d support
• custom recovery
• Qualcomm device
• A fairly complete busybox install. Toolbox and toybox won't cut it.
INSTALLATION:
Setting it up is simple. At the bottom of this post will be a recovery flashable zip. It installs two files onto your system partition: the MaxLife binary and an init.d script. To choose your target battery percentage first install the package, and use the settings editor described below (title of that section is in bold) (default is 85 in init script and tool is hard coded to 90 if no value or an invalid one is supplied).
New Feature:
Built in settings editor
Optional settings file
Live settings changes (no reboots)
Auto-BattStat Reset
Charge Rate Control
MaxLife now accepts a second argument to set the rate of charge (by changing the input current that is accepted). Valid values are slow, normal, and turbo. If no second argument is supplied in the init.d script or on the command line MaxLife defaults to "normal" (which means no change, system default). The default value in the installer zip is "slow".
slow- Will take somewhat longer to charge, but the battery will remain much cooler during charging and it places less stress on it, prolonging its operational life.
normal- Nothing is adjusted. Equivalent to leaving the option blank.
turbo- Fast charging for those scenarios where time is valuable and you need to get as much into your battery as fast as you can. Hotter charging temperature and more stress/risk to battery and charging components. Recommended to be used sparingly.
This parameter can be set in the init.d script just like the percentage setting.
NEW BUILT-IN SETTINGS EDITOR
There is also now a very straightforward and self-explanatory GUI with MaxLife for settings management now.
To change the settings override/live settings file from MaxLife itself from the command line, just use a terminal app and (as root/superuser) run:
Code:
maxlife set 70 slow
or
Code:
maxlife set slow 70
The options after set can be in either order and equally valid. If your settings are invalid you will get an error message saying so, otherwise it'll display an output of the newly applied settings. REMEMBER: It only takes options in lower case.
IMPORTANT:
If you do edit 91bms, please be sure your text editor is saving the file using UNIX text format. Other formats break the installation. I use the built in editor in ES File Explorer as my editor of choice because it let's you see what format you are saving text files in.
Uninstall:
Delete /system/etc/init.d/91bms and /system/bin/maxlife
This tool is very safe in its interactions with your device, but I am not liable for anything that happens to your device.
It is tested and confirmed working on the Moto G and ZTE Speed both running 4.4.4; however it was designed with the goal of Lollipop/Marshmallow compatibility as well as compatibility with any Qualcomm chip set, so if anyone wants to help test and confirm all and any aspects of compatibility feel free to lend a hand.
LICENSE:
By downloading and/or using MaxLife, you are showing that you accept the terms of this license.
This project is my own proud work, so please be respectful and do not redistribute, sell, modify, or reverse engineer the MaxLife binary and the data contained therein in any form or manner without first acquiring my permission and also giving due credit upon redistribution after receipt of my permission.
This software is being provided free of charge with no guaranteed nor implied warranty. I also hold no responsibility or liability for any damages direct or indirect that come to your person, property, or device from the use of MaxLife.
I also retain the right to modify the terms of this license at any time without having to give any notice of modification.
ENJOY!!!
MaxLife v1.0.9c Unified:
(UNINSTALL older GUI like normal app first)
https://drive.google.com/file/d/0B_hgNZE_j5sVVkJPM2hnWFVId1E/view?usp=drivesdk
If your are using LP or MM and having issues, please click below to open a detailed guide from @the_poolee
From the_poolee:
Well as our beloved @elrod16 seems rather hesitant to upgrade to later android versions, he asked me to do a post regarding proper setting for Maxlife in LP/MM. I should clarify beforehand that I'm no dev nor do I have any coding knowledge. I just happened to find a solution for a persistent issue that most of us on LP/MM faced. And if it matters, I'm currently on CM13 (Android 6.0.1 Marshmallow), with Maxlife v1.0.7. I don't have Xposed or other addons, except for Greenify, working in Root mode. So here it goes....
The first and foremost thing to remember is that Maxlife doesn't have any front end UI with quick toggles @elrod16 seems to be working on it). But it doesn't mean that the actual stuff that works behind screens is completely hidden from root level apps like Greenify and native Doze in MM. And therein lies the core problem.
Since CM13 got some issues with init.d(as per my understanding, it doesn't have it), I used the terminal commands. The charging rate setting and even charge level setting, all worked. My sole issue, then, was that under an unattended night-charge session, the charging went beyond the set values. Since everything was okay in the short-run trial, I assumed something was messing up in the extended session. I couldn't think of anything other than Greenify and Doze at that moment.
In Greenify for MM, there are Shallow Hibernation and Aggressive Doze options. And of course, Automatic Hibernation is also there. Like any other battery - life - caring - guy out there, I had all of these options turned ON. Talking about Doze, it is another factor that may mess with proper Maxlife working. But as per my understanding, doze mode doesn't kick in when connected to a charger. The extra Doze setting in Greenify is just an extension of the normal Android back-end doze,wherein Aggressive Doze puts the device into doze faster than usual, but again, not when charging. Besides, @elrod16 had done some tweaks to ensure that Maxlife is not suspended unnecessarily in Doze(via wakelock). So doze cannot be the culprit. Even then, I tried turning each one off, and voila, guess what, as soon as I turned off Automatic Hibernation in Greenify, Maxlife settings persisted - charging never went beyond the set limits - even through full night charge sessions. I just solved the issue then and there. But I should add that for guys using Greenify in Xposed mode, the behaviour may be different.
In a nutshell, my observation is that apps like Greenify may interfere with Maxlife and hence, make sure that all of them are disabled, or at least, their automatic modes are disabled. Doze may not have been the problem child in my case, but even then, try turning off such Aggressive doze options or instant doze modifiers, if nothing else works.
NOTE: auto charge resume may not work with portable chargers because they often power down after the connection is dropped.
Also any relevant feature suggestions, bug reports, or other design suggestions are always welcome.
Changelog:
v1.0.9c- Split the engine and GUI into separate downloads until this issue with flashable updates and the GUI is resolved. The engine has also been tweaked so that resource hungry apps running in the forground are less likely to make MaxLife miss its target because it was forced to wait for its turn to run. It adjusts its niceness and I/O priority to accomplish this.
v1.0.9a- Now every 10 boots MaxLife forcea the battery guage to synchronize with the battery's internal reading to prevent drift in readings from not allowing full charge cycles.
v1.0.8a- Graphic user interface added with bug in mode setting in test version of UI fixed.
v1.0.7- Rolled the charge delay back to 15 minutes. Improved the wakelock code so that during the charge delay time if you disconnect your device from the charger it'll release the wakelock but continue counting the delay. Old versions the wakelock stayed on during the charge delay whether the device was connected or not.
v1.0.6- Lowered the charge waiting delay to 3 min. MaxLife now keeps the device from suspending while connected to a power source. This is experimental and aimed at fixing the issues with deep sleep. MaxLife has its own settings editor now for the live settings feature. Eliminates any possibility of the file being saved in DOS format.
V1.0.5a- Fixed a bug in a block of code shared between MaxLife and MaxOpt where data wasn't being thoroughly validated before being used.
v1.0.5- Now whenever the settings are changed using the new "on the fly" way, an update of the new settings is written out to logcat, just useful for individual debugging or troubleshooting. This message is at the Verbose priority/level/filter in logcat.
v1.0.4b- When launched from a terminal app (such as for testing) MaxLife now prints out the settings it initially detected and will use. There is also a new way of configuring the settings that also allows "live" changes, changes that will take effect without a reboot or restarting the tool.
v1.0.3- MaxLife now automatically resets your system battery usage stats when it hits the charging cutoff set point. The settings app battery page should no longer endlessly fill up.
v1.0.2- Added a kernel level suspend block (rather than app runtime PowerManagerService.Wakelocks) to fix issue of the tool missing the charge cutoff from deep sleep. Suspend block is released as soon as charging is stopped or charge cutoff is met. Changed default percentage in init.d script to 85.
v1.0.1b- Fixed a small mistake in the installer zip layout.
v1.0.1- Introduced charge speed setting. Details above in post in "New Feature" section.
---------------------------------------------------
Please thank if my software has helped you and please leave logs and descriptions of problems if my software did not work for you.
I always leave my phone to charge overnight. Flashing it now on Exodus 5.1.1.
For me it didn't worked , charging didn't stoped at 90%
---------- Post added at 01:48 AM ---------- Previous post was at 01:47 AM ----------
Resurrection remix custom rom lp 5.1.
Xt1033 Dual Sim.
BhavikRB said:
For me it didn't worked , charging didn't stoped at 90%
---------- Post added at 01:48 AM ---------- Previous post was at 01:47 AM ----------
Resurrection remix custom rom lp 5.1.
Xt1033 Dual Sim.
Click to expand...
Click to collapse
Was the phone booted? Also some devices the charging icon may stay on but the device is in fact not accepting charge and the percentage wont rise.
Running "ps | grep maxlife" in Terminal app should show if it is running. If it isnt running try running "maxlife 90“ or such in the terminal and see if it does launch or returns an error.
---------------------------------------------------
Please thank if my software has helped you and please leave logs and descriptions of problems if my software did not work for you.
If anyone is having any issues with this tool please inform me of the issue, your ROM, kernel, and any other charging/power management apps you have installed. Troubleshooting/debugging is an interactive process, no program is perfect, but providing me with your bug reports and helping me test new updates and fixes gets us one step closer and helps me provide the functionality you were looking for.
On the other hand if this program did help you, please hit the thanks button and help keep motivation to continue development strong thanks everyone
---------------------------------------------------
Please thank if my software has helped you and please leave logs and descriptions of problems if my software did not work for you.
Hi, suscribed to your topic for following ...will surely try your tool soon and keeping you informed...
Thanks for your work and keep your motivation strong
After flashing the 91bms is not in the int.d file
Ohhdayumm said:
After flashing the 91bms is not in the int.d file
Click to expand...
Click to collapse
It looks like i made a goof when packaging the installer zip. The link in the OP has already been updated, see if that one flashes correctly for ya.
---------------------------------------------------
Please thank if my software has helped you and please leave logs and descriptions of problems if my software did not work for you.
elrod16 said:
It looks like i made a goof when packaging the installer zip. The link in the OP has already been updated, see if that one flashes correctly for ya.
---------------------------------------------------
Please thank if my software has helped you and please leave logs and descriptions of problems if my software did not work for you.
Click to expand...
Click to collapse
no problem Ill try it when I have time today and I'll tell you if it works thanks for the work!
Hi thanks for the script! It does work the charging stopped at 89%
This only works on moto g?
Ohhdayumm said:
This only works on moto g?
Click to expand...
Click to collapse
No, in theory it should work on a variety of Qualcomm based devices. I can confirm that the ZTE Speed is definitely supported.
---------------------------------------------------
Please thank if my software has helped you and please leave logs and descriptions of problems if my software did not work for you.
Which value do you recommend for better battery life?
abeloman said:
Which value do you recommend for better battery life?
Click to expand...
Click to collapse
For the best battery longevity I'd probably use "70 slow" but for a good balance of longevity and capacity I'd probably use either "85 slow" or the default settings.
---------------------------------------------------
Please thank if my software has helped you and please leave logs and descriptions of problems if my software did not work for you.
Its really working
@elrod16 :
And if you want to remove it totally ? Enough to let it in place and change value to 100, for example ? (just an idea, i'm testing it for moment, don't want to remove it yet )
One more : Nice, that selection of charging modes...just a little bit difficult for those who don't know how to edit a file. GUI, maybe, or best solution, integration in a kernel and settings avaible in Kernel Adiutor (or any other apk) ???
satanas17 said:
@elrod16 :
And if you want to remove it totally ? Enough to let it in place and change value to 100, for example ? (just an idea, i'm testing it for moment, don't want to remove it yet )
One more : Nice, that selection of charging modes...just a little bit difficult for those who don't know how to edit a file. GUI, maybe, or best solution, integration in a kernel and settings avaible in Kernel Adiutor (or any other apk) ???
Click to expand...
Click to collapse
Hey thanks for testing! To effectively disable it without removing any files you could change the settings to "100 normal" and to actually uninstall it, delete /system/etc/init.d/91bms and /system/bin/maxlife. Those two files are the whole mod.
I would like to make GUI's for my different mods I've posted :/ but alas, my phone is my development environment, so if it can't be made with GCC I can't do it. However....I think Tasker App Factory could be able to cook something up that could handle a simple task like editing those settings, so when time allows, I will probably go that route. Thanks for the input and suggestions
---------------------------------------------------
Please thank if my software has helped you and please leave logs and descriptions of problems if my software did not work for you.
Working perfectly on Resurrection Remix LP Final Build. Thank You.
Moto G XT1033
elrod16 said:
Hey thanks for testing! To effectively disable it without removing any files you could change the settings to "100 normal" and to actually uninstall it, delete /system/etc/init.d/91bms and /system/bin/maxlife. Those two files are the whole mod.
I would like to make GUI's for my different mods I've posted :/ but alas, my phone is my development environment, so if it can't be made with GCC I can't do it. However....I think Tasker App Factory could be able to cook something up that could handle a simple task like editing those settings, so when time allows, I will probably go that route. Thanks for the input and suggestions
---------------------------------------------------
Please thank if my software has helped you and please leave logs and descriptions of problems if my software did not work for you.
Click to expand...
Click to collapse
You"re welcome
One more suggestion :
Put the tips for uninstall in OP...
elrod16 said:
This is a native program for Android that addresses the wear done on Lithium-ion batteries by prolonged elevated voltage, high-resistance, and high heat charging. With lithium-ion batteries it is recommended to not quite charge to full capacity or keep the battery on the charger at an elevated voltage for lengths of time because making this a regular practice will rapidly degrade the battery.
Using apps that alert you that charging has completed or is 90% complete may be helpful but aren't always practical or convenient, such as over night charging, or as in my case a phone case with built in battery that charges itself and the phone at the same time, but it charges much more slowly and keeps the phones battery voltage elevated even after the phone has reached 100%.
I created MaxLife to make the handling of said situation convenient and entirely automatic. MaxLife runs as a background system service that interacts with the power_supply subsystem. Using a value chosen by you for the target battery percentage (or 90% default if not provided) monitors how far along your charge is every 30 seconds until either you've disconnected the power source or your battery has charged to the target level you set. Upon reaching the target it stops the charging of the battery (even though the charger IS still connected) and suspends charging for a minimum of 15 minutes. After 15 minutes have passed however it still will not restart charging until the battery has fallen below your desired charge level.
This is perfect for trading a small amount of the battery's capacity for a longer and more reliable life of operation. Aside from keeping your battery's charge capped at the desired level it also beats the shortcomings of having to leave your phone unplugged overnight by assuring that it will be charged to the chosen percentage when you're ready to use it not leaving you with a potentially discharged battery due to overnight idle drain (whatever the cause may be e.g. wakelocks).
Prerequisites:
• init.d support
• custom recovery
• Qualcomm device
INSTALLATION:
Setting it up is simple. At the bottom of this post will be a recovery flashable zip. It installs two files onto your system partition: the MaxLife binary and an init.d script. To choose your target battery percentage first install the package, remount system as RW by whatever means you want, using a file explorer navigate to /system/etc/init.d, open the file 91bms, and change the number within to whatever you choose (default is 90 in init script and tool is hard coded to 90 if no value or an invalid one is supplied).
New Feature:
Charge Rate Control
MaxLife now accepts a second argument to set the rate of charge (by changing the input current that is accepted). Valid values are slow, normal, and turbo. If no second argument is supplied in the init.d script or on the command line MaxLife defaults to "normal" (which means no change, system default). The default value in the installer zip is "slow".
slow- Will take somewhat longer to charge, but the battery will remain much cooler during charging and it places less stress on it, prolonging its operational life.
normal- Nothing is adjusted. Equivalent to leaving the option blank.
turbo- Fast charging for those scenarios where time is valuable and you need to get as much into your battery as fast as you can. Hotter charging temperature and more stress/risk to battery and charging components. Recommended to be used sparingly.
This parameter can be set in the init.d script just like the percentage setting.
This tool is very safe in its interactions with your device, but I am not liable for anything that happens to your device.
It is tested and confirmed working on the Moto G and ZTE Speed both running 4.4.4; however it was designed with the goal of Lollipop/Marshmallow compatibility as well as compatibility with any Qualcomm chip set, so if anyone wants to help test and confirm all and any aspects of compatibility feel free to lend a hand.
This project is my own proud work, so please be respectful and do not redistribute MaxLife in any form or manner without first acquiring my permission and also giving due credit.
ENJOY!!!
MaxLife v1.0.1b
https://drive.google.com/file/d/0B_hgNZE_j5sVaURLeXpDNUYyTkk/view?usp=docslist_api
NOTE: auto charge resume may not work with portable chargers because they often power down after the connection is dropped.
Also any relevant feature suggestions, bug reports, or other design suggestions are always welcome.
Changelog:
v1.0.1b- Fixed a small mistake in the installer zip layout.
v1.0.1- Introduced charge speed setting. Details above in post in "New Feature" section.
---------------------------------------------------
Please thank if my software has helped you and please leave logs and descriptions of problems if my software did not work for you.
Click to expand...
Click to collapse
How to roll back changes? My phone is lagging after flashing this zip in my moto g1(falcon) in marshmallow.
Anyone found a consistent way to limit battery charge % on Android 11? The custom settings I used with Battery Charge Limit app on 10 work intermittently on 11. Often times I'd wake up to 100% charge.
Currently I'm using Advanced Charging Controller magisk module with it's accompanying AccA app but often AccA gets killed in the background even after not optimizing it in battery optimization. The only workaround I've found is to create a macro that opens AccA every time I plug in the charger. With that step it's consistent but I'd like to find something not so hacky.
I've been running A11 for about a week and did not encounter any issues with Battery Charge Limit. Maybe make sure that it's not battery optimized? I have it "not optimized" because I'm paranoid about it, rather than having direct problems.
jljtgr said:
I've been running A11 for about a week and did not encounter any issues with Battery Charge Limit. Maybe make sure that it's not battery optimized? I have it "not optimized" because I'm paranoid about it, rather than having direct problems.
Click to expand...
Click to collapse
I made sure battery charge limit wasn't optimized. You're using the same custom setting from android 10? Maybe I'll try it again
This the settings you have?
Path Data: /sys/class/power_supply/charger/charge_disable
Enable Value: 0
Disabled Value: 1
hawkswind1 said:
I made sure battery charge limit wasn't optimized. You're using the same custom setting from android 10? Maybe I'll try it again
Click to expand...
Click to collapse
I didn't change anything at all... and honestly with all of the other A11 problems I've been having... I didn't even think to check that it was working. It just has been. I also double-checked with AccuBattery and the history never shows above my limit.
This is my control file settings as seen on the main screen:
Code:
/sys/class/power_supply/charger/charge_disable, 0, 1
jljtgr said:
I didn't change anything at all... and honestly with all of the other A11 problems I've been having... I didn't even think to check that it was working. It just has been. I also double-checked with AccuBattery and the history never shows above my limit.
This is my control file settings as seen on the main screen:
Code:
/sys/class/power_supply/charger/charge_disable, 0, 1
Click to expand...
Click to collapse
I think that's the custom setting probably restored from your Google backup. Same one I was using. I'm gonna try it again though, thanks
hawkswind1 said:
Anyone found a consistent way to limit battery charge % on Android 11? The custom settings I used with Battery Charge Limit app on 10 work intermittently on 11. Often times I'd wake up to 100% charge. Currently I'm using Advanced Charging Controller magisk module with it's accompanying AccA app but often AccA gets killed in the background even after not optimizing it in battery optimization. The only workaround I've found is to create a macro that opens AccA every time I plug in the charger. With that step it's consistent but I'd like to find something not so hacky.
Click to expand...
Click to collapse
Have you tried Accubattery? Along with charge limiting it has other useful features, including reporting battery capacity vs. new (under health).
v12xke said:
Have you tried Accubattery? Along with charge limiting it has other useful features, including reporting battery capacity vs. new (under health).
Click to expand...
Click to collapse
Accubattery is fine and all for reporting and giving an idea of where you want to stop charging... but it has no ability to limit charging. The only thing it can do is nag you to take the phone off the charger. This thread is about root applications actually blocking the phone from charging past a certain level without making the user do anything or even notifying the user about what's being done.
I realize this is a couple of months old. but I just got a new OnePlus 8T, now rooted, and I'm trying to use Battery Charge Limit on it. I can't quite figure out the settings to have it work consistently. Let's say the phone is already at 100% when I plug it in. Battery Charge Limit starts, but then it flip-flops between Charging and Not Charging, starting and restarting. The phone woke me up last night because it was making a ding every time Battery Charge Limit flipped between charging and not charging. One would think that if the phone was at 100% Battery Charge Limit would turn off charging and let it drop down to my 85% limit and then back up to 91%, but never got above 91%. Thoughts? Thanks.
rcbjr2 said:
I realize this is a couple of months old. but I just got a new OnePlus 8T, now rooted, and I'm trying to use Battery Charge Limit on it. I can't quite figure out the settings to have it work consistently. Let's say the phone is already at 100% when I plug it in. Battery Charge Limit starts, but then it flip-flops between Charging and Not Charging, starting and restarting. The phone woke me up last night because it was making a ding every time Battery Charge Limit flipped between charging and not charging. One would think that if the phone was at 100% Battery Charge Limit would turn off charging and let it drop down to my 85% limit and then back up to 91%, but never got above 91%. Thoughts? Thanks.
Click to expand...
Click to collapse
It's possible it's not configured correctly for your phone. You can also just disable that notification channel, since mostly it's just annoying. It constantly fliping might mean that there's more than one control file for your phone type and it's using an ineffectual one that the OS is overriding immediately. For example, the default one it detects for Pixel 4's is not the one it should use.
jljtgr said:
It's possible it's not configured correctly for your phone. You can also just disable that notification channel, since mostly it's just annoying. It constantly fliping might mean that there's more than one control file for your phone type and it's using an ineffectual one that the OS is overriding immediately. For example, the default one it detects for Pixel 4's is not the one it should use.
Click to expand...
Click to collapse
Thanks for the reply. The problem is that I use the notification to trigger Tasker profiles, so I was hoping to figure out a way to get it to stop flipping back and forth while also retaining the notification. I think it's just the standard control file since it's a OnePlus phone, but I'm not sure I can figure out otherwise. When I first start using BCL, I found the control file and was able to manipulate it with a SQL editor and Shell commands in Tasker, but I haven't poked around the OnePlus 8T that much yet.
Just as a PSA, I think Adaptive Charging from the January update can conflict with this. On days where I set a morning alarm, I found that my battery was more full than it should be. I suspect that Adaptive Charging does something that Battery Charge Limit cannot block. I won't know for a few days if turning this off in settings fixes things 100% or the January update just really screws with this.
Battery Charge Limit settings for pixel 3
Hi all, I like the app, Battery Charge Limit (root required), but was wondering how to set the control file. I works fine with Xperia (with/without Lineage), but doesn't work with Pixel 3 stock firmware (Android 10). And finally found how to...
forum.xda-developers.com
Well, as a root method it does seem to work. Depending on your taste, it might be cleaner than an app toggling a different variable. Of course you need an app to set the file back to 100 when you want it. Some Tasker widgets work for my purposes... could probably make it a QuickSettings toggle in the shade, actually.
Bottom of that thread, I was wondering specifically if there might be way to force an unrooted device to think it met one of these conditions, so it only charges to 80%.
Specific post link:
Battery Charge Limit settings for pixel 3
Hi all, I like the app, Battery Charge Limit (root required), but was wondering how to set the control file. I works fine with Xperia (with/without Lineage), but doesn't work with Pixel 3 stock firmware (Android 10). And finally found how to...
forum.xda-developers.com
i.e.
... your phone automatically limits charging to about 80% under certain conditions:
Continuous charging under high battery drain conditions, like game play.
Continuous charging for four days or more.
I've done very little research on this, but I expect the ways to fool the phone into thinking those things are happening is even more complicated than using that root file control. Meaning also requiring root but manipulating other control files.
I suppose you could have a case and a ribbon USBC connector that fools the charging logic into thinking it is constantly connected to a hardware charger even though it's still at a net negative power. After 4 days of having the case on, it might work. I don't know why anyone would have already built something like that, however.
I would root my phone but, as my daily driver, I need things like banking apps to work. They (at least some) detect rooted phones and refuse to load as a security measure (which is probably a good thing) :-(
Banking apps are usually just a frontend to their website used API. They have no problem with you using a browser on a rooted phone or Linux PC, etc. Any app that stores sensitive data on your phone and relies 100% on the filesystem being locked down was created wrong and lazily. The only thing about banking apps that might be legitimate is when things like unique CC info is stored for NFC and using a TPM can't be assured. Most banking apps, however, do not store anything sensitive on your phone aside from a login token which all websites also do. (it's called a cookie)
My personal preference is that no app is better for me than being able to root my phone. I don't play mobile games that want to keep you from cheating and I don't even care about Google Pay, which I'm not sure has legitimate need to block root either... they just do it to keep banks happy, which as I suggested, I think they're full of BS.
The only thing more BS than this no-root nonsense from app companies is when carriers do it by locking bootloaders. I try to re-use my phones for as long as possible and without the ability to limit battery charge, the batteries swell and die quickly, every time. It's good news that Google added code where phones plugged in constantly will limit charge automatically... but I doubt there is a way to trick it from the outside. (without root)
Hmmm. Maybe lazy programming, but I'm not ready to change my Bank so I can root my phone
Back to the topic... I don't think I'm ready to trust the /sys/devices/platform/soc/soc:google,charger/charge_stop_level method. Several times I found my phone at low battery and not pulling any current from the USB port, but not losing charge either. It had put itself into a stalemate where it was stuck below 10% for hours. Resetting the value from 60 to 100 allowed charging again. The battery charge limit app never really caused this. So I guess I'm going back to the full app method.
jljtgr said:
Back to the topic... I don't think I'm ready to trust the /sys/devices/platform/soc/soc:google,charger/charge_stop_level method. Several times I found my phone at low battery and not pulling any current from the USB port, but not losing charge either. It had put itself into a stalemate where it was stuck below 10% for hours. Resetting the value from 60 to 100 allowed charging again. The battery charge limit app never really caused this. So I guess I'm going back to the full app method.
Click to expand...
Click to collapse
I would like to definitely solve this problem I have been struggling with for years. What did you do, can you please help me? It seems extremely similar to what you wrote here.
I have been using battery charge limit on my Xiaomi Mi Mix (1st model) since android 7.1 (lineageos) (and I might have messed with a couple files, not sure, can't remember). When updating to android 9 (lineageos) couple years ago I started having the problem you described. Also I notice sometimes I plug the phone at safe levels such as 35% or 60% and it doesn't charge same thing. Also it only charges with certain chargers and not others.
Earlier today it was 11% battery, could not boot android, didn't charge. I got the idea for the first time to try booting in TWRP (on+volume up buttons) and it immediately started charging at full speed. So there's obviously nothing wrong in the hardware, it's software or just config.
I would like to definitely solve this problem, but I don't understand exactly what you did on your side to fix it. Please reply or message me if you have any suggestion Thank you!
This thread is to track which kernels (On Stock ROM or AOSP based) support Advanced Charge Controller the best and ones that prolong battery health by implementing Battery-idle Mode.
GitHub - VR-25/acc: Advanced Charging Controller
Advanced Charging Controller. Contribute to VR-25/acc development by creating an account on GitHub.
github.com
Please post your experience in prolonging the battery health and longevity of the internal stock 5020 mAh battery by:
Reducing battery wear and tear (due to fast-charging or charging to a full 100% every single time) by limiting charging to 60% or 80%
Depleting the limited 500 battery charge cycles on stock battery slower with Idle-mode
I have used without any problems ACC with the stock MIUI Rom, AOSPExtended and the last 10 days with the latest Lineage OS.
Very happy with the battery life In latest Lineage OS!
I'm using the ACC as a Magisk module and I commanding it via shell commands. Using it with 80 / 70 setup: setup charging at 80% start again at 70 and also I have setup the 50 / 5 cooldown option, for reducing battery temperature during a charge: the charge stops for 5 seconds after each 50 seconds fast / slow charge.
on eu rom and crdroid i can't use acc, always discharging every 5 second.
I'm using acc on acca app, when it doesn't work i tried using it as magisk modules, but still doesn't do the job.
shehaan27 said:
on eu rom and crdroid i can't use acc, always discharging every 5 second.
I'm using acc on acca app, when it doesn't work i tried using it as magisk modules, but still doesn't do the job.
Click to expand...
Click to collapse
I'm using acc in crdroid and it's working perfect.
But you have to take newest 2022 version and flash separately zip and app
thanks for info, i will try it
Hello,
I have Samsung Galaxy S10 (EU version) so with Exynos...
Is it possible to configure module (i.e. in AccA app) so that it really charges in "fast mode"?
I see that 15W (in fact 12-14W) is achievable only with original Samsung charger.
While using any other charger I mean 20W to 35W - max charging current is not more than 1,3 - 1,4A...
As far as I know there are Magisk modules that work, but with Qualcomm processor...
Is it possible to configure module so that on Exynos fast charging was really working?
In the picture there is configuration I made in the app but with no effect...
I configured using tips from ACC help.
Another question is Wireless charging. When I use 15W charger (I know real efficiency is 60-70%) but on average it charges 5-6W, whereas on the screen it shows "fast wireless charging" - is there another separate configuration of ACC for wireless mode?
Please advise, thanks!
tomiasx22 said:
Hello,
I have Samsung Galaxy S10 (EU version) so with Exynos...
Is it possible to configure module (i.e. in AccA app) so that it really charges in "fast mode"?
I see that 15W (in fact 12-14W) is achievable only with original Samsung charger.
While using any other charger I mean 20W to 35W - max charging current is not more than 1,3 - 1,4A...
As far as I know there are Magisk modules that work, but with Qualcomm processor...
Is it possible to configure module so that on Exynos fast charging was really working?
In the picture there is configuration I made in the app but with no effect...
I configured using tips from ACC help.
Another question is Wireless charging. When I use 15W charger (I know real efficiency is 60-70%) but on average it charges 5-6W, whereas on the screen it shows "fast wireless charging" - is there another separate configuration of ACC for wireless mode?
Please advise, thanks!
Click to expand...
Click to collapse
Maybe eqynox phones use a diffrente BMS chip. Probably is better to ask in the acc thread
Is there any kernel for RN10 PRO that supports battery idle mode?
Any chance this will work with s23u? Its really needed and very handy.
Donnerbesen said:
Any chance this will work with s23u? Its really needed and very handy.
Click to expand...
Click to collapse
There were reports that Samsung had implemented bypass charging natively in the S23 series...
amn1987 said:
There were reports that Samsung had implemented bypass charging natively in the S23 series...
Click to expand...
Click to collapse
Yes i know thanks. Im having it activated but it only work for games.
What i ment is to make it work with everything else too. Being able to run a phone over PD and bypass charging.. for example in a car all day or travelling by train.
Donnerbesen said:
Yes i know thanks. Im having it activated but it only work for games.
What i ment is to make it work with everything else too. Being able to run a phone over PD and bypass charging.. for example in a car all day or travelling by train.
Click to expand...
Click to collapse
No idea. Maybe someone would come up with a mod in the future. My devices even from years ago were never advertised to support bypass charging but with root it was possible to enable it in all of them. In some all it took was to limit the maximum battery charge level while in others limiting the maximum battery charging voltage was necessary.