yashsingh1/xdaforums huggingface dataset:
[Magisk] TraderJack:
Hey all. Just set ACC up on mine and wife's phone. Going to read through the README this weekend, but I'm a bit confused about something that I didn't see on a quick scan/find of the README:

I tested this on my phone a couple weeks ago, and the first thing I did was install ACC from Magisk. Then, after reboot I installed ACCA. It showed the daemon running...all good.

When I installed on my wife's phone tonight I installed ACCA first. When I opened it and granted it root it said "Installing ACC" and then the daemon was running.

When I went back to install on my reset phone I installed ACC from Magisk first (again) and then ACCA where the process was the same as my wife's phone.

I'm unclear on why/what purpose installing in Magisk does? It appeared to function properly and start the daemon when simply installing ACCA apk.

Is installing in Magisk necessary and, if not, what are the benefits/drawbacks vs. just using ACCA.

(realize I know ACCA give the GUI interface, I am asking specifically if we need to install ACC in Magisk as well, and if there are benefits to do so...)

thanks.
[Magisk] ktmom:
And the third option is to flash the acc.zip in recovery or a flashing app [emoji6]

Installing through Magisk or recovery must be done when not using the app. However, as you noticed, the app installs the acc backend and will update it. When using the app it is not necessary, nor advisable to install acc separately.
[Magisk] TraderJack:
Thanks. I found maybe a weird bug:

As I mentioned I installed once as a trial on my old 3XL a couple weeks ago. I installed via Magisk and then installed ACCA app. The app showed as well as the Magisk module.

Now, last night, the same thing happened on my wife's phone - both were installed. However on my phone every time I installed the ACCA app, the Magisk module disappeared/was uninstalled. I thought this was messed up because my two other tries on other devices didn't do this.

I went through the process several times of uninstalling both module/app and rebooting, installing module, rebooting, confirming module was there, then resinstalling app. But each time the module was removed.

Finally I removed all my Magisk Modules, rebooted, installed the module again and then the app. This time both remained (as they did on the other two devices the first time).

But, reading up on this - as you state - both are not recommended and I found at least one other thread that mentions the app is *supposed to uninstall* the Magisk module. Is this correct? If so, then it seemed to work only 1 out of 3 installs.

Also, the uninstaller .zip that is placed in the root directory (not sure if by app or module). Is this required? It seems both removing the Magisk module and/or removing the app is supposed to remove the acc backend as well. When is this zip required?

(As a side question I have a Pixel 3XL on Q, and I don't have TWRP. Is there another way to flash zips?).
[Magisk] ktmom:
The uninstaller zip is optional. I use FK manager. Fastboot booting TWRP should still be able to flash zips just not do backups/restores even on Q (pixel 3/3XL). And, correctly configured zips are flashable in Magisk manager.
[Magisk] TraderJack:
My understanding is TWRP can't even be installed on Pixel 3 Q, but maybe something has changed in the past few weeks.

Anyway, I guess I'll uninstall ACC from modules and ACCD app and then reinstall just the ACCD app on our phones.

thanks
[Magisk] ktmom:
Nothing has changed with TWRP, and won't for a long while at best. I didn't suggest installing TWRP, but this is very off topic. Recovery is discussed at great length in the device forums.
[Magisk] eggmama:
Hi

Not sure if I uploaded the file correctly with the right names for an easy find. Would you like me to attach it here as well?
[Magisk] ktmom:
If you're talking to me, it helps to quote or tag me. [emoji6]

After looking at your file, I'm not comfortable having an opinion. You'll need to wait until [MENTION=5228676]VR25[/MENTION] has a chance to review to see if he can offer advice.
[Magisk] waterlubber:
I have an LG V20, and it looks like the battery idle charging isn't supported, sadly.

I still want to cap capacity, and I think I wore down a lot on my last battery going through 70-80% several times a night (I use Sleep as Android, which keeps the device awake for accelerometer usage.)

What's the best (i.e for battery health) way to "emulate" battery idle charging? Should I bounce from 70-71% or for a larger area?

Alternatively, would I be able to export a charging current (current going into the battery) and then adjust the current going into the phone (externally, with some kind of regulator) to accomplish the same effect? Not sure if limiting the input current would just slow down charge or make the phone stop charging all together.
[Magisk] eggmama:
Thanks. Yes, I realized that I quoted the wrong thread. Ooops.
[Magisk] VR25:
"...regardless of what level i'm at."

Is it really any level or 90+? (Android OS resets battery stats at that threshold)

Don't you have any app that does this? (e.g., FK Kernel Manager)
[Magisk] VR25:
45+ is really what you don't want your battery to be at for longer periods of time. 40-44 is not too bad. It's said that modern li-ion chemistry can tolerate higher temperatures - but I don't trust such claims.

It's pretty much Android version independent at this point.

Weird Issue

I'm investigating.
[Magisk] VR25:
Scheduled tasks are executed by Daily Job Scheduler (extremely efficient). Meaning, the app doesn't run in the background. It doesn't need to in the first place.

There's an issue with profiles not being marked as "applied" after scheduled tasks run.

Other schedule issues are under investigation.

Refer to https://github.com/vr-25/acc#power-supply-log
[Magisk] VR25:
Refer to https://github.com/vr-25/acc#power-supply-log

If you use Magisk for root, don't worry about battery optimization or the app being killed.

It doesn't have/need to run in the background.

Also ignore the inconsistent daemon status. It's just an artifact. A fix is in the works.
[Magisk] VR25:
You could change the coolDown ratio to 50/5. This would speed up charging.

As for scheduling, go to the profiles tab and create a profile for day and another for night. Next, go to the schedules tab and schedule these profiles. It's very straightforward.

If you still find yourself missing something, don't hesitate to ask questions.

There's a potential workaround for this (next release).

I would like to take a look at your device's logs.

Refer to https://github.com/vr-25/acc#power-supply-log

Meanwhile, to remedy the high battery drain, use a resume-stop difference of 1%.
[Magisk] VR25:
This is a weird issue.

All changes are supposed to be volatile (stored in RAM, nonpersistent).

Try a hard reboot. Refer to https://www.tenorshare.com/android/reboot-android.html for details on that.

The Magisk repo version is outdated.

This issue has already been fixed.

Download the latest version from https://github.com/vr-25/acc/releases/

Unless the device draws power from the wireless charger when charging is stopped (battery on standby), this isn't supposed to happen.

In other words, the device shouldn't draw power it doesn't need.
[Magisk] VR25:
The charging circuitry supports 9 Volts.

Greater voltage with the same current requires higher resistance - which wastes power and generates more heat. To bring back the balance, the circuitry has to lower the resistance, which in turn allows more current.
[Magisk] VR25:
Don't worry about this little issue.

Just remember that the app installs ACC as its own module and removes the Magisk variant.

Sometimes, the ACC Magisk module folder is not removed, but this doesn't cause any issue either.

The next release will clear the confusion and end this ghost module issue.

The name is fine. Don't worry too much about it.

I would set a 40ish bounce for nighttime (e.g., 44-45), since the voltage at that capacity is very friendly to the battery.

To take this to the next level, I'd also either use a slow external power supply (5V, 500mA) or limit charging current to 500mA.

40ish% capacity limits = "relaxing" battery voltage = best for long time plugged in

You can easily set up two scheduled profiles - "day" and "night".
[Magisk] MyronAz:
Thanks for replying. I have already submitted the power supply log. I would love to have this working on the ROG 2 and I know others are interested as well. If there's any way I can help, just let me know.
[Magisk] waterlubber:
So, keep the voltage low until a couple of hours before I wake up, where it'll ramp up to a higher charge level?

As for limiting charging current, is there a way to do that within acc, android, or do I need to do it externally at the charger?

Thanks for your help!

P.S: I would like to suggest either day-of-the-week schedules or schedules based on alarms. I get up at different times on weekends, and want to compensate for that, if possible. The ability to choose "charge 2 hours before alarm" would be incredibly useful, but I'm not sure if apps can just grab alarm times like that.
[Magisk] eggmama:
Thanks, if I switched ROM, do I need to upload a new log?
[Magisk] daniel_loft:
Thanks for the great module. Sadly my OnePlus 5's battery is already below 75% health, but I least I'm building up experience for my next phone. I'm running ACC v201910132

I have a few questions/remarks:

My phone wakes up whenever plugging/unplugging. With ACC running, each charging pause is seen as an unplug event. Accordingly the screen wakes up quite often.

The same behavior also messes up with my Tasker profiles that depend on the charging state.

Is there a way for ACC to interrupt charging without "unplugging" the phone? I am guessing that "prioritize battery idle mode" might be doing this, but I am not sure since my kernel doesn't support it. Are there any custom kernels that support it?

Thanks again!
[Magisk] VR25:
Exactly.

A current limit is usually set as applyOnPlug=usb/current_max:500000 (500 mA). You can use the app for that. It even gives you tips.

Note however that if this doesn't work, the kernel is to blame.

Also keep in mind that 500000 microamps (500 milliamps) is a standard USB current. Other values may be ignored.

These possibilities are under exploration.

Thanks

Only if the android version or kernels are very different
[Magisk] VR25:
I'm not aware of any kernels that support "battery idle mode".

I'm working on a potential workaround for the screen waking up issue* (wake on plug/unplug). The next release will include that.

* It's actually a native Android feature. Some ROMs (e.g, LOS) offer the ability to turn it off, under settings > display > wake on plug.
[Magisk] Hung0702:
I know this is late and wonky but a workaround for interested parties would be to use a smart plug and IFTTT. When your battery level hits 80%, IFTTT would automatically turn off the plug and only turn it back on if (1) your battery is below 75% and (2a) your location is currently at home or (2b) your WiFi network is x.
[Magisk] VR25:
Pixel 4/4XL users, take a look at https://github.com/VR-25/acc/issues/20#issuecomment-565711859/ (new charging switches found)
[Magisk] Ava Pug:
I found "charger/charge_disable 0 1" and "/sys/kernel/debug/google_charger/input_suspend 0 1" worked for me.

I'm using the second one. Thanks!
[Magisk] ziki:
Check here, "qi data protocol"

https://www.electronics-notes.com/a...ry-charging/qi-wireless-charging-standard.php

I suppose that if the device does not send '100%' value or a specific message 'i'm charge' the charger does not not to stop the charging.

If you have a wireless charger with led indicator you can see that with no limit as soon 100% is reached the charger switches off/changes the color of the led. This does not happen limiting the charge to e.g. 80%, the charger led indicates always "charging".

---------- Post added at 11:23 PM ---------- Previous post was at 11:15 PM ----------

Thanks. That's a good workaround....but I do not want to sleep with the WiFi on.

There is also e BT alternative:

https://chargie.org/

But for the same reasons I do not like to sleep with BT on the bedside table.
[Magisk] Hung0702:
You can also tell IFTTT to turn off the WiFi immediately after it turns off the wireless charger. Can even make it conditional, so if it's still charging after the power is cut, it will send another signal to turn off the smart plug. If it's no longer charging and the smart plug is not responding, then it will turn WiFi off.

To make it charge again, you can have the WiFi turn on when the battery hits 75% or something. Then, if 1 min has passed without charging, it'll try again. After however many attempts you define you can make it stop trying, turn off WiFi, and leave you a notification that it failed trying to turn the charger back on. Even if you make this part location specific, maybe you don't put it on the charger one night and would prefer that IFTTT doesn't kill your battery trying to turn complete its tasks.

But hey let me know if you find a better solution. I haven't implemented this routine yet because it's cumbersome, but it looks maintenance-free once I write it out.
[Magisk] ziki:
Ok, but I suppose that you must have a router that supports IFTTT to switch WiFi on/off...and my Fritz Box and my tp-link powerline WiFi repeater I use in night zone do not support it :(

Anyhow IFTTT is interesting :)
[Magisk] Ixioon:
thanks downloaded from github and it's all good didnt know magisk was outdated
[Magisk] jelbo:
This build works on my Samsung Galaxy S10. The official acc Magisk module bootloops my phone.

Can official support for the S10 or maybe Samsung phones in general be added?
[Magisk] tesacrap:
can somebody give me some advise about the battery idle mode? I really would like to get it working on my Xiaomi Mi 9 but my current kernel does not support it.

am I right guessing that probably no kernel supports this feature? since I want to use android auto what needs a lot of energy, this would extend my batteries life significantly
[Magisk] ktmom:
AFAIK, all custom kernels are built on top of the stock kernel. If the stock kernel does not support a this feature, the custom ones won't either.

I honestly don't know if there is also a hardware limitation, or if a sufficiently knowledgeable developer could compile a kernel adding a feature like this in.
[Magisk] tesacrap:
Thank you for your answer.

I'm trying to help me out with a workaround limitate the Voltage to 4100mV using the batterly/voltage_max. This seems to work for xiaomi phones. I guess an small under / oversupply of power will get me nearly to the battery idle result?!

We'll see :)
[Magisk] VR25:
These devices are supported since that build.

The Magisk repo is outdated.

Find the latest release at https://GitHub.com/VR-25/acc/releases/ .

Well, that's actually more powerful than battery idle mode itself.

It's said that 3920 millivolts is better for long operations.

The storage voltage range (3.8-3.9 Volts) is even better. However, it only yields about 40-50ish% capacity.

For more info, refer to https://batteryuniversity.com/index.php/learn/article/how_to_store_batteries/ .
[Magisk] heithered:
Sorry i saw this pretty late, just installed it again and how long shoud i use it before sharing the log to dropbox?
[Magisk] ktmom:
Once ACC is installed, that log file does not get updated again so you can upload it when convenient.
[Magisk] wkobaint:
Thank you for the information.

So just flash the latest from your repo into magisk right?
[Magisk] Rc_086:
Anybody have issues with Pixel 3 ?

I tried modify Pixel 3 Rooted on Android 10 but not successful.

Module is installed, i tried commands:

acc -s applyOnPlug=wireless/voltage_max:9000000 but it doesn't work.

Also tried to modify config file in data/adb/acc-data/config.txt

applyOnBoot=wireless/voltage_max:9000000

applyOnPlug=wireless/voltage_max:9000000

Also tried ACC app, the same thing. In config file all parameters changing after i do it in ACC app, but my pixel still not forced to Fast charge. Wileress charger Floweme with 9v 1,1A.

Please help if anybidy had the same thing.
[Magisk] k0rner:
wireless/voltage_max works on a Pixel 3 (and has been discovered on a Pixel 3).

Do other functions work?
[Magisk] Rc_086:
Yes, other functions is work, i used only % charge limit to 80%, changed it to default 100%, also work.
[Magisk] VR25:
Yes.

You mentioned 9V, 1.1A. That's right around the boost a couple of users have been reporting. The original being 5v, 750mA.
[Magisk] Rc_086:
I mean 9V 1,1A charger power, but i have never saw this while charging.
[Magisk] ktmom:
Do you have a case on the phone? Try taking it off.
[Magisk] edekzelian:
Does idle option work with mi9cc on xiaomi.eu on Android 10?
[Magisk] wkobaint:
Anyway, your module disappear on installation module section after I flashed at magisk manager. This is normal?

I do setting in ACC apk by the way.
[Magisk] ktmom:
That's by design

---------- Post added at 10:04 ---------- Previous post was at 09:59 ----------

You could wait until someone with your exact setup replies, or, test your device by running as su

acc -t --
[Magisk] nirmalts:
Acc with SGS3 and LineageOS

I am trying to get acc work with Samsung Galaxy S3. If it works, I plan to move it to my wall-mounted tablet Samsung Galaxy Tab S2. I am however facing a strange problem.

I found that on Samsung Galaxy S3 (running LineageOS 16 and kernel android_kernel_samsung_msm8226) the only supported switch is batt_slate_mode. While charging, it correctly stops charging at the max limit. The battery however does not discharge after this with the charger connected. I read in some other threads that this is because some devices behave in a way that it draws power from the charger directly at this point (when I test for battery idle mode it says however that the kernel does not support it). Now to test a discharge, I removed the charger and I observed that the phone dischages until the lower limit. When I connect the charger again, the charging icon appears, however the battery keeps discharging over time and does not get charged again. It charges only after a phone restart..

Any ideas how to solve this?
[Magisk] ktmom:
If you use tasker, I've got a hack suggestion [emoji846]. You can let tasker monitor the battery level and run an ACC enable/disable script. I do this since depending on different states, I use different configurations.
[Magisk] the_poseidon:
acc reset battery stats on unplug

I made couple profiles but when i set a profile then select reset battery stats on unplug, profile turn off ( i do not see green side next to the profile )

so how can i use reset battery stats on unplug with one of my profiles ?

thanks
[Magisk] wkobaint:
Thank you for your answer.

Btw, for the long charging ex in midnight (cable always connected), better setting the capacity to 40% up 55% right?

So for recommendations, I create 2 schedule, 1st in day setting set 60 to 80 and 2nd in night setting at 40 to 55.

This is correct?
[Magisk] nirmalts:
Acc behaves completely different and correctly on the Samsung Galaxy Tab S2. Thanks a lot for this cool module :good:

The Tab is 24/7 on charge. During the day mostly a screensaver is displayed with weather details, calender etc. In the night, the device is made to sleep with a Tasker profile. I read about different ranges that would suit my usecase like, always around 40%, between 70%-80% etc. I set it to the latter and in 12hrs the tab charged/discharged 4 times between 70% and 80%. Is this bad for the battery?

I don't really care about the battery, but the battery in my last Tab became thick over the while (as it was always at 100%) and I had to unmount the concealed tab and replace it. I would like to avoid this trouble in the future.

What would be a good range to keep the battery heathy in my case?
[Magisk] selfishjelly:
If you don't need the extra capacity in case of power outage, I'd suggest keeping the battery at 40%-41% (storage level, should be 3.8V). Small 1% range ensures the battery doesn't have time to heat up (prevent swelling) and doesn't really shorten the lifespan.

Another suggestion is to charge at low current (500mA). If you use standard charger you can try cutting data lines of the cable used for charging (usually green and white), if that doesn't help, get 2 15kΩ resistors and connect the data lines from the phone side individually trough the resistors to the ground.
[Magisk] nirmalts:
Thanks a lot for your help. Power outages doesn't happen where I stay. So I'll take your suggestion to keep it at 40-41%. Also I am using a low current charger which charges at around 500mA.

Do I have to schedule an occasional full charge around 90%? If yes, any suggestions on the frequency?

Did you mean maxChargingVoltage here?
[Magisk] selfishjelly:
In theory no full charges are necessary for the cell but the battery management system may get confused over time on some phones, perhaps someone with Galaxy tab s2 can answer if full charge cycles are necessary.

I just meant that 40% charge should correspond roughly to 3.8V(storage voltage of li-pol cells) and if the battery voltage is wildly different (like 3.9) something is wrong.
[Magisk] anfield9:
Hello,

At night I don't need fast charge, on Samsung Note9 I have option in Stock ROM (Slow Charging 1A) and after year battery charged by wireless charger is like new one.

Now I have Xiaomi Mi MIx 2s and I need to use Magisk modules for this, is there any command for Slow Charging via Wireless Charger?

Thanks

---------- Post added at 09:47 PM ---------- Previous post was at 09:47 PM ----------

Hello,

At night I don't need fast charge, on Samsung Note9 I have option in Stock ROM (Slow Charging 1A) and after year battery charged by wireless charger is like new one.

Now I have Xiaomi Mi MIx 2s and I need to use Magisk modules for this, is there any command for Slow Charging via Wireless Charger?

Thanks
[Magisk] discodestroyer10:
I don't understand any of this....

To maintain battery in good health you need to keep it charged between 20-80% level and charge it slowly. That means you basically reduce your battery capacity to ~60% from day 1 after purchase. Why bother then? Why not use battery from 1% to 100% charging levels and let it deteriorate by itself during some period of time. Even if you "damage" your battery and reduce it's capacity over - let's say - 2 years of heavy usage to 60% you at least gained that 2 years of fast charging, full capacity, good SOT and so on... What I mean is: I prefer using my battery on it's full potential for 1-2 years instead of reducing its capacity from day 1. In two years time it will have 60% of it's original capacity anyway and without any apps. So what's the point?

I never go below 15%. I use slow charge (1A) at night but I charge fully. This is it. I used this (and others) app for few days and I found myself sitting constantly with phone plugged in. It is just tiresome.
[Magisk] ktmom:
[MENTION=5921431]discodestroyer10[/MENTION] -

Maybe this isn't a good solution for you.

I appreciate the fact that I can leave my P3XL on a wireless charging stand all day and all night without damaging the battery. So when it's not in my hand, it's on a charger. That's the same as I've done with the previous two phones as well. When I'm on extended driving trips, running navigating all day, streaming radio programs as well, my device switches to a 41-42% cycle. My battery is in great shape and when I need a full charge, I switch to giving it a full charge.
[Magisk] aL_09:
Ugh my phone charges so slow using this mod. Is this intended or a bug? Practically 1% increase in 5 minutes, my phone is Pixel (Sailfish)
[Magisk] brizziodf:
Thank you!

Based on your settings, I configured Acca for my Poco F1.

I set `battery/voltage_max` to 3.8v. Doing that, the capacity is limited to 40ish. I use this setting to keep phone connected to charger at night. It stays cool and prevents overheating.

Additionally, I have a schedule to charge the phone to 80% in the morning, so I can use phone all day long.
[Magisk] sudanking:
When you said you use 1A charging, that mean you use other charger other than Warp one?
[Magisk] discodestroyer10:
Yes. I'm using charger from Chromecast.