yashsingh1/xdaforums huggingface dataset:
[Magisk] VR25:
Hm... did you check CPU frequency times with the module disabled?

Also, just to make sure -- this doesn't happen when the charger is disconnected, does it?

By the way, here's a new build (out of beta already). This one has been pushed to the repo. So, everyone download it from Magisk Manager.

# 2017.11.14 (201711140)

- Added option to manually set the control files (from terminal) -- useful when the user knows which those are and doesn't want to wait for the next build to use cs. The config should be pasted directly on terminal.

- Decreased "cs auto" timeout values for better charging control accuracy (cs service).

- Samsung specific changes -- to address charging control inconsistencies.
[Magisk] x1reN:
Here is the zip, hope it's helping in any way to find out what's going on.
[Magisk] __riptide__:
Ok, so here's my results after overnight charging with settings cs 80:

1: Device charged to 80 as usual, then stopped and DID NOT drop even 1% as it usually drops during the night(on average it drops by 5~6 %)

2: after I disconnected it in the morning, it stayed at 80% for really long time when usually it drops 1% during that time even at idle
[Magisk] kryptikal:
Hi [MENTION=5228676]VR25[/MENTION],

Just wanted to let you know that the recent update (2017.11.14-1) does work for my Nexus 7 2013 on Lineage OS. Thank you for creating the update so quickly! I'm currently using it with Tasker but can also test the CS service if you'd like.
[Magisk] t3chwizard:
Tried the beta version and hoping it works. Will post back with results
[Magisk] VR25:
Perhaps your device does rely fully on charger power when plugged in...? :rolleyes:

If that's the case, then it's a nice exception. Else, that's magic.

"It stayed at 80% for really long time" -- that's something we have to test further.

Nice.

Note: cs service is enabled by default. So, if its running along with Tasker, then you should pick one. If Tasker is your choice, run "cs -a" to turn off cs service (the same command turns it back on). When you use Macrodroid/Tasker, cs service is automatically paused, though. Assuming it's enabled, it picks up "cs %/ %" values immediately. So, you can update your settings and it'll notice the changes. Much more practical than Macrodroid/Tasker in this regard -- I would say.

You should've jumped to the latest build (2017.11.14-1) already. ;)

[MENTION=2863435]Droid_JD[/MENTION], marlin should be fine with this one.

[MENTION=7217268]x1reN[/MENTION], you should try it too.
[Magisk] kryptikal:
[MENTION=5228676]VR25[/MENTION]. Thanks for the clarification. I'm disabling the Tasker profile and will run with only the cs service. I'll let you know if I see any of behavior. Thanks again!
[Magisk] VR25:
# 2017.11.15 (201711150)

- Reset battery stats automatically on charging pause (or manually with "cs -r"). Thanks, [MENTION=270407]Post-morterm[/MENTION] for pointing out "dumpsys" method.

- Preserve user-defined control & uevent files config across updates.
[Magisk] phantom146:
I was excited when I saw I can reset battery stats unfortunately it ended up with error:

Edit: check this out, as I have an Angler https://github.com/sriharshaarangi/BatteryChargeLimit/issues/10
[Magisk] VR25:
Thanks for the info. I know this battery stats reset method fails on a couple of devices/ROMs. Unfortunately, that's the only workaround I'm currently aware of. I've been seeking more and more information on this. Hopefully a universal solution will surface sooner than later.

Now, about your device and the module -- does cs work on it already? If not, run "cs -c", paste the following config directly on terminal and hit ENTER twice:

/sys/devices/soc.0/qpnp-smbcharger-17/power_supply/battery/charging_enabled 1 0
[Magisk] AlexBurnout77:
Alright. Thanks for the great support you provide for your users, but even 14-1 isn't working for me (OnePlus 3, Magisk 14, beta channel, Android 7.1 - open beta 24). It worked flawlessly before but now the terminal says "cs not found". I've asked you before for a previous build, not sure why you didn't want to give it. I am asking you again.
[Magisk] x1reN:
Have it installed now. Here a screenshot.
[Magisk] derkleinebroicher:
first thing, you do in terminal is write su, then tap enter. this is to grant root permissions. after this, try again.
[Magisk] VR25:
If these failed, you could be running a relatively old acc version.

If acc -v says so, flash the latest acc again.
[Magisk] the_poseidon:
I have checked on terminal also in app it seems i use the last one, am i right?
[Magisk] VR25:
Yes, you're all set.
[Magisk] the_poseidon:
Thank you so much!
[Magisk] ktmom:
[MENTION=5228676]VR25[/MENTION], I for one wouldn't mind if you had a Patreon account. I'd appreciate the ability to give you a monthly contribution rather than trying to remember to hit you up annually [emoji16]
[Magisk] eos9d:
I don't have curl installed on my phone so acc -u failed. Can you provide a link to this version? I can only find v202003100 on github or telegram group.
[Magisk] ktmom:
Just a few posts back (a link to 202003100 is the development release);
[Magisk] eos9d:
202003101 maybe a typo as VR25 had cleared with me that 202003100 is the latest dev version. Thanks anyway.
[Magisk] VR25:
Thank you very much!

I do have a Patreon account: https://patreon.com/vr25 .

https://github.com/VR-25/acc/releases/download/202003110/acc-202003110.zip
[Magisk] jaggillararla:
Can acc trick my phone it's charging at 85% constantly when it reached at 85%? Instead of cutting the power to the phone and then recharging ? Battery charge limit did this on my pixel 2 like 3 years ago
[Magisk] VR25:
Which device are you using now?

This depends on the kernel. I call it "battery idle mode".

Run "acc -t --" to test yours. You should see at least one instance of "battIdleMode=true". Finally, enforce a supported switch with "acc -s s".

A better way is setting a voltage* limit - given that your kernel supports it (most don't) - and disabling** the pause/resume feature.

* "acc -s v 4100" 4100 millivolts == 4.10 volts

"acc -s v -" restore default

** acc 101 10

Refer to the documentation (README.md) for additional details: https://github.com/VR-25/acc/blob/dev/README.md/ or "acc --readme".
[Magisk] VR25:
**ACC 2020.3.14-dev (202003140)**

- `acc -s v`: fixed "voltage unit not shown"

- `cooldownCurrent=(file raw_current charge_seconds pause_seconds)`, cooldown_current (ccr): dedicated and independent cooldown settings for quick charging

- General optimizations

- Updated documentation

Flashable zip: https://github.com/VR-25/acc/releases/download/202003140/acc-202003140.zip

Latest AccApp (1.0.23 (27)): https://xdaforums.com/attachment.php?attachmentid=4968491&d=1583865090

Note: the app ships with an older ACC version. After installing it, flash the latest ACC zip.

COVID-19 and the immune system: [youtube]cjUOpvmDE7k[/youtube]
[Magisk] sodade21:
Hello. I have Lenovo Phab 2 pro. I finally was able to rooted it with magisk. mostly cause I wanted this app. sadly It does not work... It doesnt say its not supported but whatever options i did chose i could not make it to obay to the limits i had set. I have read that if the device is not supported I might be able to find the right file at sys/class/power_supply/battery and try to see if something seems to working. I found a file called "Status" and with the text editor i saw that had Discharge and when i connected the power it changed to Charge. So i tried to edit it while i was charging it to the option "Discharge" but I couldnt save the file i didnt had permissions. i had the root explorer and all... so I don't know why I couldn't. then i tried to manually put that Status file on the app with Charge/Discharge as on/off tried it but still did not applied the limits.... Is it possible that the app cannot get the needed permissions to edit what it needs thus is not able to work? if thats so is there any way to fix it? Any other tips? thanks

EDIT: After all the right one was elsewhere. /sys/device/USB/soc.0/something i cant recall now/power_supply/online 1for on and 0 for off!... U can go with your root manager and at sys search for online its the one that its NOT cpu but power_supply. open the online file and thats your file.

So when i found that Online is the right one for my Lenovo i opened the app and i have setting where that online file is. checked the rewrite battery stats and now when it reach the limit it stop charging and sometimes when its about to drop gives a bit juice so it is stay about that range...its what a read somewhere that some models keeping the same amount just from the AC. also because if its nature of going on and off regulary i chose to disable toast notification from the app settings.

Also i suspect that exactly the same its on Lenovo tab 3 pro (the one with the projector) i saw the file there first but because the app say its not supported i couldnt test it.. maybe a dev here can make it happen for that tab as well...

PS: the location might vary a bit the key factors are sys/device/usb/power_supply and online at the end.... -thus try searching for "Online" at /sys. i dont have the phone atm i gave it to my mother thats why its mandatory to have that app cause she charge it 24/7..... :p I hope it helps a few Lenovo friends ;)
[Magisk] VR25:
Interesting Discovery

While ...online 1 0 works on this particular device, it was found to be problematic on the Nexus 7 2013 (flo) - writing to it triggers a spontaneous reboot. On most devices, the action has no effect.

In order to add official support for these Lenovo devices, I need /sbin/.acc/acc-power_supply-*.log from each - and confirmation that ...online 1 0 works on both.
[Magisk] jal3223:
Has anyone found the best settings to slow charge the Pixel 4XL? It seems to get rather warm when charging. If prefer it as cool as possible no matter how long it takes to get it to 80%. Thank you.

[MENTION=5228676]VR25[/MENTION] By the way, thank you so much for creating this. I have used it on multiple phones. You did a great job with all of the customizations.
[Magisk] VR25:
You're welcome!

Install the latest version (linked previously) and try limiting the charging current to 1000 mA or so: acc -s c 1000.

If the current still raises above* your limit, try enabling the cooldown cycle: acc -s cooldown_charge=50 cooldown_pause=10 cooldown_capacity=40 cooldown_temp=40 max_temp=45.

* Check with acc -w.
[Magisk] jal3223:
Thank you. I'll give it a try today. Is there an option inside of the app to do the same thing? Or are commands the only way to achieve it?

Edit: it seems it still rises above 1000 on the current after the command. I'll try the cooldown cycle next. Thank you though!
[Magisk] jal3223:
Sorry, last edit. It does seem to limit to 1000. Thank you for your help!!
[Magisk] CheepPlüm:
Thanks for the great app...one question...what or how must i config must i do for my Redmi Note 8?

I want it to charge max.with 1000mah not with 2000or more....

It works flawless charge stop by 82%....

Greets
[Magisk] Scarr3:
The button to activate and deactivate ACCA stopped working on last update. I woke up and saw my battery at 100%. The app work flawlessly untill you press that button and it go from blue to grey. When i press it once, i need to restart my smartphone to get ACC working again.
[Magisk] iPAQ 6515a User:
Where did you get the latest ACCA app from?

Nvm, found it.
[Magisk] jal3223:
Hey man, I'm sorry to bother you again. I'm having issues with the app regarding the charge percent cutoff. I have to set the Ma limit manually every time I restart the phone to get it to stick, but the phone still charges to 100%. I have the limit set to 80, and the phone does wake the screen when it hits 80. However it then after some time continues to charge to 100. Is there some kind of failsafe that is preventing it from limiting the charge to 100 on the Pixel 4 xl? Has anyone had luck getting it to work?
[Magisk] VR25:
ACC 2020.3.30-dev (202003300)

- -C|--calibrate: charge until battery_status == "Full"

- acc -i: fixed current_now conversion (Redmi 6 Pro and other msm8953 based devices)

- acc -u, install-latest.sh: optional -k|--insecure flag

- accd manages capacity_sync loop_delay_charging, loop_delay_discharging and switch_delay parameters dynamically

- Charging switch tests take significantly longer (switch_delay=18); this leads to more consistent results

- Enable Android battery saver on capacity <= shutdown_capacity + 5

- Enriched help text (acc -h|--help)

- Major optimizations

- More modular design

- Portability enhancements

- Vibrate 3 times when an error occurs

- Vibrate 5 times on capacity <= shutdown_capacity + 5, and again on each subsequent capacity drop

- Vibrate 5 times when acc --calibrate reaches 100%

- Updated documentatio

https://github.com/VR-25/acc/releases/download/202003300/acc-202003300.zip

FAQ

> Why, when and how should I calibrate the battery?

With modern battery management systems, that's generally unnecessary.

Many low-end and old devices are not as sophisticated.

If your battery is underperforming, refer to https://batteryuniversity.com/index.php/learn/article/battery_calibration.

The calibration command is acc -C. It lets the battery charge to true 100% capacity (POWER_SUPPLY_STATUS=Full) - meaning, as soon as this command reports 100%, it's time to unplug. Subsequently, the battery must be allowed to discharge fully - i.e., until the system shuts down.

Thanks for reporting!

Try the latest release.
[Magisk] VR25:
Config parse error fix (paste and run as root):

sed -i 's/^On /# On /' /data/adb/acc-data/config.txt; sed -i 's/^On /# On /' /sbin/.acc/acc/default-config.txt
[Magisk] jal3223:
Thank you for the update! I'm having a lot of trouble with the default txt though even after running the script with root. I have gotten it to somewhat work, but on a reboot it stops working again. I'm now getting force closes on the app. It does seem to be respecting the 1000ma charging limit when it is working now, but doesn't stop charging at the limit set. I tested several charging switches, and have tried two that "works". Any advice? Should I uninstall the app and module and try again?
[Magisk] VR25:
**2020.3.30-r1-dev (202003301)**

- Misc fixes

- Preserve as many config parameters as possible across (up|down)grades

The default config had typos that caused a lot of trouble. The zip will be pushed to the repo later. I'm currently experiencing issues with the GitHub website.

EDIT

https://github.com/VR-25/acc/releases/download/202003301/acc-202003301.zip
[Magisk] jal3223:
It seems to be working now! Thank you man. The cool down as well as the charge limit is working on the Pixel 4xl. I'm going to do more testing on the Ma charge limit and I'll let you know if it works. Before, I could get it to take through commands in Termux, but it would then not charge to a limit. So it was one or the other. I'll see if this update fixes it.

Thank you again!
[Magisk] gorilla p:
This latest release seems to break ACCA.

Going back to the "Bundled" version gets it working again. Is there anything that I should know about getting ACCA to work with this update?
[Magisk] the_poseidon:
On last couple updates i faced with same pronlem n solved this way :

First install new update via magisk, then uninstall ACCA, reinstall ACCA n then restart

I use ACCA version 1.0.23 (27) btw
[Magisk] yukihiroo:
Does this work even my device is power off?
[Magisk] svbarbosa:
Absolutely not!
[Magisk] VR25:
All you have to do really is upgrading AccA.

A previous post links the latest APK (v1.0.23 (27)).

If you still face the same issue, clear AccA's data and reflash the latest ACC zip.
[Magisk] eos9d:
Hi VR25,

I noticed that starting from v20200330, "accd manages capacity_sync loop_delay_charging, loop_delay_discharging and switch_delay parameters dynamically", and the loop_delay option now takes a (a,b c) format parameter which is not yet documented. So how should I change the options to best suit my Pixel 3? Thanks for your attention.
[Magisk] VR25:
**v2020.4.4-dev (202004040)**

- acc -(e|d): do not do unnecessary work

- acc -f: fixed capacity limit bypass

- acc -F: general fixes and optimizations

- accs: acc foreground service, works exactly as accd, but remains attached to the terminal

- "acc -t --" is now "acc -t"

- ACC/service trigger vibrations on certain events (charging enabled/disabled, errors, auto-shutdown warnings and acc -C 100% reached); vibration patterns are customizable

- Auto-reset broken/invalid config

- Enhanced acc -C compatibility

- Fixed busybox setup issues on devices not rooted with Magisk

- Misc fixes

- Major optimizations

- Updated documentation (run acc --readme or acc --help)

https://github.com/VR-25/acc/releases/tag/v2020.4.4

EDIT

Although not directly mentioned (part of major optimizations), this version automatically manages charging control settings, dynamically.

The goal is reducing user intervention as much as possible.

Two of such settings are charging switch and switch delay.

In the past, for optimal setup, people had to run acc -t, enforce a charging switch and play with switch delay.

Now, acc/d automatically set a working charging switch (or group of switches) - and the corresponding switch delay.

Another major highlight is automatic capacity sync toggling.

This should make Pixel users happier.

Finally, acc and acc service* support custom vibration patterns on specific events.

One of these events is a set of 5 auto-shutdown warnings** (starting 5 points above shutdown capacity and repeating on each subsequent capacity drop).

* Since accd is not attached to a terminal, it can't trigger vibrations.

A new executable was created to mitigate this shell limitation: accs (mostly useful for debugging).

It can run in the background like accd (accs &), but with a drawback - the controlling terminal must not be closed/killed.

** accd also enables Android battery saver.

For additional information, refer to acc --readme.

Actually, that loop delay syntax is wrong. It was an edge case.

That said, users no longer need to configure anything related to capacity sync. In v2020.4.4-dev, acc is even smarter.
[Magisk] lm089:
apart from the fixes you mentioned it also appears to solve some flaws I observed when using latest ACCA V 1.0.23 (27) (with the previous acc version ACCA on my devices wouldn't stop/start acc correctly, or wouldn't the daemon's status correctly) :good:

One question: when I start acc in terminal mode on my 2 old Xperia devices then edit config.txt for some reason nano is used as default editor. Which is great as I never liked VIM.

On my daily driver device (OnePlus 6) however it's always VIM. And if I type

acc -c nano

I only receive a

/sbin/acc: nano: inaccessible or not found

. This is using termux with nano pkg installed.

Is this something that can be configured for acc?

Thanks!

=== EDIT ===

Just ran into a problem while testing charging switches for my OnePlus, and this can be reproduced.

I tried 3 ways:

1) acc's terminal menu ("b" key)

2) 'acc -t'

3) 'acc -t --' (I'm aware that you dropped the additional '--' for your latest version, but I wanted to try

I added screenshots for all three attempts as well as the log that was created for the first attempt (terminal menu call).

To explain the situation: at the time I was calling that command the device was charged beyond the charging pause level (i.e. 80%). The charging switch test first tells me that I need to be charging, then tells me to wait a few minutes, then after a while puts the device into charging mode. And that's where the test mode is killed.

One additional info: with the previous dev version (V202003301) I could easily test and define charging switches

For the moment I'll revert to V202003301.
[Magisk] VR25:
Very nice!

To use Termux's nano, you have to run tsu (over su) or tsudo (over su -c).

Install Termux's su and append /sbin to PATH:

$ pkg install tsu && echo -e "\nPATH=$PATH:/sbin" >> ~/.bashrc

Then you can either run...

$ tsudo acc -c

Or...

$ tsu

# acc -c

Note: since nano is the default editor, you don't need to type "acc -c nano".

Sneaky typo...

Easy fix - paste and run the following on terminal:

su -c "sed -i '/charging-switches/s/charging/ch/' /sbin/.acc/acc/acc.sh && chmod +x /sbin/.acc/acc/acc.sh"
[Magisk] paolocorpo:
Dear [MENTION=5228676]VR25[/MENTION],

Today I noted that the Telegram chat group named “Advanced Charging Controller” (where you and many others users were sharing their experience) has disappeared

Do you know the reason why ?

Thanks

Paolo

Inviato dal mio iPhone utilizzando Tapatalk
[Magisk] VR25:
The group is still live. You may have missed the invite link.

https://t.me/acc_group/
[Magisk] Mickey03:
Finally, I am here!
[Magisk] paolocorpo:
Thanks bro

I am there now
[Magisk] VR25:
**v2020.4.8-beta (202004080)**

- acc -t: fixed "charging-switches: no such file" error

- accd: fixed crash on plug/unplug that affected some users

- Current control optimizations

- Enhanced battery calibration helper (acc -C)

- More intuitive versioning scheme

- Stricter config integrity checks (auto-reset broken config)

Flashable zip: https://github.com/VR-25/acc/releases/download/v2020.4.8-beta/acc_v2020.4.8-beta_.202004080.zip

What a surprise...

I though you were already on xda!

Are you a government spy?
[Magisk] Vogie:
Is there any way to prevent charging by computer USB or any slow charger?

I think slow charging will damage battery. right?
[Magisk] kdrkdr:
Serous? Slow charging is good for battery
[Magisk] Vogie:
Because of my work I have to connect my phone to laptop and I think it would be bad for battery to keep charging.
[Magisk] kdrkdr:
If you limit the charging level to for instance 85% I think its OK
[Magisk] DJsushi123:
Hey mate! Maybe a bit too late but I decided to answer anyway. It is possible to block this wakelock using Franco Kernel Manager (all the other wakelock blockers don't detect it). Take a look at Step 7 of my guide here:

https://xdaforums.com/oneplus-6/how...ing-custom-t4079937/post82231443#post82231443
[Magisk] VR25:
What kills the battery is continuous charging at elevated temperature and voltage.

For long operations, keep your capacity limits within 40-60% (I use 43-45) or limit the charging voltage to 3920 millivolts (if your kernel supports it).

For additional insight, refer to https://batteryuniversity.com/index.php/learn/article/how_to_prolong_lithium_based_batteries .

I read that acc's wake_unlock doesn't help.

I doubt Franco Kernel Manager does.

Keep in mind that blocking that wakelock in the first place may not be a good idea.

It's acquired by the device's battery management system to watch the battery while the charger is plugged.

See if enforcing a different charging switch (acc -s s) helps. The latest beta may have a greater number of switches for your device.

Second to picking a different charging switch is having `resume_capacity = pause_capacity - 1`.
[Magisk] the_poseidon:
I am using Acc on my mi 8 lite device which has 3350 mAh battery, daily i use %50 battery as my circle %80-%30 charge limit

The charger i use same as attached, normal charger 5V-2A output

So what should be my charging limit as mV or mA? Or how can i find it?

Also you suggest any circle for full battery charge to low? Monthly or each 3 months

Thanks