yashsingh1/xdaforums huggingface dataset:
[Magisk] HorrorLemons:
Hi! I've been having problems with the modules since the previous update (not just the one on 24th). Daemon works erratically and I can't pinpoint the fixed pattern, so it's incredibly frustrating. Sometimes it works, sometimes it doesn't.

1. When daemon is running, more often than not charging will not kick in despite below resume value. The charging light won't light up, and the battery icon in the status bar won't change to indicate charging.

1a. But even more troubling is, there are times when the phone is actually charging despite the above scenario. I have plugged in both above and below pause values before, thinking daemon will kick in soon, but it charges to above pause value.

2.

acc -e

will work fine most of the time, but I've experienced times when

acc -D stop

won't enable charging, both automatic and manual, unless I replug my charger.

I hope I've attached the correct log here. I keep seeing

sh: -lt: argument expected

and

sh: -ge: argument expected

. My config is as follows:

capacity=15,,65-75
verbose=false
resetUnplugged=false
loopDelay=10
maxLogSize=10
onBootExit=false

I've tried modifying it to follow the instructions closely, but that didn't help:

capacity=15,101,65-75
temp=400-450_90
verbose=false
resetUnplugged=false
loopDelay=10
maxLogSize=10
onBootExit=false

I am using a Zenfone Max Pro ME (ZB602KL) on Android 8.1. Thank you in advance.
[Magisk] VR25:
This could mean exactly what it implies: battery went bad or it may need calibration.

Where did you see that?

[MENTION=9382029]HorrorLemons[/MENTION], the awk problem has been fixed in the latest build.

Your config was wrong. Adding "101" corrected it.

If you're not using Magisk, you need to install busybox.

Troubleshooting...

1) Remove config.txt, then restart the daemon (acc -D restart) to reset your configuration.

2) acc -s verbose true

3) acc -D restart

4) Let the thing run for a while. Preferably, change the pause and resume capacity values (e.g., acc 56 55) to see whether charging is disabled and enabled automatically.

5) Upload all logs from /sdcard/acc/logs/.

6) acc -s verbose false && acc -D restart
[Magisk] semdxd:
from acc -i log. It appeared after I had too many restarts and ROM flashing. but it wasn't there until recently

how can I calibrate battery? charging to 100% and then discharging to 5%?
[Magisk] HorrorLemons:
Thanks for the quick reply. I'm using Magisk.

Troubleshooting...
1) Remove config.txt, then restart the daemon (acc -D restart) to reset your configuration.
2) acc -s verbose true
3) acc -D restart
4) Let the thing run for a while. Preferably, change the pause and resume capacity values (e.g., acc 56 55) to see whether charging is disabled and enabled automatically.
5) Upload all logs from /sdcard/acc/logs/.
6) acc -s verbose false && acc -D restart

I did everything to #4, and the daemon seemed to work fine with the default settings; cooldown was working as I was at 60%.

Then with the phone still plugged in, I changed my config to:

capacity=15,101,65-75
coolDown=50/10
temp=400-450_90
verbose=true
resetUnplugged=false
loopDelay=10
maxLogSize=10
onBootExit=false

And restarted the daemon. It didn't start to charge automatically, so I unplugged and plugged it back in. This time I get the no charging light+no charging indicator in status bar but it was actually charging. Went from 60% to 61%.

Unplugged it, acc -d, acc -e, restarted the daemon and now it's working.

I really don't know what I'm doing wrong to get that strange phantom charging thing going on. Thank you in advance.
[Magisk] MarcoCount:
I have an encrypted OnePlus 6 and the daemon is not starting on boot.

I don't know which files to send you because accd file is obviously empty.

I'm using latest version.

Thanks in advance.
[Magisk] VR25:
If you don't face noticeably shorter runtime, ignore this.

Else, if your battery is swappable, remove it, hold the power button for a few seconds then put it back in. Otherwise, keep using your device normally for a while. Eventually, the smart battery will self-calibrate. If it doesn't, a full discharge and recharge should be performed as last resort.

[MENTION=9382029]HorrorLemons[/MENTION], your power_supply log is incomplete. Did you reboot right after installing acc? The Installer tells you to wait at least a minute before rebooting. If you didn't do so, reinstall (no need to reboot).

It seems the charging control inconsistencies have to do with your device's charging switch. That log will tell me whether there are additional switches.

By the way, which app/program did you use to edit config.txt?

Does it work when started manually (acc -D start)?

Do you have /sdcard/Android folder?

Have you checked in the Magisk log whether acc's service.sh is being executed?
[Magisk] paolocorpo:
A very noob question...

Yesterday my device reached 10% that is the shutdown capacity

I plugged the device switched off to the AC charger over the night

This morning I founded it at 100% and of course switched Off

Is it normal ? The acc module does not run when the device is switched off ?

Thanks

Paolo

Inviato dal mio Mi A1 utilizzando Tapatalk
[Magisk] guest4711:
Yes, if the device is switched off charging is controlled by hardware (not by kernel, drivers nor any other software).
[Magisk] beammer335d:
Thanks for this,install this on my Sony XZP

Plugged it in at night at about 30%, this morning it only charged to 80% , it wasnt charging past that.

Something I need to do to make this work ?

Thanks for your time
[Magisk] paolocorpo:
The default setting has as max capacity set to 80%

So the module worked well ... As expected

Inviato dal mio Mi A1 utilizzando Tapatalk
[Magisk] MarcoCount:
Yes, it works if I write accd.

Yes, I have /sdcard/Android

I searched in the magisk log file for "acc", and this is what i found:

03-13 12:45:54.654 613 614 I Magisk : acc: constructing magic mount structure

03-13 12:45:54.660 613 614 I Magisk : bind_mount: /system/xbin/acc

03-13 12:45:54.660 613 614 I Magisk : bind_mount: /system/xbin/accd

P.S: I've removed and reinstalled acc from magisk repository and it works. I will report back if the problem comes back

P.P.S: What is the correct procedure to build acc from source? Do I have to just run build sh file or is something else that I am missing?
[Magisk] beammer335d:
So this is where I can change that? I've set it to 95
[Magisk] paolocorpo:
Yes, the config.txt is the file that represents the current set of module

The standard is:

10,60,70-80

You can change 80 to 95 but I don't know if you can change 70 to nothing ...

Probably is is necessary to set the low level

Inviato dal mio Mi A1 utilizzando Tapatalk
[Magisk] VR25:
If you didn't see "acc: exec [service.sh]", then Magisk itself it to blame. A workaround is renaming /sbin/.magisk/img/acc/service.sh to post-fs-data.sh.

Building from Source

You have 3 options:

- [Generic] Zip the master branch.

- [Linux] Run ./build or "bash build".

- [Windows] Double-click "build.bat". Note: you need "Windows Subsystem for Linux" installed.

Auto-generated zip: .releases/acc-<version>.zip.
[Magisk] beammer335d:
Thanks. Made the changes
[Magisk] HorrorLemons:
D'oh! Apologies, I didn't wait before rebooting. Reinstalling it seems to have solved the weird phantom charge! But I'll upload the logs anyway.

I use Termux and edit the config with acc -c.

Thank you so much for your patience!
[Magisk] VR25:
Don't forget to disable verbose! ?

acc -s verbose false
[Magisk] smohanv:
Hi

Sorry to ask this very basic question. The config.txt has all default settings in there. Should I still need to run any command in Termux or Terminal Emulator. Thanks.

Edit: I figured that config.txt takes care of default settings unless we want to change the capacity, temperature etc in there. I can also assume that I don't have to run any script in Terminal unless I have to make any advance level changes.
[Magisk] paolocorpo:
You are right

If the default setting are Ok for you you don't need to write any comand by terminal emulator

Inviato dal mio Mi A1 utilizzando Tapatalk
[Magisk] MarcoCount:
Thanks for the detailed response.

Keep up the good work!
[Magisk] Dark_Eyes_:
Don't know if it's normal or whether it's the script or my phone that is to blame, but I noticed that my phone doesn't stop charging at the predefined values. For example, the first time I tried it stopped at 78% with the default settings. I then chose 81% as the max capacity to see if it would go to 79% or 80%, and this morning it stopped at 76%! I disabled cool_down both for percentage and temperature, so that it shouldn't be the problem. Maybe it reached 55 Celsius (my threshold temp), but I doubt it... Is it polling the same battery percentage as the system? What could be the problem?

EDIT: log attached
[Magisk] MarcoCount:
You should try to attach files generated by acc so he can understand
[Magisk] J4jks:
Here I've attached all logs and config files.

Sometimes it works as it should be, sometimes not

What is the issue??

Thanks a lot for the modules
[Magisk] RifatMehbub:
Need older Magic Charging Switch

Need the old magic charging switch which stops charging at 90% not pause/resume at certain moment
[Magisk] MarcoCount:
Just read the read OP/config file.

It's well documented how to obtain that
[Magisk] semdxd:
Battery stats does not reset on latest version 2019.1.24 (Oreo 8.0), any solution?

---------- Post added at 11:22 PM ---------- Previous post was at 11:13 PM ----------

Battery life is way better after using your module "3hrs of SOT and 10hrs of idle consumes only 60%" thx to you <3,

but battery level indicator is strange on Oreo 8.0 :

it may drop from 79% to 75% in a minute and stays at 75% for 20 mins of SOT!
[Magisk] onliner:
Hi, with the latest update I'm facing problems with 2 devices:

Device 1 (logs.zip): Redmi Note 5, the phone charges up to 71-72 instead of 80 (default setting) and sometimes passes the limit up to 90.

Device 2 (logs2.zip): Redmi Note 3 SE, the phone charges up to 90-95 instead of 80 (default setting).
[Magisk] dimm0k:
anyone have this working on a Google Pixel XL or any Pixels? I have acc working perfectly with my LGV20 and Oreo, but it's not working at all on my Google Pixel XL...
[Magisk] beammer335d:
I have a Pixel 3 xl, let me fire it up and see
[Magisk] dimm0k:
what's the verdict??
[Magisk] beammer335d:
Its a no go
[Magisk] veetoe:
It's working on my pixel 2 xl.
[Magisk] dimm0k:
curious, did you have to make any edits to the config or run acc with special switches to get it working?
[Magisk] veetoe:
Nope I'm pretty sure the default settings worked. I did end up customizing the config to my liking and also changing to a different switch to fix a wakelock issue. And now I only use it to set voltage_max on boot and then exit itself. I am on a custom rom and kernel though.. Have you done any diagnosing in a terminal?
[Magisk] dimm0k:
unfortunately I'm not sure how to proceed with diagnosing in a terminal... however I do know that it's possible to pause charging by echo'ing a 0 to /sys/class/power_supply/battery/battery_charging_enabled and a 1 to resume charging... any suggestions with regard to acc?
[Magisk] veetoe:
In terminal, first type "su" to gain root access. Then you can try "acc -s s" and it should display available switches that you can pick. Also you can run "acc -D" (note the uppercase D) to see if acc is running or not.
[Magisk] neverremembermyusername:
Sorry for the late response, I got sidetracked with some other projects.

I tried setting present to 0, but the phone rebooted itself before I could set online to 0 (probably a kernel panic? I haven't looked at the logs yet). It did the same when I set online to 0 first. I'll try writing a script to do them both at the same time, out of curiosity, but it looks like probably the kernel doesn't take kindly to those values being modified.

I'm actually debating just rigging up something with a cheap WiFi controllable outlet. Shouldn't be too hard, and it would be amusing overkill.
[Magisk] kevsestrella:
Question about coolDown

From the default coolDown=60, where is this based? at first I thought it was based on 400-450_90 but coolDown is taking effect even below 400(40Celsius)
[Magisk] VR25:
Got all reports

Currently investigating...

Does the kernel allow you to modify /sys/class/power_supply/voltage_max? (600 permissions, value must stick).

Interesting...

coolDown has temperature and capacity thresholds. 60 is capacity and it has nothing to do with temperature. I did experiments to determine when voltage starts hitting the red zone (4+ Volts). Default settings reflect the results.
[Magisk] semdxd:
[MENTION=5228676]VR25[/MENTION] Is there a way to disable fast charging while using Huawei fast charger ?
[Magisk] dimm0k:
soo I was able to test out the 4 switches available to me on my Google Pixel XL... options 1 and 4 allow my device to charge, while 2 and 3 do nothing. using the two former options that work, the device charges at its full load and keeps going past the set 88% I want it to stop at. any suggestions on what to do from here?
[Magisk] peppe1996:
Hi.. I'm using your module in Xiaomi.eu and seems work. But I really need specifications about settings on config file. I do not understand really using coolDown parameter because it's used in every context ?

Sorry... Try to explain to me or post a more specific description please.

But really thanks... A very good work that should be used by default from any device
[Magisk] darkbasic4:
Does it mean that it will charge up to 100% and it won't slow down/stop charging if the battery overheats? :eek:

Also, how do I know if my device/kernel allows modifying `voltage_max`? Is there any way I can test if it works?

My device is a Xiaomi Pocophone F1 with the Pixel Experience ROM (I think it uses the Derp kernel).
[Magisk] Jedi.Tester:
If you set max voltage it will charge up to that voltage. Mine charges to approx 75% on 4.1v

Modify the voltage_max, save changes, exit editor, without rebooting read contents of the file to see if the changes persisted.
[Magisk] darkbasic4:
But what about overheating? Shouldn't we slow down (or even stop) charging if the temperature gets too high?

EDIT:
[Magisk] darkbasic4:
onBoot=./usb/device/razer_charge_limit_enable:1 ./usb/device/razer_charge_limit_max:80 ./usb/device/razer_charge_limit_dropdown:70

With "modify the voltage_max" you mean the previous line?

According to the docs `onBoot` is used to modify charging voltage: is it voltage_max? If not what am I supposed to use instead? Do I need `onBoot`?
[Magisk] Honda21gg:
Hi will it charge the op6t any faster ??
[Magisk] darkbasic4:
It looks like the author removed the app because of smartlock issues: https://gitlab.com/mudar-ca/SnooZy/issues/20
[Magisk] darkbasic4:
This is a search for voltage_max on the sys fs:

https://xdaforums.com/attachment.php?attachmentid=4697208&stc=1&d=1548957297
[Magisk] Jedi.Tester:
On my mi mix3 it's located under `/sys/class/power_supply/battery/voltage_max`. I'm not really sure where yours is, you need to investigate that yourself.

`onBoot` can be used for a lot of things. Basically it will set whatever you tell it to, i.e. set voltage_max to a certain value when your device boots. It is needed because most of these settings do not stick after reboot and will reset to default values.

Edit: judging from the screenshot above yours is on the same path.

You can try setting:

`# acc -s onBoot ./battery/voltage_max:XXX`

`# acc -s onBootExit true`

Where XXX is the value you want. (Ckeck the units before changing, mine is in uV, hence to set to 4.1V I need to specify 4100000)

Use `# acc -s` to see your acc config

After setting acc you can reboot your phone and check if the settings stick:

`# cat /sys/class/power_supply/battery/voltage_max`
[Magisk] xdami4c:
After enable this mod is 2 xiaomi mi4c devices the one of them stop fast charging. (the one with miui the other with android pie work fine)

It is possible to be hardware failure or the mod do it? (i have try remove mod, and wipe the whole phone but didnt work)
[Magisk] mr_mostafijur:
Is it normal?

I am using acc for quite some time, now recently after charging 70% every minute its stopping charging and again charging till its 80% charge. So is it normal behavior?

Device: Redmi 5

ACC settings: Default
[Magisk] onliner:
No.

---------- Post added at 10:27 PM ---------- Previous post was at 10:25 PM ----------

Hi, that's the CoolDown mechanism, basically prevents the overheat of your battery (You can read more about it in the OP).
[Magisk] Jedi.Tester:
If you have tried wiping everything (which should not be necessary to remove the mod) and it didn't help, then clearly it's not the mod's fault
[Magisk] VR25:
ALL USERS

I need help building a public database of power supply logs from different devices.

Please check out https://github.com/VR-25/acc/blob/master/README.md#power-supply-log.

Thanks
[Magisk] paolocorpo:
Done !!

Inviato dal mio Mi A1 utilizzando Tapatalk
[Magisk] dragoi90:
Done.OnePlus 6 (A6003)
[Magisk] Camerado:
[MENTION=5228676]VR25[/MENTION] Can you add this parameters?

reboot=false/true #Reboot after arrive a pause capacity

reboot_delay=60 #Reboot delay after arrive a pause capacity (in sec.)

Kind regards...
[Magisk] silmarx:
how to disable max voltage limit?

Is it possible to disable the max voltage limit with acc from the terminal? Does the "disable" command also disables the voltage limit?

My idea was to disable it in case I need to charge it fast using quick charge in exceptional situations.
[Magisk] p4\)\)0_|_:
[MENTION=5228676]VR25[/MENTION]

Is it normal for the device to start and stop charging every now and then while not even close to the target percentage?!

Thanks
[Magisk] silmarx:
This is the coolDown feature, is very well described in the first post.

Once it has reached the coolDown capacity (by default 60%) it will pause and resume periodically. By default the charge/pause periods is 50/10 seconds.

---------- Post added at 02:56 PM ---------- Previous post was at 02:05 PM ----------

[MENTION=5228676]VR25[/MENTION], just adding some more info to my initial post after performing some more tests:

After checking the voltage, actually the max voltage limit is not working, since I get the typical 7,46V with QC3.0 charger and 5.35V with a regular charger.

My settings are these: capacity=0,101,80-85

In ./battery/voltage_max the value was 4400

I changed the settings with: 'acc -s s onBoot=./battery/voltage_max:4100'

But still no success, after reboot value in ./battery/voltage_max is still 4400, and voltage limit is not applied, neither 4.4V or 4.1V, which is strange, since I was expecting at least the 4.4V limit to be honored.

In addition to voltage_max, I have another file called ./battery/voltage_max_design where value is 4400000.

Running 'acc -s s', it prints these 4 options:

1) ./dc/charging_enabled 1 0
2) ./parallel/charging_enabled 1 0
3) ./battery/charging_enabled 1 0
4) ./battery/battery_charging_enabled 1 0

Running 'acc --info', it prints this:

NAME=battery
STATUS=Discharging
PRESENT=1
BATTERY_CHARGING_ENABLED=1
CHARGING_ENABLED=1
CHARGE_TYPE=N/A
CAPACITY=82
HEALTH=Good
TECHNOLOGY=Li-poly
SYSTEM_TEMP_LEVEL=0
CHARGER_TYPE=4
SCREEN_ICL_STATUS=0
FLASH_CURRENT_MAX=1541135
CONSTANT_CHARGE_CURRENT_MAX=3000000
CHARGE_FULL_DESIGN=3200000
VOLTAGE_MAX=4400
VOLTAGE_MAX_DESIGN=4400000
CURRENT_MAX=0
CURRENT_NOW=261991
VOLTAGE_NOW=4010901
RESISTANCE_ID=69253
SAFETY_TIMER_ENABLED=1
INPUT_CURRENT_MAX=1500000
INPUT_CURRENT_SETTLED=1
INPUT_CURRENT_NOW=0
FLASH_ACTIVE=0
FLASH_TRIGGER=0
DP_DM=0
CHARGE_COUNTER=2284465
INPUT_CURRENT_LIMITED=0
RERUN_AICL=0
RESTRICTED_CHARGING=0
ALLOW_HVDCP3=1
MAX_PULSE_ALLOWED=-22

I'm running MIUI 10.2 with Android 8.0 on a Xiaomi Mi 5s phone.
[Magisk] shouk_1987:
Our gcam giant [MENTION=7042702]Sreekantt[/MENTION]

You are on AOSP or MIUI ? Do u think will it make a difference of which is the best profile from aosp rather than miui ?
[Magisk] Sreekantt:
Not a right place to discuss but #AOSP_Always :D
[Magisk] shouk_1987:
Reporting that setting a specific switch removed the wakelock qcom-step-chg and improved the battery a lot

Thanks [MENTION=5228676]VR25[/MENTION] for mentioning this

Thanks [MENTION=7042702]Sreekantt[/MENTION] for advising which profile to select for brelliuym ;)
[Magisk] o muerte:
Can you post links to the solution or copy/paste it into your post? It'll help anyone who finds this from a Google search in the future.
[Magisk] Macusercom:
Since upgrading to Magisk v18.1 acc is not auto starting after a reboot anymore. Tried to reinstall acc several times but no luck.

Using a OnePlus 6 with OxygenOS 9.0.3.
[Magisk] C4mine:
Can u please make an app of this plz
[Magisk] MatteCarra:
Yes, acc will have an app soon.

Stay tuned.

We will need suggestions and feedback!
[Magisk] tilasto:
Yes, same problem and device.
[Magisk] o muerte:
I've had a *ton* of trouble with Magisk 18.0 and later. I uninstalled completely and re-installed 17.3 -- I think it'll take probably a full major version before Magisk is stable again after the core codebase rewrite TBH, maybe more. I'd kill for an option to disable the "Would you like to Upgrade Now?" popup every time I open the manager app.

One suggestion for you -- can you provide realtime log viewing from somewhere within the app? It'd be great to specify a debugging level and watch what's happening in real-time while debugging problems. I've had some weirdness with our OnePlus 3s not flipping charging back on when they drop below the resume threshold and it's a bit of a pain to open a terminal and manually tail the log.
[Magisk] guest4711:
Why don't you set the update channel in MagiskManager to custom providing an invalid url, e.g. http://localhost?
[Magisk] o muerte:
I had no idea I could. That's a great solution, thanks!
[Magisk] MatteCarra:
I'm happy to announce with [MENTION=5228676]VR25[/MENTION] that acc has now an app!

This app allows you to:

- Edit config parameters with a nice UI

- Start and stop the acc deamon

- Add a tile to quick settings to start and stop the acc deamon

- See "acc -i" output in a nice UI

It requires root and file access to send acc commands and edit config file, and ACC is a prerequisite.

I'm open to suggestions and feedback.

If you find a bug please be sure to specify the whole process to reproduce it or the logcat.

I'm not UI guy or a designer, so I will need your help for the app icon.

Right now the app uses the default android app icon and I really don't like it.

If you know how to use photoshop or whatever please send a pull request with the file. I will then set it up to make it the app icon, so don't worry about that part.

This is a pre-release build!

Source Code: https://github.com/MatteCarra/AccA

Download link: https://github.com/MatteCarra/AccA/releases/download/v0.2/app-release.apk

I will add it the next build! Thanks!

I've OP6 and it's running great there. Strange :eek:
[Magisk] Ahugari:
Anyone using a v30 and running acc with the voltage tuned, please help. Am using mine with the defaults setting as I couldn't manage to edit my voltage_max file.
[Magisk] davidzam:
acc -s capacity 0,60,80-100 does this command still works? I updated to the latest version through magisk (latest version... But I think that this module its off. Sorry but I don't get the syntax here. I want that the device stops charging at 100‰, and restart charging at 80 or 90 ‰, and also I don't want that the device turns off when the battery it's at 5%, I would like for the device to use the battery completely if it is necessary, given the circumstances. Thank you.

Enviado desde mi SM-G550T1 mediante Tapatalk
[Magisk] MatteCarra:
Done: https://github.com/MatteCarra/AccA/commit/2dbedd44bc97d088947127cad9af835a680b5b7b

I will bake a new apk soon.

Update: https://github.com/MatteCarra/AccA/releases/download/v0.2/app-release.apk

Your command should be ok. And should work fine. If you want to restart charge at 90% instead of 80% just use acc -s capacity 0,60,90-100
[Magisk] phantom146:
Don't worry I got you. Expect it by monday, could you gladly provide me your telegram link or email in a pricate message? Thanks.
[Magisk] vinnievegas:
What exactly does this do out of the box without configuring anything?