yashsingh1/xdaforums huggingface dataset:
[Magisk] VR25:
The point is "look for how long electric vehicle batteries last".

If you're not interested in keeping your smartphone alive for as long as possible, look away.

On the other hand, you'll be doing your wallet and (especially) the environment, a biG favor.

A workaround for the lower runtime capacity is getting a phone with a massive battery. Trust me, you won't even notice the SoT reduction.

EV designers also live by this rule.

You don't have to be too strict about capacity limits. Just remember that every 0.10V reduction in charging voltage is said to double the battery lifespan (batteryuniversity.com). This means, even charging to 95% instead of 100% extends your battery's lifespan to a noticeable degree.
[Magisk] VR25:
Those who are worried about other projects of mine not being updated for a long time, possibly abandoned...

Stop worrying.

After the next stable ACC release, I'll focus more on the other Magisk modules (fbind, Migrator, Systemless GApps, etc.).

The current ACC framework is the base of all the other projects - meaning, making it rock stable it priority #0.
[Magisk] a_bolog:
I'm stuck in bootloop after installing the module from magisk...

Android 10 - S10

I tried uninstalling with mm all the modules, deleted them manually from data/adb, also wiped cache and dalvik, but still doesn't boot.

I can only access TWRP, and mm shows that nothing is installed.

I don't understand why I'm bricked. I also tried Magisk Core start-up, no luck.
[Magisk] guest4711:
So I'd try to restore your unpatched ramdisk from TWRP backup or this one saved by Magisk when first installing, e.g. /data/magisk_backup_*

The easiest way should be to flash magisk uninstaller...
[Magisk] VR25:
The Magisk repo version is outdated. Find the latest release at https://Github.com/VR-25/acc/releases/ . It has the S10 fix.

The bootloop issue really shouldn't stick around like that. Other users had a much less painful experience. All they had to do was uninstalling the module. Are you sure there's nothing else potentially causing bootloops? Did you try a forced reboot?

The next version has a failsafe mechanism that activates a "disable module" flag if it detects a bootloop.
[Magisk] discodestroyer10:
So, I gave it another shot on my 1+7pro and I have chg wake_lock issue. Tried all charging switches with no results - phone stays awake after the charging is cutted off. Could it be kernel related or is it OSS thing? I'm on ElementalX and I could (reluctantly;)) try another one.
[Magisk] VR25:
It's a kernel (power drivers) issue. Others may call it "feature".

A workaround is setting the resume level 1 unit lower than the pause level (e.g., 79 80).

The next release is coming with additional charging switches, some of which work in pairs. Hopefully this will boost compatibility significantly - and put an end to this wakelock cumbersomeness.
[Magisk] doopek:
Hi

Sorry for my google english.

Maybe someone will be useful ...

For some time I have tried to limit the battery charging current using acc. Until now, charging current ranged between 1.25A and 1.80 A. I looked at the whole thread but it did not help me. Only today I tried with the file/switch:

ApplyOnPlug=battery/constant_charge_current_max:CURRENT_IN_mA

I tested with different chargers, cables, power bank, set different current values and worked correctly.

Attached is the log of my acc.

Xiaomi Redmi 4X (Santoni), android 9, LineageOS 16.0
[Magisk] the_poseidon:
I try to keep my charge %80-30 level daily and using xiaomi mi 8 lite phone with 3350 mah battery

For charging you suggest any charging voltage?
[Magisk] washwash:
is possible to set the mah of the charging? like i have a 2ampere charger and i want it to charge the phone like is a 500mah, all i see is voltage control and i don't get what's for
[Magisk] discodestroyer10:
Del
[Magisk] ktmom:
There is a relationship between current and voltage. Lowering the charge voltage will lower the current as well. I believe there is a current_max setting. Look through the readme on VR25's GitHub.
[Magisk] VR25:
See what the voltage reading is when charging is stopped at 80 and the device is still plugged in. Apply that voltage in millivolts.

There's no current control wizard yet, because implementing that is a bit tricky. There is more control file variability for current than there is for voltage. Only recently I started working more seriously on algorithms for handling that.

Right now, you can try the following:

acc --set applyOnPlug "battery/restricted_charging:1 battery/input_current_max:1000000 usb/input_current_max:1000000 battery/constant_charge_current_max:1000000 usb/current_max:1000000 wireless/input_current_max:1000000 wireless/current_max:1000000"

1000000uA = 1A

Note that not all devices support this. Others only have partial support (i.e., only specific values or range of values supported).

You have to figure out yourself.

The good thing is that current control is stricter than voltage. If you go too low or too high, the device will refuse to work with such value.

I use applyOnPlug=usb/current_max:500000 (500mA) at night, on my Moto G4 Play. That's the only value it recognizes well. Zero amps cause the current to fluctuate around 10mA, while any value higher than 500mA is simply ignored (meaning, the default is used).
[Magisk] 5tormChild:
ACC doesn't support Kospet Prime

ACC seems to be so great and well thought, thanks for creating this masterpiece, @VR25!

BTW, I've installed the latest version (**2019.10.13-r2-dev (201910132)**) of ACC, I have my watch rooted via Magisk, but I've used ACCA for this purpose.

Everything's up and running - except on the Kospet Prime ACC doesn't find anything usable (acc -s s returns automatic and nothing else). @VR25, could you, please, take a look at the attached logs? (The resulting .bz2 file of acc -t.)

Thanks a lot and keep up the great work!
[Magisk] VR25:
Thank you for the feedback and logs!

The current version (unreleased) supports MediaTek SoCs.

I took a look at your power supply logs. Your device has the target control files.

You have 2 options:

1) Wait for the next release.

2)* Get pre-releases and provide feedback. Contact https://t.me/vr25xda (preferred), https://fb.me/vr25xda or https://m.me/vr25xda.

* Anyone who's interested must have at least basic diagnostic and Linux shell skills - i.e., know how to grab relevant logs, run simple shell commands and interpret their outputs.
[Magisk] 5tormChild:
I made a little donation to support your work, because I like your attitude!

I don't have a Telegram account, but I'll install it on my big and bulky "gaming" mobile (it has 10Ah battery, so it lasts longer :D), then I'll join your Telegram and test the pre-release tomorrow or the day after.

Thanks a lot and have a nice day!
[Magisk] aero7even:
Is there any possibility to get this module to work with wireless charging? I have a Mi9 and the original 20w xiaomi wireless charger. But when the phone reaches the desired maximum charge of 80% the charging always starts and stops again until it reaches 100%.
[Magisk] k0rner:
Works fine with wireless charging on a Pixel 3. Maybe, try a different control switch?
[Magisk] aero7even:
What do you mean with 'control switch'?
[Magisk] k0rner:
"chargingSwitch" parameter in ACC config. See https://github.com/VR-25/acc/blob/master/README.md for more details
[Magisk] aero7even:
Ok thank you, I will try.
[Magisk] lysiong:
Using the attached charging switch will solved your problem as me also using Mi9
[Magisk] aero7even:
That worked, thank you. The phone now stops charging but the coil of the wireless charger stays active and the temperature of the battery still stays quite high. Is there also a solution for it?
[Magisk] lysiong:
My batt stay cool once charging stop although wireless charger stay active. My phone batt level also start decrease if u left it on charger long enough once charging stop.
[Magisk] I5WsRcGXFSPHLBFtjNxBXkd2:
I have a Redmi Note 5 (Whyred) and I have one problem when using this module (no matter the ROM): When not using it, I get a normal standby drain. But when using it, I lost the first 10% in about one hour, then the drain normalizes.
[Magisk] the_poseidon:
I use battery stop when charge as %81 same as attached settings, also i use last v 25.0/ r2 acc, in addition i select reset battery stats on unplug

i put my device over night with those setting but for couple days it stops on %81 but charge stays long on %81, i think it shows as %81 but on the back side battery increse charging throught %100

Also there is not anything seen on magisk like acc, previous v25 r1 there was at before but currently nothing

Here i attach my settings n logs, could u pls advice whats happening?
[Magisk] lysiong:
try to use manual switch, auto switch may not work correctly(especially on Mi9).
[Magisk] the_poseidon:
I have mi device too as mi 8 lite, tried to choose manuel switch n charged with it

It charged so fast fm %29 to %81 around 20 mins n now it drains fast as well

So nothing worked...
[Magisk] lysiong:
You might need ask the creator of the ACC, not sure is it due to hardware or software.
[Magisk] ktmom:
Are you sure your device isn't just drawing power from the charger and not charging the battery, which is why the battery level stays at 81%. That is called battery idle mode. If you run the following command in a terminal, there should be a line referencing battery idle mode. If true, then that's what is happening.

acc -t --
[Magisk] ktmom:
If everyone is visiting XDA using apps and not a browser, you may be missing [MENTION=5228676]VR25[/MENTION]'s request for specific logs that is at the top of this thread on a browser. You can see it at https://xdaforums.com/showpost.php?p=78809121&postcount=2247

I don't think the Mi devices have logs uploaded.
[Magisk] VR25:
You really know how to explain things!

I'm glad you were promoted to moderator.

I was going to ask the XDA gods to consider elevating you to [at least] "recognized contributor".

What you've been doing speaks for itself.
[Magisk] VR25:
Wakelock or rapid idle drain: see if a specific charging switch works better (acc -s s) or set resume_capacity 1 point lower than pause_capacity (e.g., acc 80 79).

For all the other issues, including MediaTek, Pixel 4 and OnePlus 7 support, wait for the next public release. Those who want to test pre-releases, contact me at https://t/me/vr25xda.
[Magisk] the_poseidon:
I am not sure but it was like charging the battery cuz it was %29 n go throuht the %81 fast

At before i tried to prioritize apply battrry idle mode but it says your kernel oesnt support while testing

Also i guess battery need to be on charging for that command as i seen on the attached pic

Yesterday i tried some calibration, first i drained my battery till phone get off then made a wipe to art dalvik cache n cache then charged full as 100 while phone is off and then reboot the phone n deleted battery stats.bin file, re opened the acca again

Now battery is fine, but i will check on first charging
[Magisk] Some_Ghost:
I'm a little confused as to what to do for my Pixel 4 XL is acc even being worked on anymore?
[Magisk] the_poseidon:
After fully charged n deleted the battery stats bin file, i had a great SOT , and then again charged to %81

Here attwched terminal check, it seems not on battery idle
[Magisk] ktmom:
Sure it is. Just the second post before your's:

I've gotten myself a little confused :silly: Is there still a problem now? Is the problem that you're only getting to 81%? Could you summarize for me please :angel:
[Magisk] Some_Ghost:
my problem is that I've been reading all of this and I did install the magisk module I'm just not sure exactly how to adjust it to where it works for my phone I'm kind of a dummy when it comes to this stuff
[Magisk] ktmom:
Did you install the module through the Magisk download section, by flashing the zip from [MENTION=5228676]VR25[/MENTION]'s GitHub or by installing the ACC app? One of the last two is best since they are what is current. The app tends to be earlier to use for many people and it will install the backed (ACC itself) on install.

Have you read the readme provided through the module? You can find it easily by going to the Magisk download section, finding the ACC module under "installed modules" and tap on it. There is tons of information there, but I'd you have specific questions, we're always here [emoji6]
[Magisk] Some_Ghost:
thank you I installed it via magisk The app from GitHub did not work the other day even though it said it was running my phone was still fully charging
[Magisk] ktmom:
You might find it easier to use the app to start. If you're having a problem finding it, it's on MatteCarra's GitHub. You need to expand the assets link under the release to find the .apk. I attached an image to help.

Edit, sorry, I missed that you said you had a problem with the app. I suspect that's related to the update that will be upcoming, as mentioned in the first post I quoted in this conversation.
[Magisk] Some_Ghost:
thank you very much for taking the time to communicate with me I greatly appreciate it buddy I will just wait for the next release
[Magisk] the_poseidon:
After a fully charged circle n deleted the battery stats bin, i dont have problem anymore
[Magisk] VR25:
If you don't want to wait for the next release, check out https://github.com/VR-25/acc/issues/20#issuecomment-565711859.

For a quick start guide, refer to https://github.com/VR-25/acc/blob/master/README.md#quick-start-guide.
[Magisk] VR25:
I'm revisiting this and wondering how exactly you benefit from it.

Could you elaborate more on that?

The next major release is around the corner and this feature is now looking fuzzy to me.

Thanks
[Magisk] Camerado:
After several firmware updates, power consumption returned to normal after reaching the specified parameter (capacity=80). I think this setting can be deleted.
[Magisk] the_poseidon:
I am looking for one more thing on app

Its very usefull but if you can add a counter or something like to charge battery low to zero period reminder as one month / 3 months

This way its really hard to remember when last charged fully, and charging fully for some periods gets battery very effective
[Magisk] Camerado:
Bull****.
[Magisk] the_poseidon:
Similar apps n modules have, its very usefull if you use regularly

Open your eyes before make a comment
[Magisk] iHeavy:
A little concern

I have a little concern that I would like to clarify, I'm using the modules default configuration, which means that I have not modified anything, according to the configuration the charge should stop at 80% and resumes at 70%, but it goes beyond that limit, I usually do this at bedtime, when I wake up in the morning I notice that my phone has 100% I do not know if this is the module's intention, but I would like to know if it is possible to stop at 80%? Also, I have noticed that when it goes over 80% my device does not turn on the led and the battery icon does not indicate that it is charging. Thanks for your attention.
[Magisk] ktmom:
It sounds like you haven't checked other charging switches. You might want to read through the README file, especially the charging switch section. Find out which ones should work, then try each until you find a good match.
[Magisk] eos9d:
Hi VR25, thanks for the great app, just found it.

I am now using ACCA on Pixel 3, but ACC is reporting different (higher) battery capacity than the system does. I see there's a config item called capacitySync that may fix this, but anyone could kindly let me know how to set it through UI, i.e. ACCA? Thanks
[Magisk] ktmom:
Since I don't use the app, I'm not sure, but I wouldn't be surprised if that is not an available setting yet. Using a terminal, the command (as root) is:

acc -s capacityOffset VALUE

Here's a previous discussion about this issue:
[Magisk] eos9d:
Thanks for bringing up the earlier conversation, I'll try the console command. However as I observe on my Pixel phone, the offset is not constant: when ACC reports 80% capacity, the system reports 70; when ACC says it's 38%, android says 35%. So applying a fixed offset may bring in another inconsistancy issue, I'm not sure how other Pixel holder are dealing with it...
[Magisk] ktmom:
I'm using a P3XL. My discrepancy is not as great as your's. You might want to fully charge, fully discharge, then fully charge again. That might help reset your battery stats. Don't forget the suggestion from [MENTION=5228676]VR25[/MENTION] to set BSreset = false (it's in the quoted post, I forget the exact command - short term memory loss. Just call me Dory [emoji23])
[Magisk] eos9d:
Thanks mate, I'll try to recalibrate the battery first.
[Magisk] VR25:
[MENTION=4031954]eos9d[/MENTION], [MENTION=6617276]ktmom[/MENTION], refer to https://xdaforums.com/showpost.php?p=81152063&postcount=40 and the main post of that thread.
[Magisk] VR25:
It's as @ktmom suggested. Run acc -s s, pick a charging switch and test its reliability. Repeat until you find one that works reliably. It was discovered that certain devices have buggy charging switches. These cause charging indicators to be turned off - while the battery is actually still charging. The next release is coming with something I'm calling oem-custom. Essentially, it applies device specific settings to prevent this and similar issues. Once you find a working switch, please report it, along with your device brand and model - so that I can add a custom configuration to oem-custom.
[Magisk] eos9d:
Really helpful info, thanks:laugh:
[Magisk] Swapnil Soni:
Million loads of thanks :3 <3
[Magisk] eos9d:
Hi [MENTION=5228676]VR25[/MENTION], here's another quick and maybe dumb question. I'm observing a multi-second delay between plugging-in and starting of charging, and another one after unplugging - i.e. battery still shows charging status for a few seconds. I think this has something to do with the loopDelay parameter which you've repeatedly mention to keep as-is because it is closely linked to the underlying mechanism that acc exploits.

However the delay does bring me some weird feeling. So I'm asking if this is unavoidable, or is it something that happens on certain devices like my Pixel 3, or is there a workaround to make it disappear?

Thanks again for the great script.
[Magisk] Sk1t:
[MENTION=5228676]VR25[/MENTION]

I've added support for the ROG phone 2 and made my own post I hope you don't mind.

https://xdaforums.com/rog-phone-2/themes/magisk-module-advanced-charging-t4052743

Please allow me to make push requests or append either of these this to the switches file

battery/device/smartchg_stop_charging 0 1
/sys/class/power_supply/battery/device/smartchg_stop_charging 0 1

---------- Post added at 01:24 AM ---------- Previous post was at 01:18 AM ----------

I've added the required bit to make this work on the ROG Phone.

https://xdaforums.com/rog-phone-2/themes/magisk-module-advanced-charging-t4052743

You can also do this yourself by running

acc -s chargingSwitch "battery/device/smartchg_stop_charging 0 1"
[Magisk] Some_Ghost:
is it working any better on the pixel 4 xl?
[Magisk] FerryAr:
Any solution?
[Magisk] Andrius_S:
Regarding different/newer shell

I apologize for writing here, but I'm not using Telegram... Could You provide briefly any ideas of how to update a shell on Android KitKat V4.4.4 ???
[Magisk] heithered:
[MENTION=5228676]VR25[/MENTION]

Finally replaced the battery of my moto z and uploaded the power supply log to dropbox. Hope it helps.
[Magisk] jiraianam:
[MENTION=5228676]VR25[/MENTION] Thank you so much, you are awesome. When you update the MagicGapps please make possible flash by the Magisk Manager because my device have an bug then I can't flash by the TWRP. So that's very important for some devices the option to flash by Magisk Manager like K20 Pro Premium, /data/adb/magisk do not recognize
[Magisk] VR25:
ACC/A pre-releases are available at https://t.me/acc_group/ .

If you're using capacitySync, delays are unavoidable - for performance/efficiency reasons.

These can be reduced to a point where you can barely notice, though.

The latest pre-release offers more flexibility. I'll soon share a flashable zip - and ping you to discuss how to dramatically reduce these delays without negatively impacting performance.

Refer to https://github.com/VR-25/acc/issues/20 .

Next release

KK is well under my radar. I'll revisit this and we'll talk more about it once the next ACC release is up. It has changes for compatibility with older Android versions/shells.
[Magisk] eos9d:
Looking forward to that:victory:
[Magisk] Some_Ghost:
Thank you so much VR25 for the latest release, I can confirm it is finally working on my pixel 4 XL :svetius:
[Magisk] VR25:
ACC 2020.3.10-dev (202003100)

- ACC Wizard: auto-restart after upgrade

- Installer optimizations

- Universal zip flasher: default_PWD = /storage/emulated/0/Download/, support for filenames containing spaces, more intuitive

Pre-release details and download: https://github.com/VR-25/acc/releases/tag/202003100

Those using yesterday's build can upgrade with acc --upgrade (or -u).

Alternatively, users can download the latest zip and flash it using acc itself: acc --flash (or -F).

This is pretty much release candidate - stable enough to use as a daily driver.
[Magisk] VR25:
Install the latest version and run acc --set loop_delay_charging=5 loop_delay_discharging=10 to reduce capacity_sync delays.

There's a shorter format: acc -s ldc=5 ldd=10. Run acc -c less to know more.

Note: both can be 5, but ldd=10 is optimal. I don't recommend anything lower than 3.

Edit: there's a known issue with capacity_sync - fixed in version 2020.3.10-r1-dev (202003101). Run acc -u to upgrade.
[Magisk] the_poseidon:
Any update on Acca? I guess last one is 1.0.20 (24)
[Magisk] the_poseidon:
I have flashed last acc pre realese with magisk but currently ACCA seems not wotking, screen attached

Also i tried to restart too
[Magisk] CGarz:
Thanks for making this amazing app =)

Is it possible to show timestamps in the log? It would be super useful to me to see the times that things happen. Especially the charger getting plugged in.
[Magisk] VR25:
Notes

After installing... > hamburger menu (three dots, upper-right corner) > settings > acc version > develop

Upgrade manually if the above doesn't work.

At the time of this writing, the latest ACC version is 2020.3.10-dev (202003100).

acc -v

[MENTION=10382139]the_poseidon[/MENTION]
[Magisk] VR25:
The verbose format is raw. Timestamps would cause significant overhead - negatively impacting performance.
[Magisk] the_poseidon:
Thanks for your quick response

Here what i done : firstly i installed last acc 2020.3.10 on magisk then installed the Acca 1.23 which you attached ached

After that tried choosing the both way of develop and 202003100 ( on settings > acc version) but both gave fail

Currently acca working too but i got failed msg when i tried on three dots msg as i mentioned

There i need to do something else?
[Magisk] VR25:
Did you reboot your device after installation? If yes, check for the file /sdcard/cs_debug.zip and upload it here. If no, a reboot is necessary every time after installing/updating a module. -- Thanks
[Magisk] x1reN:
I looked for the zip, there is none. I rebooted my phone after installing it.
[Magisk] guest4711:
You may create this zip by running

su -c cs debug

in terminal. Please upload it here so the developer may have a look...
[Magisk] Zittou:
This is my dream app, thank you so much for making it come true.
[Magisk] iluvatrix:
May I get suggestions on how to get a battery to stop charging at 80% & maintain it till I wake up in the morning?

Thanks
[Magisk] guest4711:
I'd try

su -c cs 80 77
[Magisk] iluvatrix:
Have been testing the whole day.

Now discovered that using cs 80 70 when battery drops to 70 charging does resume & pause at 80.

However leaving the charger cable plugged in my phone does not go into deep sleep but instead maintain at the lowest frequency 384 MHz.

How do I troubleshoot this?