yashsingh1/xdaforums huggingface dataset:
[Magisk] bizkit_120:
Correct.. however if you use a 5w slow charging (at least this is what I'm doing for over night charging), you will never see phone over heating , with that said ACC controller temperature features is really not required ..

Only reason you enable temperature control is you don't wanted phone overheating degrading battery and speed is not your priority....so just go with 5w charger... in contrary,if you need boost up battery real quick before head out you definitely turn this feature off and use 50w charger.. depends on your needs.. anyhow temperature control for me still a bommer, I just don't see in which situation you need this on..

Anyone who use this temperature features let me know your opinions
[Magisk] xtzy:
I have the phone Oneplus 7. Charging switch on previously installed firmware the android 13 in the app AccA could be selected adapted to these phones and he in the app AccA showed the temperature of the battery online. I switched to a stock version of the firmware, android 12, and this switch is not in the AccA app. The temperature of the battery is constantly at 24 degrees, i.e. there is no point in adjusting the temperature of the battery. Please tell me the charging switch settings for oneplus, because I do not understand this.
[Magisk] Uluru25:
Acca is not maintained (as you may now), therefore terminal is recommended to configure acc. But if you nevertheless want to use the gui, you can open a terminal (with su rights), then enter "su", followed by "acc - u -f dev" to get the very last acc build, which is constantly enriched by new charging switches. Then enter "acc" to open the dialog and enter "b" to test the switches.
[Magisk] Uluru25:
How to return from a dev build to a stable version?

If you want to return from the "bleeding edge" of dev builds back to a stable version, run the following command in a terminal (w/o the ""):

1) "su"

2) "acc -u master -f"

In case you want to rollback even further, you can type "acc -u master^1 -f" to get the previous stable release)

Accordingly, "acc -u -f dev^2" will bring you back two dev versions below the current dev build. Surely, with this syntax you can also downgrade to other builds.

This is also described in the documentation but maybe having posted it here is more convenient for some guys.

🤠
[Magisk] Hammerfest:
Is there a different front end anyone can recommend?

I cannot tell if AccA pulls latest release or if its using old version.
[Magisk] Uluru25:
First, for what do you want to have a frontend? I am asking in the hope to be able to show you how to use acc without any of the outdated frontends.

But back to your question: my own "evolution" was Acca fronted=> acc settings frontend => terminal use.

🤠
[Magisk] MZGSZM:
Hello!

Seems from a quick search through this thread that I'm probably not likely to be able to control charging while doing it wirelessly. Which is a bummer but hoping there might be a way to better control it in the future. I do charge most often these days wirelessly so I have disabled ACC for the meantime and it seems to just repeatedly stop and start charging when the daemon is running. This was one of several reasons I decided to root my Pixel 6 Pro after recently removing its carrier lock and switching providers. But such is life, I suppose

I am, however, very happy to see this module is still being maintained as the last time I used it was several years ago now. Thank you for your efforts! Would the logs I collected from ACC be of any use? Happy to upload them if so.
[Magisk] Uluru25:
It seems that the dev is more active in his TG group, here he uploads very frequently new (dev) builds and gives support to questions.
[Magisk] VR25:
As of now, the latest version is v2023.9.27.1-rc.

Have you tried it?

You can upgrade directly with acc -u dev.

Looks like your system is fighting against acc.

ACC disables charging, the system re-enables it.

It may just be a matter of using another charging switch.

Upgrade, see which switches work (acc -t) and what's currently set (acc -sp sw). Pick a different switch and change your pause capacity (e.g., acc 69) temporarily to test.

If all charging switches get stubbornly reset by the system, try acc -s fo=true. It'll make acc more aggressive (force_off). We'll talk about logs if everything fails.
[Magisk] MZGSZM:
When I've got a bit of time to fiddle with it, I'll give that a try. Thanks!
[Magisk] brackenhill_mob:
Anyone know tha name of @VR25 TG group? A search for @VR25 and ACC came up blank for me. (TG newby so may be that I'm being dumb)
[Magisk] goRt:
Links are on the GitHub page
[Magisk] brackenhill_mob:
Thanks - the one place I never through to loook!
[Magisk] MZGSZM:
Seems from my testing on the development branch that the module is now working as intended. Thanks!
[Magisk] BEDBOI2:
Since I have a Xiaomi, does anyone know if I can install it and then enable/disable it from Magisk just when I need it? (I always have the phone connected on a PC)
[Magisk] Announ:
Google Nexus 10 is unsupported on cs 2017.11.25-1 with Magisk v14.5 on LineageOS 14.1-20171119_120135-UNOFFICIAL-manta.

Uploaded cs_debug.zip as requested: https://tknk.io/UXP9
[Magisk] psychoela:
[MENTION=5228676]VR25[/MENTION] debug-2. example cs 98 35, changing finish 98 auto stop as usual, after drop 80% i ran cs -e to changing back then cs -a to resume service,but changing not stop as value,can you check this,thanks:D
[Magisk] sscheib01:
the cs service consumes a lot of battery life. any body else noticed that?
[Magisk] wilberfan:
[deleted]
[Magisk] Jaymin.0.1910:
I really, really appreciate your efforts, and I hope people like ya never stop putting in their hours for such good work.
[Magisk] Hastaloego:
[MENTION=5228676]VR25[/MENTION] Hi there seem to be a problem if I start charging outside of the PAUSED% and RESUME% limits.

I use "cs 80 50" and did start charging at 31%. I had to unplug at 43% and continued charging at 40%.

But then my Phone Op5 Stock Rom didn't stop charging at 80% as expected.

I checked with "cs" to see if the services are indeed running, maybe with default values 90 10.

(Btw is it possible to include the last settings into the "cd -i" output ?)

then at 92%, I used "cs 80 50" again, but the phone still didn't stop charging and I unplugged 95%.

this only happens if I charge outside the limits. if I start charging within, it stops at PAUSED% as intended.
[Magisk] Jaymin.0.1910:
Hey VR25, I simply replaced "cs service" with "cs service &" in the service.sh script and moved that script into CS module directory and magisk daemon was not stuck in CS infinite loops. Here "&" at the end of the line executes the command in background, so, the rest part will get executed without waiting for the "&" command to finish executing. I believe, this way, there will be no need to move service script into "zzz-cs-service"
[Magisk] Jaymin.0.1910:
Hey VR25, I loved the cs service feature so much, but with the lagging bug, I got really frustrated. So, I decided to do some debugging on the module. I first added 'set -x /cache/cs.log' to cs script and let cs service run. As I read cs.log multiple times I found out the bug is with the PATH variable and is produced by looping method you're using for cs service. You're executing cs script consinstently, so PATH variable gets longer and longer. So I replaced your method with a while loop like this,

while :

do

** code to execute **

done

where ":" is a shell command which always returns true. This way, my phone is not lagging anymore.

Or else you could preserve OLD PATH before exporting NEW PATH and as cs service loop iteration has finished set PATH to the OLD PATH, which preventing PATH getting longer might help ( didn't try that , for me while loop fixed it )

And second thing, instead of sourcing cache and battery level files, do something like this

get_prop() { sed -n s/^$1=//p $2; }

batt_level() { get_prop batt_level battery_level_file_here; }

echo $(batt_level)

which I think, might save RAM, too

And reviewing your debug builds, I hope you know that executing "cs service" basically runs program cs with argument service so, not only the service part, entire script will get executed.

VR25, and everyone else please hit thanks if I helped you with the lagging bug.
[Magisk] fred.lyon:
Hi VR25, Magic Charging Switch seems to be what I'm looking for since a long time...

but I get "unsupported device" message after "cs -i" command.

I've attached my log, it would be great when you can have a look!

Thanks!
[Magisk] VR25:
Development Status Update

- I'm aware of cs service issues such as inconsistencies outside of set thresholds and lag/memory leaks

- Other cs components have issues too

- Got all the debug zips up until this point

- Fixed a major portion of the issues reported and a couple I noticed myself

- Magisk v14.5 is fully supported now, along with a good number of previous and possibly future versions (more future proof & backwards compatible)

- cs -i now displays current settings (including service status) in addition to battery info

- cs debug files have a new format -- cs_debug_Device_Name

- Currently working on

-- Major optimizations to prevent high memory consumption over relatively long periods of non-stop operation

-- New and more sophisticated control file identification algorithm which automatically finds the required targets instead of relying on a predefined list of full paths. This saves massive space (lines of code) and significantly improves performance & device compatibility.

--------------------------------

As I've been quite busy lately with general life stuff, this may take a few more days to finish, but once done, you'll be happy to have the new cs zip -- so, heads up!
[Magisk] NekroLime:
Is there anyway to reset the configuration? My setting stopped working after a charge cycle
[Magisk] wilberfan:
Yay! You keep this up, and we'll make sure you get a promotion...to VR26! ;)
[Magisk] wilberfan:
Here's a feature I would enjoy: A timer function that would delay charging until a set time. Plug in at bedtime, but have charging delayed until, say, 30 minutes before your wake-up time.
[Magisk] Sreekantt:
Bro...can i have November 19th build...that was working perfectly fine for me....plug,change values, forget....as u already know latest build has lag issues even in my phone....Unfortunately, I didn't save d perfectly working zip... can i have zip file build dated around November 19th ??
[Magisk] psychoela:
here y go
[Magisk] Jaymin.0.1910:
VR25, Take a look at this init.d script, Can the same functionality be added into your module ??

#script starts

#!/system/bin/sh

v_log=/cache/99poweroff.log

v_log_last=/cache/99poweroff_last.log

set -x 2>$v_log

{

uevent=/sys/class/power_supply/battery/uevent

config=/cache/99poweroff.conf

llog=/cache/99poweroff_level.log

plog=/cache/99poweroff_shut.log

get_prop() { sed -n s/^$1=//p $2; }

battery_level() { get_prop \

POWER_SUPPLY_CAPACITY $uevent; }

autoshut() { get_prop autoshut $config; }

threshold() { get_prop threshold $config; }

discharging() { grep -q =Discharging$ $uevent; }

backup_v_log() { mv -f $v_log $v_log_last; }

log_level_sleep() { print "battery_level | $\

(battery_level) | $(date +'%F %T')" >>$llog; \

get_sleep_time; sleep $time; }

log_poweroff() { print "poweroff | $\

(battery_level)-$(threshold) | $(date \

+'%F %T')" >>$plog; }

get_sleep_time() {

[[ $(battery_level) -gt 80 ]] && {

time=600

} || {

[[ $(battery_level) -gt 60 ]] && {

time=300

} || {

[[ $(battery_level) -gt 40 ]] && {

time=180

} || {

[[ $(battery_level) -gt 20 ]] && {

time=90

} || {

time=60

}; }; }; }

}

while :

do

poweroff=false

[[ $(battery_level) -le $(threshold) ]] \

&& poweroff=true

$poweroff && discharging \

&& $(autoshut) && log_poweroff \

&& backup_v_log && poweroff

log_level_sleep

done &

} 2>>$v_log

#script ended
[Magisk] x1reN:
Is it also possible that it causes Phone crashes at the moment with Magisk 14.5? If I have CS installed and running, my phone is lagging and after that crashing.
[Magisk] Jaymin.0.1910:
It might be, but I would say no ( see my previous posts ). Because as of my own debugging with the lagging issue, if we do some little change in cs script, we can make lagging issue vanish while having magisk 14.5 installed.
[Magisk] x1reN:
Hm weird because as soon as I uninstall cs, I don't have any of those crashes anymore, everything else is installed and running fine
[Magisk] Sreekantt:
Installation failed.... Weird :rolleyes:
[Magisk] Uluru25:
... don't think that dis-/enabling via magisk is a proper way, but dis-/enabling acc is as easy as entering "accd." for disabling and "accd" for enabling the daemon in a terminal (after entering "su").

Let us know why you want to manually dis-/enable acc, perhaps we have a better recommendation for you to achieve what you want.

🤠
[Magisk] BEDBOI2:
Thank you. I'm searching for a quick solution to leave the phone always connected to a PC, but without ALWAYS charging (I'd manually decide when to charge... like 1h a day...).

Maybe https://github.com/CrazyBoyFeng/AccSettings has a Disable option? Without a restart needed?
[Magisk] Uluru25:
Don't know why you want to manually decide when to charge and why for 1 hour.

Acc let's you achieve e. g.

- "idle mode" so that the battery is not charged although connected to a charger

- charging only up to a predefined capacity (e. g. 70 %) which prevents unhealthy high charging percentages

- automatic re-charging only if a predefined capacity (e. g. 25 %) is reached which prevents too frequent re-chargings up to unhealthy high charging percentages

- temperature controlled charging to keep the battery during charging within an optimal temperature range

- charging with limited current

- shutting down the phone before being discharged up to an unhealthy percentage or before being heated over a predefined unhealthy temperature

and many many more...

So if you tell us more about your "motivation" to charge only for 1 hour, maybe there is a more convenient automatic solution with acc...

🤠

edit: or look here
[Magisk] Uluru25:
... sorry, this post should have been a reply to your post.

🤠
[Magisk] VR25:
ACC V2023.10.16

- "edit g" shall work with non-root apps (acc -h g, acc -l g, acc -la g)

- -f supports additional options (e.g., acc -f -sc 500)

- -h|--help [[editor] [editor_opts] | g for GUI] prints the help text, plus the config

- -sd shall not print user scripts

- accd auto-updates mcc and mcv arrays (missing ctrl files or array[1] "-" marker)

- Added dev tag to update checker

- Additional charging switches

- Additional current control files

- allowIdleAbovePcap=true, if set to false, accd will avoid idle mode (if possible) when capacity > pause_capacity

- Auto-move failing switches to the end of the list

- Default acc -w refresh rate set to 1 second

- Default capacity_sync set to false

- Dropped obsolete code & information

- Ensure charging switch is set before a pause condition is hit

- Fixed html hyperlinks and duplicate temp in acc -i (OnePlus 7)

- Implement "rt ct mt" restricted charging hysteresis

- Improved current control files parsing & automatic switch logic

- KaiOS support

- Log export function invokes Android's share dialog

- Optimized loop delays (loopDelay=(3 9): 3 seconds while charging/idle, 9 seconds while discharging)

- prioritizeBattIdleMode=no has the opposite effect (prioritize non-idle mode)

- Refactored battery health calculator and cooldown logic

- resume_temp and cooldown_temp optionally override resume_capacity (if resume_temp has a trailing "r", as in resume_temp=35r)

- Selection lists count from 0 instead of 1

- Show /dev/ prefix tip only if acc is not in $PATH

- Suspend regular daemon functions until discharge_polarity is set, either automatically or manually

- Updated documentation

- Validate current control files only while charging

- Wizard is more user-friendly
[Magisk] Admiral2145:
Anyone know the proper switch for the Pixel 8 pro so it'll hold charge in the acca app?
[Magisk] Zilla0617:
I'm not using the app, but I am also having a hard time finding the appropriate switch as well.
[Magisk] Uluru25:
Have you updated to the very last version 2023.10.16 (in the terminal via "acc -u") since the developer has included several new switches?
[Magisk] an-ca:
Hello,

I am trying to understand why the design of acc is based on the usage of a daemon: using the comparison with a laptop running Linux/Debian with the tlp package, values are written once. Why would a different design be neessary on Android, which, to my knowledge, uses a Linux kernel?

Thank you for teaching me,

Anthony
[Magisk] hsmith1514:
if you haven't found one yet, I've been using this one for a few days and seems to be doing the trick:

/sys/devices/platform/google,charger/charge_stop_level 100 5
[Magisk] shazee666:
Hi. I am really having difficulty in using terminal to setup AccA.

Can some help me by replying with a correct lines to enter in terminal?

I need to make a permanent change

Max Charging Capacity 85%

Resume Charging Capacity 70%

Max Charging Current 1000mA

Max Charging Voltage 4000mV

Just tell me what to write after command acc

Thank you.
[Magisk] Uluru25:
1) enter "su" in the terminal app

2) enter "acc -s pc=85 rc=70 mcc=1000 mcv=4000"
[Magisk] shazee666:
Hey. Thank you so much for the quick reply..

My understanding is, that I have to keep the terminal open, during the charge, to apply them.

And I have to reapply them, before charging; everytime.

Am I correct?
[Magisk] shazee666:
Secondly, I tried to measure the current through an app called BatterGuru, and it showed 0mA current, after applying the settings.

Why is that so?
[Magisk] Uluru25:
No! You configure acc once and it will work in the background until you manually stop the daemon. After rebooting the phone, acc will also start again and do it's work. Only when charging during the phone is powered off, acc cannot do it's work.

🤠
[Magisk] imglai:
I am getting "discharge_polarity is not set. Unplug and wait or set it manually." From she'll and it doesn't go away when I do what is says. Would appreciate guidance
[Magisk] Uluru25:
... strange!

While discharging, run "acc -i curr". Note down the sign of the current value without unit (Amps). Set that sign with either "acc -s dp=-" or "acc -s dp=+"

🤠

edited acc. to feedback of the dev
[Magisk] imglai:
I did "acc -s dp=-" and it worked. What does it do?
[Magisk] Uluru25:
... dare to read the documentation:

// discharge_polarity (dp) # Default: null

// This overrides the automatic current polarity (+|-) detection.

// It's only relevant when batt_status_workaround=true.

// Polarity may change with a kernel upgrade. If this setting is wrong, charging control won't work if batt_status_workaround is on.
[Magisk] imglai:
I read the docs before but I didn't understand it
[Magisk] Uluru25:
It must be set correctly (+ or -) so that acc can work correctly. It seems, that in some circumstances this value is inverted. Thus, acc asks the user to plug and unplug (!) to check the correct discharge polarity automatically. But the user can set it also manually (as you did).

edit:

Are you sure to run the very latest acc version? Otherwise enter "acc -u" in the terminal.
[Magisk] jkaart:
I needed also set this discharge polarity manually in latest version.
[Magisk] shazee666:
Hi. Somehow, after my phone charges above 50 percent, the charge current drops to around 500mA. And stays that way...
[Magisk] Uluru25:
... would be helpful if you upload your config.txt here.
[Magisk] shazee666:
There it is.. Thank you!
[Magisk] Uluru25:
The reason is, you have set a maximum charging voltage of 4000 mV.

This prevents charging above ~50 %.

You could change this to e. g. 4100 (~70 %) or remove it.

🤠
[Magisk] shazee666:
Ohh. Didn't know that limiting voltage could have that effect. Thank you.
[Magisk] Uluru25:
... the percentage of battery charging is a function of its voltage and caculated for the convenience of us users.
[Magisk] shazee666:
Alright, so I just checked that my charging did not stop at 85%. Also the charging current went beyond the limit.

I am using Xiaomi Mi A2 Lite, Custom ROM A13.

Is there any possibility that the daemon stops working on my phone?
[Magisk] shazee666:
I'll just take a log, next time I'll charge, and see if the problem repeats..

I'll share the log if I don't understand it.

Thank you.
[Magisk] Uluru25:
Have you checked that

1. the daemon is/was running

2. working charging switches have been identified?

... and re-upload your config.txt if you want...
[Magisk] VR25:
Android is too fragmented. It has no standards at all, when it comes to its Linux side.

If you don't use a charging control daemon, soon enough, your settings will be overridden by system userpace daemons (i.e., thermald, dumbd, unnecessaryd).
[Magisk] Uluru25:
@beeshyams

... if you are still interested, see my update here.

🤠
[Magisk] danieleal:
Hello,

How do I disable charging completely when acc is on? I might want to game at 50% and not want my phone to overheat. I want the battery to be idle no matter what % it's on. Is it possible?
[Magisk] Uluru25:
You have several ways to try:

1. Stop the daemon in a terminal with "accd."

2. Manually set pc below and/or rc above your current charging percentage with "acc -s pc=20 rc=30" if you are e. g. at 25 % charged.

3. make a macro like this or use it

🤠
[Magisk] danieleal:
Thanks, I didn't get along with macrodroid, acc commands are simple to me, many thanks for your help and your work!
[Magisk] danieleal:
It was working so well but now it just stops charging and the battery is discharging instead of idling, what could be wrong here?

I don't understand the charging switches so I just leave it on automatic. Please help me.
[Magisk] Uluru25:
First, check the charging switches as described here. If there is one switch enabling idle mode this will be written there. Then remember the name of this switch, leave the wizard, and manually select this switch via "acc -ss".

Are you sure you are running the most up to date build? If not, update first via "acc -u".
[Magisk] danieleal:
Hello again, if you can please have a look at the test log... I find it weird because none of the switches work according to the test but it was working with "battery/hmt_ta_charge 1 0". Besides there's an option on this device to draw power from USB and pause the battery usage when gaming, it's a Samsung S23.
[Magisk] Uluru25:
... sorry that's beyond my expertise. Better you contact the dev directly.
[Magisk] danieleal:
I think I fixed it, I recompiled the module and edited some OEM scripts there for samsung that was randomly swapping charging switches, this was intended for some issues with exynos devices, mine is Qualcomm so I made it so it would only use the correct working charging switch. While I was at it I also edited the default cfg to match my needs from the module installation. I can share the modified module for Samsung S23 Series users. I confirm it works well even with 10w power adapters.
[Magisk] Schmye Bubbula:
In AccA profile edit screens, what does the little clock icon surrounded by the counter-clockwise circular arrow do?... It appears next to the little info icon, and in the title bar to the left beside the little undo & save icons.