yashsingh1/xdaforums huggingface dataset:
[Magisk] Macusercom:
Any updates on compatibility for the OnePlus 6 on OxygenOS? I read that input_suspend should work as charging_enabled is overwritten by the system all the time.

Last time I checked it wouldn't limit the battery charge at all and move /sdcard/mcc/ to the internal storage all the time.

---------- Post added at 08:17 AM ---------- Previous post was at 07:41 AM ----------

Tested it now. Same for me. Magisk shows executing service.sh for acc but the log doesn't show any error or that it has been started (except starting with acc -D start)
[Magisk] paolocorpo:
Dear [MENTION=5228676]VR25[/MENTION]

Small issue here:

plugged to AC charger I reached 87 that means (for me) 2 more than the max Capacity set

Inviato dal mio Mi A1 utilizzando Tapatalk
[Magisk] k0rner:
I have tried debugging the same issue (service.sh executed, but does nothing on Pixel 3).

Added "ls -la /data/media/0 > /data/adb/lsla.txt" into the service.sh to check if selinux or something else is preventing startup.

And the output shows encrypted (garbled) folder names in data/media/0/

So my guess is that service.sh starts too early to see decrypted data on internal storage (which only becomes decrypted as the user enters PIN),

and fails as there is no "/data/media/0/acc" folder yet.

Solution would be either switch to /data/adb/ for data folder or wait in some kind of loop until data is decrypted.
[Magisk] GryphonBR:
Oh, that's actually promising. But I take it that's to do with Magisk, not ACC - or am I mistaken?
[Magisk] k0rner:
It can be fixed either way: in Magisk (by running service.sh scripts only after user data was decrypted), or in the module (taking into account that data may be not decrypted yet and waiting for that event).
[Magisk] ikelos:
Hiya,

I'm on a Oneplus 5, Android 8.1.0. I had been using an older version of mcs (2018.7.24, I think) and then spotted that ACC was in the module list in magisk, so uninstalled mcs and installed acc. It seems to work fine (apart from the not starting on boot, which people are discussing above). I set the settings to 5,,80,90 and added the switch which appears to be switch=./battery/charging_enabled 1 0.

Unfortunately, after half a day's use my battery was much more drained than usual, and during the day the device had gotten quite warm whilst in standby. The battery settings panel says that Android System is using up most of the battery (which is what I'd expect from a runaway root service) but I can't get much more detail than that. I tried setting alwaysOverwrite=true and I tried setting loopDelay=30 (which is what I thought mcs used), but neither seemed to improve the situation.

Has anyone else encountered this? Have the internals of acc changed significantly from mcs? Can anyone else think why this might be happening? Happy to run tests to help try to figure this out...
[Magisk] kanyazsombor:
- acc exec [service.sh]

- no

Probably the answer is in above comments. So until it is fixed I created a tasker profile which starts acc after boot

Thanks for your work!

---------- Post added at 11:54 PM ---------- Previous post was at 11:51 PM ----------

Don't think so that acc caused that. I haven't noticed anything similar. OnePlus 5 OB22 Pie
[Magisk] Da-BOSS:
I suffer the same issues but to a lesser extent.. it happens with me exactly the same thing but only once per a week or maybe twice.. and it happens randomly.:)

Anyway... here is my log files... just in case if you need to have a quickie look about what is happening :) I know you love anything named [log] thing :D

Thank you! [MENTION=5228676]VR25[/MENTION]
[Magisk] paolocorpo:
My frequency is similar

Up to now (1 week) 1 time

Inviato dal mio Mi A1 utilizzando Tapatalk
[Magisk] VR25:
Those who have the daemon not autostarting issue...

Does adding until [ -e /data/media/0/acc ]; do sleep 5; done to service.sh, anywhere between the 5th and 11th lines solve the problem?

I'll address other reports later.

Thanks
[Magisk] k0rner:
Yes, that solves the issue.

Thanks!
[Magisk] alex moymoy:
[MENTION=2309157]k0rner[/MENTION] do you mind sharing your log so I can compare and see what is the problem with my phone?!??maybe ?

Thanks in advance
[Magisk] vikassingh:
Is it me or anyone else is facing the problem of charging disconnected after reaching 63% then again starts after some time then again disconnected with default settings? If no then how to solve this. In older version was working fine
[Magisk] Adromir:
Is it just me or did using it got more Complicated? Its running perfectly fine in the old MCS version on my Oneplus5, but I just can't get the ACC version to work
[Magisk] datsoy:
Works for me too on my OP6T. thanks.
[Magisk] VR25:
**2018.12.18 (201812180)**

- [acc] Non-interactive shell support

- [accd] Always overwrite charging switch.

- [accd] Higher coolDown sensitivity

- [accd] Make sure the number of running instances is at most one.

- [accd] More efficient log size watchdog

- [accd] Pause execution until data is decrypted.

- [General] Rearranged charging switches to accommodate newer devices, such as the OnePlus 6/6T. Reports suggest that these don't work correctly with .../battery/charging_enabled.

- [Installer] When updating config.txt, try patching relevant lines only, instead of overwriting the whole file.
[Magisk] ubergeek77:
I just upgraded from MCS to ACC and I cannot for the life of me figure out how to get this thing to work.

Before, it was as simple as running something like "mcs 42 41" to set your parameters and be done with it. Great, now the phone won't charge past 42%. I got to set it and forget it.

Now I apparently have to edit a config file through running the ACC binary? In my terminal emulator, text is either cut off or the cursor is in the incorrect location. I can't seem to edit anything.

I'm all for more power to those who want more options, but is there any way for simple, easy to remember commands to be added? The help page of MCS would even give you example commands for a variety of use cases and made it extremely easy to get going. Now there is seemingly none of that. I really miss the old module and I'm considering switching back.

In the meantime, can anyone help me out and tell me how to get the equivalent functionality that running "mcs 42 41" used to provide?
[Magisk] VR25:
[MENTION=7042628]ubergeek77[/MENTION], instead of flooding the help text with extensive details, I included these in the config file itself. There you find detailed information about each variable.

You can edit config in several ways...

- Using a text editing app

- Using terminal commands (details below)

--> acc --set <variable> <value>, example: acc -s capacity 5,60,41-42

5: shutdown capacity (default)

60: cool down capacity (default)

41: resume capacity

42: pause capacity

--> acc --set <preset>, example: acc -s 4041 (refer to the help text for more)

--> acc --config <editor>, example: acc -c nano -l

This lets you edit config with a CLI text editor. If <editor> is not specified, vim/vi is used. Obviously, you have to known a thing or two about a specific editor in order to benefit from this.

Simple vim/vi (acc -c) guide:

1) Use arrows or HJKL keys to navigate. Type "/" to search for a specific pattern.

2) Press "i" (insert mode) to start editing.

3) Press ESC key to exit insert mode.

4) Type :wq and press ENTER to save and exit or :q! -- exit without saving.

I'll bring back the "acc 42 41" shortcut and add details/examples to the help text.
[Magisk] ubergeek77:
Thank you very much!

Personally, I didn't feel like the MCS help page was being flooded with information at all. One thing I liked about it was having a handful of at-a-glance, concise examples of what to run depending on your use case. I was in the "maximum battery savings" use case, so it looks like the command you just gave me is a great example of a maximum battery savings profile with the added goodies of what ACC can do over MCS:

acc -s capacity 5,60,41-42

And that's just what I needed.

As for the config file, I think the lack of a full keyboard and monitor was adding some additional confusion. I didn't realize it was opening vi or vim, and while I'm familiar with using those to an extent, for whatever reason, a lot of text was being cut off for me, so I didn't really know how to proceed. There are tons of terminal emulators out there, and of course you could do this over ADB, so this probably won't be a problem for everyone. I feel like the shorthand commands such as "acc 42 41" get around this a bit more cleanly for everyone else.

In any case, thanks again for the help, and thank you for all of the hard work you put in to keeping our batteries long lasting. I knew I wanted to preserve my new Pixel 3XL battery after seeing the damage I did to my old phone's battery, so being able to install MCS (now ACC) was a great way to solve that from day one.
[Magisk] Da-BOSS:
Testing and well report later on my Note 9 :)
[Magisk] paolocorpo:
I installed yesterday night your last release of acc

First trial over night using an AC charger ... ALL OK :)

I reached the target (85%)

Thanks as usual
[Magisk] J4jks:
Sorry, Is the zip not released yet or I don't find it?

I don't find it here on XDA or Telegram channel.
[Magisk] paolocorpo:
It Is available on Magisk Manager Module Download

Inviato dal mio Mi A1 utilizzando Tapatalk
[Magisk] J4jks:
I was so stupid didn't check magisk manager repo

Thanks for heads up.
[Magisk] Tej00700:
I installed magic charging switch (MCS) and I want to uninstall it. I flashed the zip file from twrp. I can't find the uninstaller for it. Can someone help me how to uninstall it please.
[Magisk] paolocorpo:
Very probably (it depends on veriosn that you have installed ...) the uninstallation can be performed repeating the installation by recovery
[Magisk] :
Where can I find previous acc build? (2018-12-10)
[Magisk] paolocorpo:
I can upload for you

Give me a bit time

Inviato dal mio Mi A1 utilizzando Tapatalk
[Magisk] Da-BOSS:
Still suffering the same problem issues :rolleyes: it reaches 70% and stops there.. :( it won't continue charging unless it goes under 70%... after that.. it reaches 70% and stops :(

Here's the logs... I thought that I don't need to add (alwaysOverwrite) command as it is enabled by default as you said on the changelog :)

I even tried switch settings for hoping to it works... still the same issues and I even tried to add alwaysOverwrite on the config.txt file manually... yet.. still suffering from the same problem :( I removed it & installed it again... same issues :(

So... here's the logs files... hope it is something easy to fix ;) let me know if you need anything else :) Thank you! [MENTION=5228676]VR25[/MENTION]
[Magisk] paolocorpo:
here attached
[Magisk] ugvpkn:
Hi [MENTION=5228676]VR25[/MENTION], can you please include this fix in the next build? the 12/18 build doesn't have it. Thanks much !!
[Magisk] k0rner:
It actually does (but not in service.sh): https://github.com/Magisk-Modules-Repo/acc/blob/master/common/accd#L22
[Magisk] xtam:
[MENTION=5228676]VR25[/MENTION]

on my note 8 when charging switch is in batt store mode is the same -70 % and stops, even if i have in config 70-80.

in other charging mode it reaches over 86%.
[Magisk] xtam:
after restart i see that latest with batt slate mode on note 8 works fine
[Magisk] Da-BOSS:
I got Note 9... so... :D but still as I said before I tried the switch and still it only charge to 70 % :)
[Magisk] alex moymoy:
Still not working to me ?
[Magisk] ugvpkn:
Hmm, on my OnePlus 6t (encrypted with Smurf kernel and xxx ROM), it does *not* start automatically after reboot. Thanks !!
[Magisk] Da-BOSS:
Ok.. so... I tried to give it 1 more try for this issues... I removed the module and then reboot it and then installed the module and then rebooted and then I changed the switcher to batt slate mode and then rebooted again....... and guess what.... it works now ! :victory: but yet.. it will still suffer from going over the limit that I have set to 85% but randomly and happens 1 to 2 times per a week :)

So.. I guess I did my home work [MENTION=5228676]VR25[/MENTION] and I'm sorry if I wasted your time searching for the problem but yet... I though the database on ACC would pick the right switch for my Note 9 automatically as the previous version so... I think that is the point why it didn't work at the first place and get stuck to stop at only 70% :)I needed to switch to batt slate mode and then reboot in able to work ;)

Anyway... thank you! :)
[Magisk] paolocorpo:
Here

Xiaomi Mi A1 8.1.0 Magisk 18 and Moun Kernel

All is OK using AC charger, lighter adapter charger

The max capacity is reached

The cooldown process is running well

Thanks

Paolo

Inviato dal mio Mi A1 utilizzando Tapatalk
[Magisk] Hikes:
Hello [MENTION=5228676]VR25[/MENTION] . The acc ignores the max value and goes up to 100% . By the way,how can I attach the logs through a browser? Can't see an upload button
[Magisk] Profetorum:
Acc doesn't work for me. It keeps charging above the % i set
[Magisk] paolocorpo:
The logs are stored here:

/storage/emulated/0/acc/logs

Copy them in a preferred folder and attach them here using the feature of forum (I suggest to do it using the web and not the app)

Inviato dal mio Mi A1 utilizzando Tapatalk
[Magisk] Profetorum:
If you can help me, here're my logs. Ty :D

[MENTION=5228676]VR25[/MENTION]

EDIT: i just checked my acc-deamon log, do you think i should change busybox directory?

EDIT2: well, it seems to work.
[Magisk] paolocorpo:
I am sorry dear,

I am not able to analyze your logs

Wait for VR25's support ;)

Ciao

Inviato dal mio Mi A1 utilizzando Tapatalk
[Magisk] :
+1 for latest version, 10-12-2018 working fine, went back to it to be sure as few days ago.

Will save logs of 10-12, update to 18-12 and do the same then so you can compare.

Oneplus 3t btw ;)
[Magisk] Profetorum:
I solved changing busybox directory (figured out checking the daemon log). Ty tho :)
[Magisk] VR25:
**2018.12.22 (201812220)**

- [acc] Legacy/mcs <pause%> <resume%> syntax support (e.g., acc 85 80)

- [acc] More comprehensive help text, command examples/tips included

- [General] Minor fixes and optimizations

- [General] Updated documentation and default config

Those who are facing issues, please read the whole documentation again for your own good!

By the way, it has lots of new and good information that others will find useful as well.

Don't forget acc -s s. Some devices have more than one charging switch and this command allows users to change which one acc should use. If you run this and it outputs an error or nothing, your device is not supported. Either the hardware or the kernel don't support advanced charging control. Most of the time (if not always) it would be the second possibility.

Don't wait until max capacity is reached to see whether a switch works. Instead, use acc -e/-d commands (enable/disable charging). When done testing, restart the daemon (run accd).

___

P.S., I'm unavailable on Telegram these days.
[Magisk] Macusercom:
After updating to 2018.12.22 and installing it twice before and after a reboot, accd starts automatically now on my OnePlus 6 running OOS 9.0.2 with Magisk 18. Great job!

Also I love being able to use the old "acc 80 75" now. Am I right that running that command won't start multiple accd processes? E.g. if I tell Tasker to run "acc 80 75" and at night "acc 60 55" it should only overwrite the config file and not start a 2nd process?

It worked a few months back but with acc I ran into some issues that the disabling/enabling of the charging was constantly enabled/disabled and bugged when doing it :)
[Magisk] :
Latest 22-12-2018 is working fine.

Had to change charging option to 3, default is 1.

Acc -s s, then option 3 for Oneplus 3T.
[Magisk] VR25:
Regardless of what you do with the available commands, there will always be at most one acc/accd process running.

Does this apply to the latest version too?

Aren't you mistakenly talking about the "cool down" algorithm?

It pauses charging periodically for a few seconds to lower battery temperature and open circuit voltage (OCV). This alone is often better than simply stopping charging at a given battery capacity.
[Magisk] Macusercom:
Okay, that's what the changelog said. I used mcc a couple of weeks ago and whenever I ran the command "mcc" with the percentage values it started enabling/disabling charging every 3 seconds until it stopped completely and never charged again until rebooted. Now with the latest acc applying values seem to work fine for me. Need to do more testing but no issues so far. Just wanted to ask again whether multiple processes are now prevented. So that's great! :)

I know that there is the cooldown mechanism but unfortunately it wakes the screen and makes my device vibrate which I can't disable in OOS anymore. So I have commented it out since using acc ;)
[Magisk] VR25:
There's an app suggested by [MENTION=4575578]Da-BOSS[/MENTION] which prevents that. I don't remember the name... SnoozeCharger... whatever... check that out. :)
[Magisk] paolocorpo:
Yep

Snoozy charger

Inviato dal mio Mi A1 utilizzando Tapatalk
[Magisk] Bortex19:
Hi!

I have the config.txt setting in maxcharge=50%

If in one concrete moment I need to charge the phone over that value (70% for example) but only that time and keeping the rest of parameters (like maxtemp), can I write something in "terminal" to do it o have I to change the settings of the config.txt?
[Magisk] VR25:
Run acc -e 70% && accd. That means "keep charging enabled until 70% capacity is reached & restart the daemon afterwards." You don't have to touch config.txt.
[Magisk] swieder711:
Many wireless chargers can deliver 7.5W or 10W, but are rate limited to 500 mA on the Pixel 3 due to a missing handshake between the phone and non-Google wireless pads. On the Pixel Stand the Pixel 3 can draw close to 2A.

Any thought of using this app to bypass the 500mA charging limit when using a Rooted Pixel 3 and non-Google wireless pad?
[Magisk] davidzam:
Hello. I just updated to the latest version that it is located in the magisk manager. Updated from the beta version that I used to have. The configurations I put manually, will stick? Or do I have to set things up again. I really don't remember the commands I have to use. I want it to charge up to a hundred porcent, then stop, and restart chargin when it reaches 80. And also want that if I can't recharge uses the battery power. I don't want the smartphone to turn off when it reaches 5‰ I want it to use the whole charge... A 100%. Thank you.

Enviado desde mi SM-G550T1 mediante Tapatalk
[Magisk] VR25:
[MENTION=4239524]swieder711[/MENTION], upload /sdcard/acc/logs/acc-debug*log so I can verify whether that works.

[MENTION=3943384]davidzam[/MENTION], if that version was old enough, chances are, your settings were reverted to defaults. The command you have to run to set things up is acc -s capacity 0,60,80-100.
[Magisk] davidzam:
Thanks... I was way off... [emoji2] Thank you.

Enviado desde mi SM-G550T1 mediante Tapatalk
[Magisk] paolocorpo:
Dear [MENTION=5228676]VR25[/MENTION]

This night the charging was not running well

It has maintained around 50%

Attached logs

Edit

Forgot this my post

It was a fault of my electric adapter :)

Inviato dal mio Mi A1 utilizzando Tapatalk
[Magisk] kzolt:
Can someone help me, how can I use acc like the early version of mcs. I'm only interested in battery start and stop percentage. Don't care about temperature, etc.

Then I only wrote: "mcs 80 75" to start charging at 75 and stop at 80

Do I have to change the config file if I want the same after reboot? Or is it enough to write the command only once in terminal: "acc ???" and it will change the values in config?

Which config file I need to edit? The one on SD card /data/media/0/mcs/config.txt or the one in /sbin/.magisk/img/mcs/config.txt?

Thx.
[Magisk] Da-BOSS:
Testing on my Note 9 and... for those who suffer from screen turning on or vibration... just simply use SnooZy Charger :cool: ;)
[Magisk] swieder711:
I have not installed the Magisk module yet. Once I do, how would we force high current wireless charging?
[Magisk] nupogady:
config parameter uevent

I'm missing the parameter uevent in config.txt, because acc is guessing the wrong file. Is there a change for a come back?
[Magisk] Macusercom:
Thanks! Also I kinda wonder if it were possible to be able to manually delete the battery stats in settings via an acc command? I don't want to reset it every time I plug in my device but with acc -e it doesn't seem to have an effect :)
[Magisk] aouerfelli:
EDIT: It's just me being stupid
[Magisk] psychoela:
I already try "acc -d 3h && accd" but after 3 hour accd still disable, or my typing not right? N I already try "acc -e 100% && accd" same after 100 accd still disable.
[Magisk] paolocorpo:
Dear [MENTION=5228676]VR25[/MENTION]

I lost root because I updated to PIE recently

Do you have interest into try to do something in order to offer the feature of your acc module to a user rootless ??

Thanks

Paolo

Inviato dal mio Mi A1 utilizzando Tapatalk
[Magisk] gunzjack:
Hi dev, thank you for your great magisk module, i use this module than change the setting to travel (9095), at first the module is work as intended (stop at 95%) but last night my phone is stop charging at 94%, and this morning i charge and stop again at 94%, is this normal?
[Magisk] Shizzle2889:
Alright, question. I was originally using the mcs module, and swapped recently to this one. Currently could care less about most functionality outside of avoiding overcharging the battery (in essence, the pause and resume capacity function). Ever since I flashed the module in however, my battery is charging horribly slow- by which in using any app (such as labs currently), i am losing battery while the phone is plugged in and displays charging. With phone on, screen off for 2 hours, the charge will go up maybe 1 or 2 percent.

I have tried changing up the config to try making it a bit better, however been unsuccessful making the charge any better. Any suggestions or advice on how to make it better.
[Magisk] Da-BOSS:
Working like a charm... I have been tested it for 2 days straight and is working greatly :good::highfive::fingers-crossed::victory::cool: [MENTION=5228676]VR25[/MENTION]
[Magisk] puturaya20:
Sorry sir change / setting

This is 3. [Optional] customize /data/media/0/acc/config.txt. ?
[Magisk] davidk21770:
I am running this in 2 devices: a Samsung S3 tablet running a debloated Samsung oreo (no aosp or lineage ?) and it's working very well (once I found the posts suggesting changing the controller and rebooting).

But on my Samsung S9 cell running lineage oreo, the power management wakelocks go nuts and the phone uses significantly more power before finally sleeping - I had to disable it. Anyone else having problems like this?
[Magisk] xtam:
[MENTION=5228676]VR25[/MENTION]

is it possible to enable fast charging for all cables?

in s5 boeffla kernel had ability to turn amperage to qc to all cables, in note 8 i use the same charger but with baseus cable its only loading, when i change to samsung original cable it switches automaically to fast loading.

is it possible to to with this mod?
[Magisk] xtam:
[MENTION=5228676]VR25[/MENTION]

i dont know why but recently it started malfunctioning again.

Few days worked fine, stopped at 80% , i did not change anything and now it loads even above 86%.

What can be cause of that?

---------- Post added at 10:37 AM ---------- Previous post was at 10:37 AM ----------

[/COLOR [MENTION=5228676]VR25[/MENTION]

i dont know why but recently it started malfunctioning again.

Few days worked fine, stopped at 80% , i did not change anything and now it loads even above 86%.

What can be cause of that?