(Magisk) 30Watt Charging + Better Battery Profile - Redmi Note 9 Themes, Apps, and Mods

Hello,
Redmi Note 9 limited it's charging rate under 2A.
Sometimes it's under 1A if using phone when charging.
Throttled temp @39c
Redmi Note 9 use smb1351 charging ic, which support QC3.0
This phone should have similiar charging speed like
Redmi Note 9s or Redmi Note 9 Pro
Don't know whatever reason for limiting this feature.
Maybe because it's cheaper phone, then Xiaomi need some advantage for more expensive model.
After read some document, i believe that limit battery temperature @45c wont do much damage or degrading battery capacity. At least i would like to take the risk for faster charging, which annoyed me a lot.
Here i want to share magnetar_juliet module.
This module will bypass limiter by change "thermal.conf"
Phone now charging at max curent 2920mA
All credits goes to dev @Kyliekyler
Changelogs:
- Added Android 11 Support
- Compiled w/ Clang 10.0.1
- O3 Optimization Enabled
- Improved CPU Load Calculations
- Improved Config Backup & Restore
- Improved Game Detection
- Increased Temperature Threshold by 3°C
- Miscellaneous Changes
- New Modes
- 0 = Adaptive
- 1 = Endurance
- 2 = Balance / Balance+
- 3 = Extreme
- Optimized Overall Performance
- Various Bug Fixes & Stability Improvements
Download attachment below, and manually install it using magisk manager, reboot, enjoy faster charging as it should be
ps. use with original charger from phones.
*Added some proof from accubattery details
Update:
*added magnetar_kilo
More battery life (personal opinion)
Regards,
kevin168

There is app from @sssira
Useful to check logs and change magnetar profile.
Here to download,

For those who still worry about battery degradation,
Additionally you can install
"Battery Charge Limiter"
Original Thread here:
https://forum.xda-developers.com/android/apps-games/root-battery-charge-limit-t3557002/
For me personally using this magisk module below,
Set max up to 80% for daily life,
Just disable app if you need to recalibrate battery stats, or needed it to fully charged.
Regards,
kevin168

Will this destroy or make the battery go down quicker in any case?

Read more for science behind lithium-ion,
https://batteryuniversity.com/index.php/learn/article/how_to_prolong_lithium_based_batteries/
- Degrade capacity faster?
maybe if you always charged to 100%
Even with slower charging rate, fully charged is mainly cause for faster battery wear,
you can try to install accubattery app,
There's enough information for how to prolong your battery life.
-Go down quicker?
It's go UP quicker and go DOWN slower
For me, who lived in tropical area,
Seems impossible to reach 25c battery temp,
with daily ambient temperature more than 30c.
If you affraid about battery degradation
(maybe you want to use this phones for 3+ years)
Then i suggest to use charge limiter, capped max @80%
Regards,
kevin168

kevin168 said:
For those who still worry about battery degradation,
Additionally you can install
"Battery Charge Limiter"
Original Thread here:
https://forum.xda-developers.com/android/apps-games/root-battery-charge-limit-t3557002/
For me personally using this magisk module below,
Set max up to 80% for daily life,
Just disable app if you need to recalibrate battery stats, or needed it to fully charged.
Regards,
kevin168
Click to expand...
Click to collapse
how do i install? guide?

Phone need to be rooted first with magisk.
Then use magisk manager, add module, reboot and wait 2 mins for mods started.

Didn't notice a difference except it overheats a lot.

DavitidzeSh said:
Didn't notice a difference except it overheats a lot.
Click to expand...
Click to collapse
Check your charging time
Before and after mod applied.

kevin168 said:
Check your charging time
Before and after mod applied.
Click to expand...
Click to collapse
I checked. Nothing changed for me. I even used a 33 Watt Charger

DavitidzeSh said:
I checked. Nothing changed for me. I even used a 33 Watt Charger
Click to expand...
Click to collapse
Could you post magnetar logs?
There's nothing we can do without more detailed info.
For me without mods, charging ampere mostly under 2A.
After mods, charging ampere mostly higher than 2A. Usually between 2.5 - 2.9A
May i know your ambient room temperature?
If you live in cold weather area, maybe this is the root cause.

I installed a gsi rom with supersu how do I install this do I have to convert su to magisk or reflash a rom with magisk?

Magisk is mandatory for this module.
Sorry but i don't know how exactly to change supersu to magisksu.
Reflash magisk ROM should be easier.

JLowell said:
I installed a gsi rom with supersu how do I install this do I have to convert su to magisk or reflash a rom with magisk?
Click to expand...
Click to collapse
Use unSU script and delete supersu files (there are many guides online), see if safetynet passes and install magisk.

Do I need to be concerned about that voltage shown by Accubattery?

Looks normal to me when charging,
there is still much of hardware safety protection for every battery.
Bypassing/disabling software limitation won't damage it.

请问此设备的安卓10系统可以使用吗

Hey, would it be possible for you to make just the 30 watt charging avaliable as a seperate module? I use NFS injector already and just want the faster charging, not magnetar.
Thanks!

Ebraheem Bambotia said:
Hey, would it be possible for you to make just the 30 watt charging avaliable as a seperate module? I use NFS injector already and just want the faster charging, not magnetar.
Thanks!
Click to expand...
Click to collapse
I too would love standalone module, but for now this works perfectly. Thanks

Any android 12 miui 13 support please ?

Related

Any interest in kernel patches to speed up USB charging?

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?

[MOD][TOOL] MaxLife v1.0.9c - Battery Lifetime Extender

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.

Fast Charge in Z00L(ZE550KL)

I have a Asus Zenfone 2 laser 5.5inch 720p running Custom ROM Resurrection Remix 5.8.5 Android 7.1.2.
Many people have been asking for quick charge support on this phone but there is no particular software to provide it.
You can use custom kernel from here
Fire kernel: https://forum.xda-developers.com/zenfone-2-laser/development/kernel-firekernel-t3703326
Poison kernel: https://forum.xda-developers.com/zenfone-2-laser/development/kernel-poison-kernel-z00t-z00l-t3702256
Using these kernel you can charge phone faster from 10%-90% in an hour with cellular data off and you can charge much faster with airplane mode ON.
Are you using the stock charger .?.
And what config you are using ?? (kern. auditor)
Chaitanya Kumar said:
I have a Asus Zenfone 2 laser 5.5inch 720p running Custom ROM Resurrection Remix 5.8.5 Android 7.1.2.
Click to expand...
Click to collapse
Sir please move this thread to general section....it's breaking XDA rules
kirito05 said:
Are you using the stock charger .?.
And what config you are using ?? (kern. auditor)
Click to expand...
Click to collapse
Yes I'm using stock charger. And kernel auditor setting are default I didn't change anything.
Will it work on cr droid 7.1.2 ?
sagar321 said:
Will it work on cr droid 7.1.2 ?
Click to expand...
Click to collapse
Yes it will work on Z00L devices running Android 7 and 8
Plz can u give me quick guide for flashing. I never flash kernel before
sagar321 said:
Plz can u give me quick guide for flashing. I never flash kernel before
Click to expand...
Click to collapse
Same as flashing any other zip really..
go to recovery and flash the kernel's zip.
sagar321 said:
Plz can u give me quick guide for flashing. I never flash kernel before
Click to expand...
Click to collapse
Select the zip and it will flash automatically.
If you download the .Img going(image file) then in TWRP install section on the bottom right there will be a "Install Image" option touch and navigate to the folder where you have downloaded the .Img file then swipe the install slider, as soon as you slide it TWRP will prompt you with two option
1.Boot
2.Recovery
Select boot partition and swipe the slider then it's done.
If you have Magisk/superuser install in your phone then you need to flash Magisk.zip/Superuser.zip again.
If you have any trouble PM me.
Do I need to flash both the kernel?
MGStech said:
Do I need to flash both the kernel?
Click to expand...
Click to collapse
No you can just flash anyone you want. You can try both to see which one will help you getting optimal performance of your phone.
MGStech said:
Do I need to flash both the kernel?
Click to expand...
Click to collapse
lol no ... just flash the one you like !
Chaitanya Kumar said:
Using these kernel you can charge phone faster from 10%-90% in an hour with cellular data off and you can charge much faster with airplane mode ON.
Click to expand...
Click to collapse
You lost 100% in 3 hrs? is the battery that weak or you used the device heavily? or is it because it also discharges as fast as it charges the battery?
Usually the kernel increases the mA(for fast charge it's 2100mA and above) so when you increase the mA, the device gets charged faster(in some cases makes the device heat bad, that's the case with moto fast charging) and when heat comes in, the battery starts to deteriorate and starts to lose power faster.
billysam said:
You lost 100% in 3 hrs? is the battery that weak or you used the device heavily? or is it because it also discharges as fast as it charges the battery?
Usually the kernel increases the mA(for fast charge it's 2100mA and above) so when you increase the mA, the device gets charged faster(in some cases makes the device heat bad, that's the case with moto fast charging) and when heat comes in, the battery starts to deteriorate and starts to lose power faster.
Click to expand...
Click to collapse
I'm a heavy user I game a lot in my phone so the battery discharged faster usually I get 7-8hours of backup.
The battery also got damaged (I had an accident) but still I take the risk for fast charge. Usually on heavy use I only get 2hrs of backup. I have kernel profiles for gaming(2hrs max) and powersaving(7-8hrs). The fast charge works fine it charges faster no heat build up and discharging depends on usage. So no need to worry.
Sorry, but your battery is dead. Because if your battery is have really 3000mah capacity, normal charger (1.35A max) is fully charge in 2h15min.
You must take a new battery and try again this test.
I'm too use heavy and i can take arround 4 hours SOT minimum. If i am use normally and a little play game i can take arround 8-9 hours SOT.
Also, ZE550KL's usb charge unit has 1.55A charge amper limit. It can't take more than 1.55A.

Limit Battey Charge % Android 11

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!

General [MAGISK] Advanced Charging Controller (Kernels that implement Battery Idle Mode Support)

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.

Categories

Resources