Question [SOLVED] Wireless charging issue, is it me or A13 ? - Google Pixel 6 Pro

Hello,
I was looking for a way to use Battery charg limit on my pixel 6 Pro, using a pixel stand 2. (because I'm using it a lot)
So when A13 came out, I rooted the phone, and started my research.
I found a message in a thread that specified a way to do what I want.
[APP][ROOT][4.0+]Battery Charge Limit v1.1.1​
jazic said:
I finally found the ability to 'pause' charging on the Pixel 5, 6 and maybe 6 Pro?
This work only with wireless charging but I'm sure the /dc/ folder for wired.
I use tasker to control the file:
/sys/class/power_supply/wireless/current_max
I did figure out how to have it always have the file set to rw with the profile itself by using "run shell" and enabling root:
chmod 0777 /sys/class/power_supply/wireless/current_max
Obviously you can set up a profile to control it with tasker but personally I have mine set to start charging full speed when the battery is 0 to 65% then start trickle charging half speed until it reaches 72%. Once it reaches 72% you can set the current level really low and it'll basically keep the charger cycling on and off at a very low input voltage so the battery will hang at whatever you set it at without dropping then charging back up all the time which imo is better than cycling power off at a certain level then charging back up.
I'm still experimenting with current levels but if you set it to higher than your charger can handle then it will just simply charge at max speed of your charger.
For trickle half speed charge I use: "500000" (500mA?)
For full speed charging I use: "2200000" (2200mA?)
For Battery Charge Limit I'm sure you can set the file to:
/sys/class/power_supply/wireless/current_max
Enable: 5000000
Disable: 1000
You will need to set the file as writeable maybe?
Any questions hit me up. Maybe it's another source to look for other phones.
Click to expand...
Click to collapse
I was thinking it all worked but in fact not...
For me now, wireless charging is very buggy.
Using Amper, i'm often in "not charging" or I'm charging at 4V and max 600mA.
I don't know if it's my fault or if it's related to the bug with the Pixel 6 wireless charging issue ?
Also, can someone give me the default value of this file "/sys/class/power_supply/wireless/current_max" mine is now set at 250000, to double check.
Thank you !

I found a solution on reddit !
Going to App > See all apps + show system apps > Search "pixel stand" > clear cache + clear storage
This fixed my issue so I guess it was A13 and not BCL.
Hops it cals help someone.

That's awesome! Thanks for letting us know.

Related

Kaiser Battery Status [kernel mod]

NOTE: I don't post kernels here anymore: look for my changes in the standard kernel now.
This thread is still useful for battery discussion, if you like.
I have gotten tired of seeing my battery go from 90% to 15%.
Why can't it go smoothly from 100% down to 5% or less, and back up again?
Why does nbheditor have to apply a 1.6 multiplier for battery capacity?
Can we get the temperature sensor working?
I'd like to get this fixed, and would welcome discussion.
First, in the new or old kernel, the battery status is managed by the file:
kernel/arch/arm/mach-msm/board-kaiser-battery.c.
I have several proposals:
a) Change the default KAISER_BATTERY_RATING to 1350, since the equations really do work out correctly, that the rating should match in mAh. Note: in the kernel, that's 2160 = 1350 * 1.6.
b) Add a thirty second maximum for voltage and current, before using them to guess the battery level. At first I used averaging, but maximum works better for old batteries.
c) When booting from HaRET, scale the battery level because Windows does it different. I don't understand how Windows does it, but I have figured out a scale factor that works.
d) When the ds2746 reports that it has lost power, assume that the battery may have been changed, and do a coarse recalibration based on voltage and charge current.
e) Eliminate the minimum of 15%: let the meter go all the way to zero.
f) Allow battery level to be set to any value at any time.
g) Report what the kernel thinks the capacity should really be.
h) Use ds2746 units directly since nbh-editor already scales mAh to units.
Also, questions:
1) How to convert the thermistor resistance (I think it is aux0r) to temperature?
2) Would be nice if the dynamically-adjusted capacity could be stored in flash. I don't know how to do that, but I know how to report it.
3) Should we have an option on the boot menu to manually set the battery level?
I have edited the new 2.6.34 kernel to act as I propose.
Since the modules must match the kernel version you are using, I have included modules separately.
Warning though that, although it seems to work properly for me, it might do bad things for you, especially to your phone's battery. In particular, the Polaris needs to be tested since I don't have one.
NBH file: for NAND install. Use nbheditor to edit, but put your battery's capacity under "advanced settings". For attempt #6, you can use the standard setting.
ZIMAGE: for HaRET install. Edit your default.txt to contain:
board-kaiser-battery.battery_capacity=2160 (your true battery capacity in mAh * 1.6)
board-kaiser-battery.haret_divisor=2200 (use a WinMo -> android scale factor of 1000/2200)
CAUTION: The 2.6.25 NBH images probably don't work. I'll have to learn how to make them!
NOTE: Attempt #7 and later are in the standard kernel, so are no longer posted here.
just setting this up on Incubus26Jc's Super FroYo 2.2 [Deodexed] [RLS15] [9/3/10]. I will let you know how it goes.
WOW, I´m glad somebody finally took this matter as serious as it is I´m not saying that others guy in here haven´t provided advice on this, it is just that nobody, afaIk hadn´t come with a "downloadable" solution, the only thing close to a real fix to me was to use the nbh editor and put the recommended capacity for my battery, it helped a lot to be honest cuz I used to get no more than 15 minutes of battery life, and after that I can use it for a few hours, unless I turn wifi and bluetooth of course, then it gets down to 15%, well I hope this really works cuz I´v been strugling with this for more than a month and I love android so much that I flashed on nand even though I knew about this problem, and I was about to give up on this, (was I?), thanks for this, I hope we get good results!!!
Isn't it that the latest kernel for froyo is 2.6.32? Is that your own build?
I wanna try your version. So far, how does all features? How is it compared to DZO's kernel?
More power!
Ok so I had lockups with Incubus26Jc's Super FroYo 2.2 [Deodexed] [RLS15] [9/3/10], I am loading up dzo's current Froyo and his 9-9-10 kernel for some base testing then I will install your kernel and updates and test again.
So, how do I install this? i mean, do I:
1- flash the new nbh.
2- install theandroidupdate.tar
done? I mean, do I have to do the whole "calibration dance" with it again or something? Or after i do this it will (in theory) perform as normal as it should? btw my battery is about a month old, so I guess if i put 2000 in advance mode, (not mah) it would be ok, right?
ps: I have donut installed, so I guess it might not work, but heck I´ve got to try this anyways, so I´ll go ahead and install it, in case it works, would you be able to tweak a donut kernel for us?. thanks in advance.
zack, how is it?
so far with dzo's latest froyo build and the attached kernel and update things have been very stable, however the battery is at 100% constantly. hopefully this will change as the battery is drained and recharged.
The kernel is dzo's with the experimental battery file.
Not ready for prime time. If your configured capacity is wrong, it gets calibrated as you run, but the calibration is not remembered when you reboot.
Sent from my Full Android on Vogue using XDA App
I'm looking for opinions on the individual questions in the first post. Especially, does anyone know how the kernel can store battery_capacity s it remains persistent after reboot?
If you search dmesg output for ds2746 you can see what the current capacity is.
Sent from my Full Android on Vogue using XDA App
I´ve installed it and after a while of letting both wifi and bluetooth on, it finally died and showed me 1% left and powered down all by itself, I had never seen 1% left on android, so that´s a good thing I guess, but after I connected the charger it started charging just fine, but in the console after typing dmesg it tells me that the battery has 4079mv and 54/3200 units, but I think that if the battery has 4079mv, it means it is fully charged, am I wrong? if anybody reads this please confirm this because I put it is still charging I don´t want my kaiser to blow up on me, lol. thanks.
ps: while charging it isn´t showing the amber led, but it has a red blinking led as when the battery is completely empty and not charger is connected (but in android the battery icon has the charging animation).
elander said:
I´ve installed it and after a while of letting both wifi and bluetooth on, it finally died and showed me 1% left and powered down all by itself, I had never seen 1% left on android, so that´s a good thing I guess, but after I connected the charger it started charging just fine, but in the console after typing dmesg it tells me that the battery has 4079mv and 54/3200 units, but I think that if the battery has 4079mv, it means it is fully charged, am I wrong? if anybody reads this please confirm this because I put it is still charging I don´t want my kaiser to blow up on me, lol. thanks.
ps: while charging it isn´t showing the amber led, but it has a red blinking led as when the battery is completely empty and not charger is connected (but in android the battery icon has the charging animation).
Click to expand...
Click to collapse
Do not worry. Nothing will happen to your phone. Electronic circuits inside the battery takes care of it. You have to repent attention to the current charge (mAh). When the value falls below 200mA, then the battery is full.
I've had two crashes (phone totally frozen, unresponsive) when on charger and full battery. Probably a coding error somewhere in this experimental file.
I'm also wondering which phone models use this source file?
Do some of them perhaps have different resistor values?
Do we have any historical information about why 10M Ohm was chosen as a resistor value, rather than 15 or some other value?
Millence said:
Do not worry. Nothing will happen to your phone. Electronic circuits inside the battery takes care of it. You have to repent attention to the current charge (mAh). When the value falls below 200mA, then the battery is full.
Click to expand...
Click to collapse
Thanks for replying, I know that the battery has some sort of sensor built in that tells the OS when it is full, but since we are dealing with calibration here (a.k.a I don't know when it is full or empty) I kinda freaked out a bit there, but thanks to your answer I feel (a little) relieve, the thing is that it's been plugged for more than two hours (I had to unplugged it cuz I had to return home from work) and dmesg still says something like: 4180 mv 145mah 50/100 (1604/3200 units) so when you told me about the current charge below 200mah you meant the number that appears on dmesg right after the (4180)mv? in this case it is 145mah, if so, does that means that the battery is already fully charged? cuz according to android it is only like 52% full. should I leave connected or should I unplug it (it is already unplugged just in case,lol). thanks.
It depends. It looks like your battery currently has 1002 mAh of charge, out of 2000 mAh. I doubt that you have a 2000 mAh battery. If you really have a 1350 mAh battery, you are more like 75% full.
I chose a lower limit than 200 mA for when the kernel thinks you are 100% full based on charge, since my phone charges at under 200 mA when connected to a computer, regardless of how full it is.
Please include what kind of phone you have. Otherwise I will assume you have a Kaiser.
n2rjt said:
It depends. It looks like your battery currently has 1002 mAh of charge, out of 2000 mAh. I doubt that you have a 2000 mAh battery. If you really have a 1350 mAh battery, you are more like 75% full.
I chose a lower limit than 200 mA for when the kernel thinks you are 100% full based on charge, since my phone charges at under 200 mA when connected to a computer, regardless of how full it is.
Please include what kind of phone you have. Otherwise I will assume you have a Kaiser.
Click to expand...
Click to collapse
I do have a Kaiser, and I do have a 1350mah battery, and as you said on the first post I edited the nbh to 2000 capacity using the nbh editor, so did I misunderstand first post and instead of 2000 capacity in advance mode I should have put 1350mah in simple mode, or should I have put 1350mah in advance mode in order to make android recognize the capacity of my battery? cuz as I see it now it seems it is the other way around now, cuz before android used to think that the battery was full when in fact it wasn't and now even when full android thinks it is not.
Put the battery rated capacity (1350) in the advanced setting, so it won't be multiplied by 1.6.
The conversion from dmesg units to mAh is: 625 x units / 1000 = mAh. Probably dmesg should show mAh so we don't have to calculate.
Sent from my Full Android on Vogue using XDA App
I am trying to use this kernel with cyanogen build, but it does not boot.
When I start haret it hangs. It moves the staus bar to the bottom of the screen and then freezes. (I can only reset via stylus os sim card cover)
The files I have in andboot are:
zImage-2.6.32-froyo-06-09-10_22 - the original zImage
initrd.lzma
zImage - the zimage with the battery fix
androidinstall.tgz - cyanogen install pack
androidupdate.tgz - update for the battery fix
startup.txt - modified for the battery test (zImage name and battery capacity)
haret-for-kernel-2-6-32.exe - haret
my startup.txt file is:
Code:
#alloctest 0x2000
set RAMSIZE 0x08000000
set RAMADDR 0x10000000
set FBDURINGBOOT 0
set MTYPE 1553
set KERNEL zImage
set initrd initrd.lzma
#
# The following kernel parameters are useful
# ppp.nostart - Set ppp.nostart=1 to disable starting the ppp connection on boot
# msm_sdcc.msmsdcc_fmax - The maximum frequency (in Hz) used by the SD controller
# pm.sleep_mode - The mode used when the phone is off
# 0=Power Collapse Suspend, 1=Power Collapse, 2=Apps Sleep,
# 3=Slow Clock and Wait for Interrupt 4=Wait for Interrupt
# Default is 1, use 1 for best power savings
# board-htckaiser.panel_type - Panel type used to power the panel off and on
# 0=Don't power off the panel (Default)
# 1=Sony 2=Topoly 3=Topoly (probably just the same as 2)
# lcd.density - Defaults to 160, 128 shows more on screen
#
set cmdline "ppp.nostart=0 pm.sleep_mode=1 mddi.width=240 mddi.height=320 no_console_suspend board-kaiser-keypad.atttilt=2 board-htckaiser.panel_type=1 hw3d.version=1 board-kaiser-battery.battery_capacity=1350 board_htckaiser.pmem_size=4 board_htckaiser.pmem_adsp_size=1 clock-7x00.a11=500"
boot
do I need to use another haret or initrd?
yesterday I left the phone connected to the charger all night and when I woke up (about 5hours and 30 minutes later) it had the green light turned on so it means that it got charged full, and dmesg gave something like this: 4180mv 28mAh and 100/100 (2076/2076 units) I gotta tell you, I had never seen such "low" values on units, its kinda strange, anyways I unpluggued it and went to work, so here I am, I´ll report back in a few hours after I stress this thing a bit to see if it really got all the "juice" the battery can take.
ps: I haven´t tried putting the 1350 (MAh) in advance setting, because since it says that it is charged (I know it may still be wrong) I decided to give it a go to see how it works with the current settings, after finishing testing this, I´ll try with 1350.
I don't know the HARET problem, sorry. Everything you are doing looks right to me. Perhaps you need to wait until this experiment is mature enough to be in a dzo kernel. Sorry!
Sent from my Full Android on Vogue using XDA App

Limit battery charging (root is required)

Since Lenovo P2 has an incredible battery life you rarely have to make full charges. I've been searching a long time for a method to set a charging limit, for instance at 80%, to preserve the battery health. It is possible to use the BCL app, Tasker as well as the Magisk Charging Switch module.
The path of the battery files responsible for the charging is /sys/class/power_supply/battery where you'll find two interesting files, battery_charging_enabled and charging_enabled.
There's only one problem; as soon as the screen turns off any limit set by you will be ignored. Now, there has to be a way to force the charging to stop while the phone is in idle state. Any ideas? I've already tried the obvious solution to whitelist BCL, Tasker respectively Magisk in the battery optimization settings, but it didn't work.
RR-O-v6.2.1-20190130-kuntao-Unofficial + battery charge limiter
RR-O-v6.2.1-20190130-kuntao-Unofficial + magisk + Battery Charge Limit works for me
I guess your limiters go to sleep when the screen goes off. Try to force that the screen stays on. Try to exclude them in the battery saving options. If you try the app Battery Charge Limit than it is working for me with a normal charger but not while chargeing through a PC.

[ROOT]Faster Wireless Charging using Automate

Untested on the Q Beta!
For information about the way the mod functions read this.
This mod is possibly dangerous given its nature of modifying the safeguards built into your phone by Google. I am not responsible for your actions using this mod. This mod is meant only for Pixel 3 and 3 XL devices, I would recommend against trying this on other devices.
All that being said I use this mod daily and decided to share. Attached is a ".flo" file used by the app "Automate," link to download from play store, to import the flowchart for the mod. The reason I used automate instead of the typical Advanced Charging Control Magisk module is due to the module having much more functionality that I didn't need or want. Examples include weird charging behavior with USB-PD chargers and overall charging instability. This also allows the mod to be disabled by booting in safe mode.
Details about the mod:
This mod may stop working after any android update
This mod seems to even allow non "fast charge" wireless chargers to be faster
This mod allows a max of 9v to be accepted through wireless charging instead of stock 5v without Google Certification.
This mod reverts whenever the phone stops charging (this is the part that this Automate Flow automates)
Details about the Flow:
This Flow requires 2 apps (Automate and Automate superuser permissions plugin) be installed from Google Play Store
This Flow requires superuser permission on the device (Magisk recommended)
This Flow does NOT modify /system
The file that is modified by the Flow is reset upon unplugging/lifting off a wireless charger so uninstalling Automate will undo the mod completely
The Flow runs like this:
Wait for wireless charging state to change
If wireless charging connected: run shell command then Go to 1
If wireless charging disconnected: Go to 1
So if the phone is not charging or cable charging there isn't an endless loop running.
Instructions:
Download and extract the .flo file
Download Automate app if you have not already
Open Automate app and go through its first time setup
Use the 3 dots menu in the top right to select "import"
Navigate to where you extracted the .flo file and select it
Select the new Flow that just appeared
Under Privileges check the checkbox "full (superuser) access..."
Google play store will prompt you to download the superuser permission app for automate
Grant superuser to automate
Press Start, you'll get a persistent notification about the flow running
OPTIONAL: Go back to Automate app's settings and check the "run on system startup" to enable the mod on boot
You can verify success based on the log in Automate or by observing the charging text on the lockscreen/ambient display. If it says "charging slowly" then the mod failed if it says "charging" then the mod succeeded. You can also check in apps such as Ampere, the charging current pre-mod for me was always <600ma and up to 1200ma after. Note after ~70% charge the Pixel 3(xl) seem to slow charging speed so have a <50% battery for a good comparison.
To uninstall the mod just uninstall Automate or open the Flow and then in the 3 dots menu press delete.
EDIT: Now available in Tasker flavor for those of you who use Tasker and don't want a second automation app running on your phone. Just open the .XML file and select open with in the top right and then Tasker on the pop-up.
@StykerB
Thanks for your work, but i use the App "Automagic" https://play.google.com/store/apps/details?id=ch.gridvision.ppam.androidautomagic
Attached is the flow for Automagic. Need also Root permissions.
Procedure:
1. wireless power connected
2. send command
I just installed this on my Pixel 3 XL and will try it out with my Choetech wireless car charger. Typically I was seeing < 500maH of current with this stock charger. I hope to see over 1A with this patch.
Thanks,
So we have finally found away around the google certified fast chargers?
Works great for me, Thanks.
Would be great to get the assistant features of the pixel stand working too.
I got 850mA when using this MOD and a Choetech wireless charger. Now I can top off my battery while streaming audio and running waze. Previously, I can only stay flat on my batter charge.
Well done!
I used the Automagic version. Worked good. Was seeing 500mA before then it bumped it up to 850mA - 1A range.
Thank you for this
Other Apps Charge money
Has anyone had an issue where it start charging and the 2 seconds later it stops and then starts again and keeps repeating?
Cozzeck said:
Has anyone had an issue where it start charging and the 2 seconds later it stops and then starts again and keeps repeating?
Click to expand...
Click to collapse
I've noticed this behavior with one of my old nokia wireless chargers or if i have a charging speed reading app open while the battery is >70% (when the battery management locks charging speed to 7.5w or less). But for me it seems to either go away after a minute or two or re-situating the phone on the charger.
Works great with my Samsung fast wireless charger! Goes from 600 ma to 1000+
Sent from my Pixel 3 XL using Tapatalk
Get this error using tasker. Any ideas? On April update. Was working previously.
01.07.14/E Run Shell: ->
01.07.14/E Run Shell: ->
01.07.14/E Run Shell: ->
01.07.14/Shell runBackground echo 9000000 > /sys/class/power_supply/wireless/voltage_max root: true timeout: -1
01.07.14/Shell start process-thread ID 263
01.07.14/E add wait type Shell1 time 2147483647
01.07.14/E add wait type Shell1 done
01.07.14/E add wait task
01.07.14/E Error: 1
PLEASE IGNORE THIS POST. I GOT MY ANSWER. SORRY.
Hm I'm trying to understand the exact shell command that is sent as I use Macrodroid.
What is the exact command I should use?
Also does this method still work on Android 10?

Themes / Apps / Mods [MOD/magisk/root] Set charging limit to 90%

Based on: https://forum.xda-developers.com/t/limit-charge.4355851/
All credits to @rickysidhu_
Attached a simple Magisk module to set the charging limit to 90% at boot time.
If you want to "undo", just remove the Magisk module and reboot.
foobar66 said:
Based on: https://forum.xda-developers.com/t/limit-charge.4355851/
All credits to @rickysidhu_
Attached a simple Magisk module to set the charging limit to 90% at boot time.
If you want to "undo", just remove the Magisk module and reboot.
Click to expand...
Click to collapse
I really appreciate you uploading this, man. However, not sure the masses realize that ACCA magisk module can not only do exactly this, but it also has a litany of far more features.
Not only that, but it can actually increase the charging speed slightly. Cool stuff.
Just flash the module, and then install the APK. Then going to settings and set the parameters/limit, or increased charging speed you want.
I can't seem to get this to work on my P6P.
I am running Magisk 23014
The module is installed and "on"
The Damon is running in the App and In settings only temperature control and automatically cycle through switches are selected.
But, it always charged to 100%
Any suggestions?
biTToe said:
I can't seem to get this to work on my P6P.
I am running Magisk 23014
The module is installed and "on"
The Damon is running in the App and In settings only temperature control and automatically cycle through switches are selected.
But, it always charged to 100%
Any suggestions?
Click to expand...
Click to collapse
I have the same experience.
I suspect we can use it but have to change something manually like setting what the control file is, based on the thread that's referenced in the OP:
rickysidhu_ said:
If anyone is wondering how to stop the Pixel from charging at a certain percentage, it's the following command:
Code:
echo 90 > /sys/devices/platform/google,charger/charge_stop_level
Replace 90 with whatever percentage you want to stop charging at!
Click to expand...
Click to collapse
biTToe said:
I can't seem to get this to work on my P6P.
I am running Magisk 23014
The module is installed and "on"
The Damon is running in the App and In settings only temperature control and automatically cycle through switches are selected.
But, it always charged to 100%
Any suggestions?
Click to expand...
Click to collapse
Until the correct switches are implemented in acc, you can make it work by using the current & voltage controls as the charging switch.
> Click on the gear icon for Custom settings
> Click the pencil icon next to Charging switch
> Change the value to 0 mA & Save
> Save the custom settings (save icon in the top right corner)
> Restart ACC daemon
craigacgomez said:
Until the correct switches are implemented in acc, you can make it work by using the current & voltage controls as the charging switch.
> Click on the gear icon for Custom settings
> Click the pencil icon next to Charging switch
> Change the value to 0 mA & Save
> Save the custom settings (save icon in the top right corner)
> Restart ACC daemon
Click to expand...
Click to collapse
Everything is good, until i restart the daemon. then the app crashes. When i restart the settings in charging switch have reverted to automatic.
... test charging switch hangs.
Have disabled pixel battery stuff.
Have force closed and deleted all data for app.
with no luck
biTToe said:
Everything is good, until i restart the daemon. then the app crashes. When i restart the settings in charging switch have reverted to automatic.
... test charging switch hangs.
Have disabled pixel battery stuff.
Have force closed and deleted all data for app.
with no luck
Click to expand...
Click to collapse
Yeah, I don't know why the "Test Charging Switch" hangs in the app. But I'm not sure why restarting the daemon causes the app to crash for you.. You can try to set the charging switch to 0mA, save and reboot
Question from a noob, but why would I want to have my battery at 90% instead of 100%? Does it have something to do with battery health?
batpoil said:
Question from a noob, but why would I want to have my battery at 90% instead of 100%? Does it have something to do with battery health?
Click to expand...
Click to collapse
Correct.
batpoil said:
Question from a noob, but why would I want to have my battery at 90% instead of 100%? Does it have something to do with battery health?
Click to expand...
Click to collapse
Yep. For the last five years, I never quick charge, I charge as soon as my phone gets to 25% and I try to only charge to 75%. That 50% take still lasts me about a day.
Good battery health is also a selling point when I sell my old phones on Swappa.
craigacgomez said:
Yeah, I don't know why the "Test Charging Switch" hangs in the app. But I'm not sure why restarting the daemon causes the app to crash for you.. You can try to set the charging switch to 0mA, save and reboot
Click to expand...
Click to collapse
I finally got it working after multiple uninstall/reinstall/reboot cycles...
Or at least I thought I did. I changed the AccA version from Developer to Master.
That seems to have stopped the crashes and everything seemed to be working correctly. I plugged it in at 75% charge when I went to bed, but when i woke-up this morning I was at 40% charge -Status indicated discharging.
After a few more app and phone reboots it began charging again and now seems to be working: charge to 80%, discharge to 70%...
One thing I did notice was, if I set my Superuser access to "ask every time" I am constantly asks to grant permission every 20-30 seconds.
If it continues to be an issue I will post the log files if you can tell me where they can be found.
biTToe said:
I finally got it working after multiple uninstall/reinstall/reboot cycles...
Or at least I thought I did. I changed the AccA version from Developer to Master.
That seems to have stopped the crashes and everything seemed to be working correctly. I plugged it in at 75% charge when I went to bed, but when i woke-up this morning I was at 40% charge -Status indicated discharging.
After a few more app and phone reboots it began charging again and now seems to be working: charge to 80%, discharge to 70%...
One thing I did notice was, if I set my Superuser access to "ask every time" I am constantly asks to grant permission every 20-30 seconds.
If it continues to be an issue I will post the log files if you can tell me where they can be found.
Click to expand...
Click to collapse
After some time, I realised that the current/voltage switch was not working reliably, especially if you switch between chargers with different capacitites.
But I did find a better way to make acc work on the Pixel 6 / Pro. It uses the same charging switch that the modules above uses, but it will work with the acc pause/resume charging.
I do not know how to set this up using the app becuase it actually uses a combination of two switches the charge_stop_level and charge_start_level.
What you need:
Root (Magisk)
acc magisk modules (AccA app installs this. Tested with acc v2021.11.3)
Terminal emulator app
Steps:
Connect the phone to a charger
Open the terminal emulator app
Elevate to root
Code:
$ su
Reset acc to default (to eleminate any potential conflicts with previous configs)
Code:
# acc -s r
Set your pause (pc) and resume (rc) charge levels
Code:
# acc -s pc=80 rc=70
Specify the control switch
Code:
# acc -s s="/sys/devices/platform/google,charger/charge_start_level 0 95 /sys/devices/platform/google,charger/charge_stop_level 95 5 --"
Validate the config. Check the values for resume_capacity, pause_capacity and charging_switch
Code:
# acc -s
Restart accd (acc daemon)
Code:
# accd
(Optional) Reboot
After that, you can tweak using AccA. Just leave the Charging switch & automatically cycle through switches" options untouched.
Further explanantion about the switch configuration
Code:
/sys/devices/platform/google,charger/charge_start_level 0 95 /sys/devices/platform/google,charger/charge_stop_level 95 5 --
- set charge_start_level to 0 when below the "resume capacity" so that the phone will charge
- set charge_start_level to 95 when at the "pause capacity" so that the phone will stop charging (effectively forces the phone to only start charging if the battery is 95%)
- set charge_stop_level to 95 when below the "resume capacity" so that the phone will charge
- set charge_stop_level to 5 when at the "pause capacity" so that the phone will stop charging (effectively forces the phone to only stop charging if the battery is 5%)
- the double hyphen at the end disables the "automatically cycle through switches" to guarantee that the specified switch is the only one that will be used.
It doesn't work for me neither way. Hmmm
Burt Squirtz said:
I really appreciate you uploading this, man. However, not sure the masses realize that ACCA magisk module can not only do exactly this, but it also has a litany of far more features.
Not only that, but it can actually increase the charging speed slightly. Cool stuff.
Just flash the module, and then install the APK. Then going to settings and set the parameters/limit, or increased charging speed you want.
Click to expand...
Click to collapse
Hiya. What's the best method to keep up with more recent AccA Magisk Module versions? Asking for a friend who doesn't compile stuff. Seriously, I see it on GitHub https://github.com/Magisk-Modules-Repo/acc and I see instructions for building and installing, but is there any easy way for us lazy folks who never compile? i.e. is there any easy way for us non-developers to get files such as "Advanced_Charging_Controller_(ACC)-v2021.11.3(202111030).zip" out of the GitHub entry? Thanks.
@foobar66
I've changed the prefix of this thread from "Development" to "Themes / Apps / Mods" as it didn't qualify for the first one. Please review the stuck guidances at the top of the forum and do not change the prefix back.
Regards
Oswald Boelcke
Senior Moderator
I have the latest ACCA from August and the Dec version of ACC which is installed under the latest Magisk and the December update. I am also running the Kirisa kernel.
My issue is that the settings for "Apply on plug" never stick. The capacity control settings seem to stick.
I made the edit to the default profile which seems to work.
Hey.
Is it possible to make this module work on every charge without reboot?
craigacgomez said:
After some time, I realised that the current/voltage switch was not working reliably, especially if you switch between chargers with different capacitites.
But I did find a better way to make acc work on the Pixel 6 / Pro. It uses the same charging switch that the modules above uses, but it will work with the acc pause/resume charging.
I do not know how to set this up using the app becuase it actually uses a combination of two switches the charge_stop_level and charge_start_level.
What you need:
Root (Magisk)
acc magisk modules (AccA app installs this. Tested with acc v2021.11.3)
Terminal emulator app
Steps:
Connect the phone to a charger
Open the terminal emulator app
Elevate to root
Code:
$ su
Reset acc to default (to eleminate any potential conflicts with previous configs)
Code:
# acc -s r
Set your pause (pc) and resume (rc) charge levels
Code:
# acc -s pc=80 rc=70
Specify the control switch
Code:
# acc -s s="/sys/devices/platform/google,charger/charge_start_level 0 95 /sys/devices/platform/google,charger/charge_stop_level 95 5 --"
Validate the config. Check the values for resume_capacity, pause_capacity and charging_switch
Code:
# acc -s
Restart accd (acc daemon)
Code:
# accd
(Optional) Reboot
After that, you can tweak using AccA. Just leave the Charging switch & automatically cycle through switches" options untouched.
Further explanantion about the switch configuration
Code:
/sys/devices/platform/google,charger/charge_start_level 0 95 /sys/devices/platform/google,charger/charge_stop_level 95 5 --
- set charge_start_level to 0 when below the "resume capacity" so that the phone will charge
- set charge_start_level to 95 when at the "pause capacity" so that the phone will stop charging (effectively forces the phone to only start charging if the battery is 95%)
- set charge_stop_level to 95 when below the "resume capacity" so that the phone will charge
- set charge_stop_level to 5 when at the "pause capacity" so that the phone will stop charging (effectively forces the phone to only stop charging if the battery is 5%)
- the double hyphen at the end disables the "automatically cycle through switches" to guarantee that the specified switch is the only one that will be used.
Click to expand...
Click to collapse
hi! I'm quite new to ACC(A) and was wondering how to better keep my phone's battery healthy. I was wondering about battery idle mode and saw that Roll3r found a working battery idle mode for use with Kirisakura kernel which I'm on. However, I'm just a noob with all the terminal things and don't know how to implement it myself. it's this one:
Just an FYI (because others have asked), the only ACC (Advanced Charging Controller) charging switch with working battery idle mode is:
gcpm/constant_charge_current_max 1866420 0
Several other switches tested as supported idle, but they'd all crash ACC when idle priority is enabled. You may have to add it manually.
Edit: I shouldn't say "only" - this is the only switch (supported by this kernel) that I found get the phone to idle with. There might be others out there, too.
Click to expand...
Click to collapse
was wondering if you could list the terminal commands for this and what options am I not to touch afterwards (since in your example, which I have been using, you said not to touch the cycling option anymore)
As someone who doesn't like touching command lines/terminals, I just did these commands following craigacgomez and hoped for the best, but this time using Roll3r's switch that they found that allowed battery idle mode
su
acc -s r
acc -s pc=80 rc=70
acc -s s="gcpm/constant_charge_current_max 1866420 0 --"
accd
edit: ironically, idk how you add this switch using ACCA itself because entering the switch then the start and stop values just kicks me back to the previous dialogue, the one that says if I should choose auto or add a switch
craigacgomez's switch ( "/sys/devices/platform/google,charger/charge_start_level 0 95 /sys/devices/platform/google,charger/charge_stop_level 95 5 --" ) oddly stops charging when I enable the cooldown cycle feature on ACCA. So if I set the cooldown cycle to start at 45%, my phone stops charging at 45%.
I'm testing Roll3r's switch ( "gcpm/constant_charge_current_max 1866420 0 --" ) now, which passed the battery idle mode test. I've stayed on 80% since reaching it and ACCA reports a -10 current every so often so definitely staying on that battery idle mode. I also have the cooldown feature enabled, also set to 45% and it was working well with no premature paused charging / battery idling.
Quick question, if it says charging speed goes from -10 to +10, does that already signify battery idle mode? That's what happens to either switch so I'm assuming it is since I know my phone would have dropped in battery by now
Delete

Themes / Apps / Mods [MOD/magisk/root] Set charging limit to 80/85/90/95% v2

After some readings on: https://forum.xda-developers.com/t/limit-charge.4355851/
and https://forum.xda-developers.com/t/mod-magisk-root-set-charging-limit-to-90.4363477/
( Credits to @rickysidhu_ and @foobar66 )
There is a thing I found and tested:
"charge_stop_level" must be used together with "charge_start_level"
Spoiler: Details
If set start @40 / stop @60, the phone will begin charging when (and only when) the battery drops to 40%, and stops charging @ 60%.
(it defines a range, and the first time the user hit the range boundary activates this range function)
If set stop @90 without setting a start, the phone will refuse the 2nd time charging until the battery drops to default 0 (or the battery service/phone has been restarted)
(This explained many "phone not charging" reports in the above links posts)
I like @foobar66's magisk mod solution. It is simple and safe.
It has only 1 line of working script in the zip.
So I "clone" it with some different values (added the fix, so 2 lines of script code in each zip now, that's all it does)
These are for the lazy people who don't want to deal with advanced settings, and who want a 10-second trouble-free simple solution for battery health.
The 4 clones:
P6n_charginglimit_95.zip (charging limit to 95%, it should give you an extra ~30% battery life span in lab-tested theory)
P6n_charginglimit_90.zip (charging to 90%, an extra ~60% battery life span)
P6n_charginglimit_85.zip (charging to 85%, double the battery life span, recommended for joe and johns)
P6n_charginglimit_80.zip (charging to 80%, should give more than double the battery life span)
Those numbers are the best estimates from other battery research papers, no guarantee.
To install, pick the one you want and flash it in Magisk.
To uninstall, simply disable or remove it in Magisk.
A12.1 tested. It should work on A13.
Edit: A13 is also confirmed working.
Reply problems if you find any.
I use advanced charging controller, I stop charging at 81% and I can regulate voltage as well. Temperature triggers etc it's great.
How does it increase battery life by 30%?
Or you mean battery health ?
I use ACC plus Tasker to keep the battery entering idle mode at around 50% while plugged. I got my pixel 6 last November, now the battery gets 82 cycles so far.
ChongoDroid said:
I use advanced charging controller, I stop charging at 81% and I can regulate voltage as well. Temperature triggers etc it's great.
Click to expand...
Click to collapse
bush911 said:
I use ACC plus Tasker to keep the battery entering idle mode at around 50% while plugged. I got my pixel 6 last November, now the battery gets 82 cycles so far.
Click to expand...
Click to collapse
The thing is, ACC monitors/controls too many components in the system that I don't fully get, and I am not sure if it conflicts with built-in "smart charging" or other circuit controllers or not, and have to combine a Magisk backend module and a root-access frontend APP to make it work with so many details settings to setup....... It is just......too heavy?
(or I am too old to tinkering those things.....my sad middle-age life)
These .zips are the "10-second solution" for lazy folks.
It does only 1 thing, It is transparent and super snappy (only 2 lines of script, no binary), and it can hardly go wrong.....it just works.
Paz9 said:
How does it increase battery life by 30%?
Or you mean battery health ?
Click to expand...
Click to collapse
You are right Shakespeare, "life span" to be precise, sorry for my English ahahahah.
bush911 said:
I use ACC plus Tasker to keep the battery entering idle mode at around 50% while plugged. I got my pixel 6 last November, now the battery gets 82 cycles so far.
Click to expand...
Click to collapse
Would you like to share how (ACC + Tasker. Tasker project, everything)?
Thanks
E!ad said:
Would you like to share how (ACC + Tasker. Tasker project, everything)?
Thanks
Click to expand...
Click to collapse
Yes, this might be device dependent. It is better to choose and set proper charging switch which supports battery idle mode.
Latest AcC module must be flashed
kylechen said:
The thing is, ACC monitors/controls too many components in the system that I don't fully get, and I am not sure if it conflicts with built-in "smart charging" or other circuit controllers or not, and have to combine a Magisk backend module and a root-access frontend APP to make it work with so many details settings to setup....... It is just......too heavy?
(or I am too old to tinkering those things.....my sad middle-age life)
These .zips are the "10-second solution" for lazy folks.
It does only 1 thing, It is transparent and super snappy (only 2 lines of script, no binary), and it can hardly go wrong.....it just works.
You are right Shakespeare, "life span" to be precise, sorry for my English ahahahah.
Click to expand...
Click to collapse
It doesn't interfere with the built in stuff and you don't need magisk module anymore. It takes 20.9mb on system so it's not heavy, I also like being able to adjust on the fly (have it set to 70% for long home use and 85% for out and about)
ChongoDroid said:
It doesn't interfere with the built in stuff and you don't need magisk module anymore. It takes 20.9mb on system so it's not heavy, I also like being able to adjust on the fly (have it set to 70% for long home use and 85% for out and about)
Click to expand...
Click to collapse
Are you referring to the Tasker implementation or ACC?
Zilla0617 said:
Are you referring to the Tasker implementation or ACC?
Click to expand...
Click to collapse
Acc
Yay finally a solution that works. Pixel 6 here, A13 Stock
Thanks.
ChongoDroid said:
Acc
Click to expand...
Click to collapse
Could you share your config file? What phone and is are you using? Thanks
Zilla0617 said:
Could you share your config file? What phone and is are you using? Thanks
Click to expand...
Click to collapse
Pixel 6 pro stop charging at 82 and start at 76 that's all I used
ChongoDroid said:
Pixel 6 pro stop charging at 82 and start at 76 that's all I used
Click to expand...
Click to collapse
So when I setup acc stopping at 80% on Android 13 and its place on pixel stand 2, the charging oscillates on/off. It would charge for few minutes then stop and charge for few mins and stop. Are you experiencing this? This behavior did not occur with Android 12
Zilla0617 said:
So when I setup acc stopping at 80% on Android 13 and its place on pixel stand 2, the charging oscillates on/off. It would charge for few minutes then stop and charge for few mins and stop. Are you experiencing this? This behavior did not occur with Android 12
Click to expand...
Click to collapse
Oh weird I get the osculation on car charger but it was always random. It won't even charge on 13.
Change the switch to 0 should have it working I don't know if that causes the switch enough
ChongoDroid said:
Oh weird I get the osculation on car charger but it was always random. It won't even charge on 13.
Change the switch to 0 should have it working I don't know if that causes the switch enough
Click to expand...
Click to collapse
Hmmm I don't use the front end app. Maybe I should try it and see if the behavior changes. Which version of the app are you using?
Zilla0617 said:
Hmmm I don't use the front end app. Maybe I should try it and see if the behavior changes. Which version of the app are you using?
Click to expand...
Click to collapse
1.0.35
kylechen said:
The thing is, ACC monitors/controls too many components in the system that I don't fully get, and I am not sure if it conflicts with built-in "smart charging" or other circuit controllers or not, and have to combine a Magisk backend module and a root-access frontend APP to make it work with so many details settings to setup....... It is just......too heavy?
(or I am too old to tinkering those things.....my sad middle-age life)
These .zips are the "10-second solution" for lazy folks.
It does only 1 thing, It is transparent and super snappy (only 2 lines of script, no binary), and it can hardly go wrong.....it just works.
You are right Shakespeare, "life span" to be precise, sorry for my English ahahahah.
Click to expand...
Click to collapse
I strongly agree, just not worth having to deal with acc, getting idle mode to work, debugging, getting it to work again and hoping it still works. If I get the time to do so might write a module that integrates a slider in settings or as a quick setting to set to what percentage it should charge and executing those lines of code with that percentage.
kylechen said:
P6n_charginglimit_80.zip (charging to 80%, should give more than double the battery life span)
Click to expand...
Click to collapse
I peeked inside this one (as it's the one I'm successfully using), and noticed the following:
echo 79 > /sys/devices/platform/google,charger/charge_start_level
echo 80 > /sys/devices/platform/google,charger/charge_stop_level
Click to expand...
Click to collapse
I get the "80" for the charge_stop_level, but I don't understand why "79" is the charge_start_level value? (But I'm new at this, so..forgive my ignorance.)

Categories

Resources