yashsingh1/xdaforums huggingface dataset:
[Magisk] guest4711:
I think your script will fail if /sdcard is a link.

mv ab /xy

will rename the file "./ab" to "/xy". This will fail if there is a directory " xy". To properly move the file into the directory you should code

mv ab /xy/"

And it is good practise to check the returncode of all functions called, even of system calls.
[Magisk] VR25:
I've forgotten about that -- my bad. The question is, though: why didn't you face this before, since that part of the code hasn't recently been changed?

Anyway, thanks for the reminder and sorry about the mess.
[Magisk] VR25:
# 2017.11.18-1 (201711181)

- Additional devices support

- Auto-cleanup after cs uninstall

- "cs debug" optimizations

[MENTION=7721744]__riptide__[/MENTION], [MENTION=8010004]guest4711[/MENTION], [MENTION=2431719]michaelcrossland[/MENTION] && others, check whether this one works for you.

Quick Announcement

The 3rd post will be an archive for older versions, and the changelog will be moved to post #2.
[Magisk] guest4711:
Thanks, installation without problems. "cs -i" working again, "cs debug" too. :svetius:Will now charge and see...

Edit: I've used "cs 80 70" but id did not stop charging. Charging started at 63% when I connected the charger. When I removed the cable it was at 95%. The cache file shows me it was using the correct control file (batt_slate, which is correct for I9505).
[Magisk] __riptide__:
Ok after the latest version cs is unable to pause charging at all. Disabling for now.

Thanks for your efforts in advance.
[Magisk] Younex:
Thanks, I did read the instructions in OP multiple times, but it wasn't clear enough for me ^^'

Now after the recent update showed up I finally understood that the version before does nothing by default.

First thanks for making this module ?

I did read the OP as usual. It states that this module automatically pauses and resumes charging. Okay, I expected it to do so...

Then the first command is to toggle auto run, which I believe was off by default when I installed it but there was no mention of it, nor the reason we'd need to restart the server, nor what causes it to stop other than the manual stuff that followed.

And the second command is for manually setting up stuff if user knows what he's doing, as opposed to leaving it untouched and working in some automatic mode (≠ manually) , it also sounds optional because of the "when the user"

Those are some of the reasons why I couldn't understand the #1 correctly
[Magisk] VR25:
Don't give up just yet.

The project is still alive.

Try the latest version.

Pixel devices have battery level discrepancies that, at the moment, only acc can handle, AFAIK.

In order to sync the battery level reported by the kernel (true) with that shown by Android (deviant), acc freezes Android's battery services and feeds it the correct values from the kernel.

However, this is not done in real-time due to performance and power consumption concerns.

It happens every few seconds.

Previous versions had several issues - some of which would cause the daemon to get stuck or stop abruptly - leading to static battery level on status bar.
[Magisk] fenstre:
If battery idle mode is not supported, can using ACC overnight actually worsen battery life?

I've read many articles about li-ion battery life, but I haven't seen it confirmed that turning charging on and off to maintain battery level constant is the same as cycling the battery. It should be the same, since the same watt hours are consumed and charged. For example, I assume cycling between 59-60% forty times is no better than cycling between 40-60% twice. If this is correct, it seems like using ACC will cause a battery to cycle more (unless battery idle mode is supported), and the trade-off is between fewer cycles (due to being plugged in and charged to 100%), or lower typical charge (if ACC is preventing 100% charge). Is that right? Whereas if battery idle mode is supported, ACC should always be an improvement since it does not cause extra charge discharge cycles.

If my concern is correct, ACC might still be a win. I should consider how much additional charge and discharge would happen overnight (bad ACC effect) versus how much time the phone would spend at 100% charge (bad non-ACC effect). I could also use ACC turn on charge pausing for temperature limiting without engaging the maximum charge amount.

Sorry if this has already been answered. I couldn't find the relevant info.
[Magisk] Keule-Tm:
I'm not enough into this to answer your questions, but there's at least one more point to consider: charging with full wattage near 100% is worse (battery-wise) then charging e.g. near 50%. So cycling near 100% should be avoided if possible.
[Magisk] swieder711:
I installed 2020.10.1 thru Magisk. I than installed ACCA and set my settings for capacity control and Apply on Plug via ACCA. Than I saw ACCA downgraded the ACC module. I updated the ACC module thru Magisk again and see that my setting were reset to the default. Hopefully things will work properly now.

It would be nice if ACCA did not overwrite the ACC module with the older version and that updating the ACC module did not reset the settings. Neither are big deals, just nice to have.

Thanks,
[Magisk] Keule-Tm:
Did you know that you can select the module you want to run in AccA itself?
[Magisk] swieder711:
Learned something new. Thanks.
[Magisk] Macusercom:
Usually it is adviseable to keep the battery at a certain voltage. For normal usage it is recommended to keep it at around 4.05 V max. For storing purposes (like keeping the phone somewhere for days, weeks) 3.8 V is recommended.

As a matter of fact, cycles do not really matter as voltage and heat are the main degradation factors. A "cycle" of 100 constant 59-60% (dis-)charges is far less problematic as 100 "cycles" of 0-100% or 99-100% :)

Also even the wakelock drain is not very much. For me Sleep as Android and leaving it plugged in consumes like 12 percent over night. That's almost the same as if it is lying around (as I don't turn my device of or put it in airplane mode).
[Magisk] gonzo1963:
Good morning,

What is the function of the setting: "Automatically cycle through switches?"

Regards

Enviado desde mi unknown mediante Tapatalk
[Magisk] gonzo1963:
Good night,

It still does not work for me, it always charges 100%.

I have tested it with AccA 1.0.26.

I go back to acc_v2020.5.4-rc with AccA 1.0.24, that work perfectly, even when I leave the mobile off but on charge.

I attach the folder logs:

/storage/emulated/0/vr25/acc/logs

RegardsView attachment logs.zip

Enviado desde mi unknown mediante Tapatalk
[Magisk] VR25:
First, refer to [MENTION=6016024]Macusercom[/MENTION]'s answer (great one, worth a couple of dollars).

Now, consider the following sentence:

Temperature and pressure* matter the most.

* Often used to illustrate what voltage is about.

Forget about cycles and focus on pressure and temperature instead.

Picture yourself stretching a rubber band.

I'm sure you can draw several conclusions from this alone.

As soon as you start thinking you get the big picture, slowly heat the rubber band while stretching it.

Let this sink in...

AccA v1.0.26 is not supposed to downgrade ACC.

Do you confirm it's in fact that version?

Thanks

It essentially means "let acc daemon pick the best charging switch to use".

Hi,

[v2020.10.1] See if charging stops after running acc -d and resumes with acc -e; accd.

Run acc -le and share /storage/emulated/0/vr25/acc/logs/acc-logs-*.tar.bz2.
[Magisk] swieder711:
Confirmed running 1.0.26
[Magisk] gonzo1963:
Good morning,

Thank you very much for the clarification.

If I know that the chosen charging switch works, do you recommend disabling this option?

It works OK.

Here it is.

I hope it helps you to solve the problem for the future version.

RegardsView attachment acc-logs-kane_sprout.tar.bz2.zip

Enviado desde mi unknown mediante Tapatalk
[Magisk] VR25:
Ok, thanks.

I'll try to reproduce this.

Meanwhile, there's an AccA update: https://GitHub.com/MatteCarra/AccA/releases/latest/ .

No, keep it enabled, unless you face issues (i.e., accd keeps changing/resetting the charging switch).

I'll inspect the logs.

Thanks
[Magisk] gonzo1963:
Good morning, another question.

I have another device rooted with "su" and with "busybox" installed.

Is there any way to install the module?, or do you know any app that does a function similar to AccA/Acc?

I found this on Google Play: https://play.google.com/store/apps/details?id=slajedteam.accapp

some time ago, but I think it is a fake copy of AccA.

Regards

Enviado desde mi unknown mediante Tapatalk
[Magisk] VR25:
Hi,

AccA supports Android 4.1+.

It's not available on the Play Store yet - only F-Droid and GitHub.

ACC supports Android 4.0+.

You can install it from recovery (mount system first).

You'll need init.d support or an app that emulates it - to run /data/adb/vr25/acc/service.sh to initialize acc on boot.

You can also initialize it manually by running that script once after every boot.

AccA eliminates the need for init.d.

Refer to the readme for more details.

Regarding alternatives, there's the Battery Charge Limit app.

However, it's not been updated for a long time - and it lacks most AccA features.
[Magisk] swieder711:
I am still having issues with ACC/ACCA and the battery status % freezing. While on my wireless car charger the phone was showing 72% full. After removing the phone from the charger the battery dropped to 32%. After removing ACC and ACCA the battery went to 43%.

For now I am leaving ACC and ACCA off of my Pixel 3 XL running stock Android 10.
[Magisk] giar:
hi,

error 123.. ok apk installed
[Magisk] Koushik87:
I have issues with new build. Charging stops at 70%, switches won't set to automatic. Settings get reset after every recharge. Previous build from 7.26 works fine though.
[Magisk] Melovespa:
Acc not working on android 11.. is my device problem? Mi max 3 with a11 gsi
[Magisk] lm089:
Occasionally after applying an acc update (I stopped using AccA a while ago) I find that acc starts behaving somewhat strange, or that I receive strange messages when trying to run acc from my terminal emulator. I observed this on all three devices I own and use.

What always helped in situation like these was to

1. Uninstall acc through Magisk

2. Reboot device

3. Re-install through Magisk

4. Reboot again (I know acc tells me I don't have to do this but I feel safer that way?)

I can't promise that helps in your or other situations but I think it doesn't hurt to try
[Magisk] tavocabe:
Is it possible to setup this module to stop charging at 80% and then when a specific time comes, ie. 6am re-start charging to full capacity?
[Magisk] goRt:
I use tasker for that acc -f 100
[Magisk] iPAQ 6515a User:
Could you collaborate on that? Or better, share your task, here?

TIA
[Magisk] goRt:
Run shell command, use root
[Magisk] h-cspu:
You can still run a boot script on LineageOS. /system/etc/init.d/90userinit executes /data/local/userinit.sh if it's present. But, AFAIK, only if selinux is already set to permissive in boot.img (for example as described here).

I use AccA to modify the configuration and to update acc. When I'm done with updating AccA or modifying the configuration I freeze AccA with TitaniumBackup.

To initialize acc I use /data/local/userinit.sh.

For AccA until version 1.0.26 (including acc 2020.7.26) I used

sh /data/data/mattecarra.accapp/files/acc/acc-init.sh

Since AccA 1.0.27 (including acc 2020.10.1) I'm trying to use

sh /data/data/mattecarra.accapp/files/acc/service.sh

But it's not working anymore. I guess, something necessary is not initialized at the time userinit.sh is being called.

If I put "sleep 5" in userinit.sh in front of the call of service.sh, accd is being started, otherwise not.

I'm running LineageOS 14.1 with the official su addon and meefik's busybox.
[Magisk] zioloiso:
I have a strange problem. Sometimes connect phone to charge(20% battery). Looks after 10 minut and See 100% battery [emoji15] Restart phone is 35%. Do you know where is problem?

Wysłane z mojego HD1903 przy użyciu Tapatalka
[Magisk] Macusercom:
Do you use voltage limits? For me the system got confused when I have set a limit for the voltage. It would ramp up the percentages as it seems it thought the battery is full as the voltage didn't increase anymore :confused:
[Magisk] zioloiso:
I use two limit 4.1V and 1,5A.

Wysłane z mojego HD1903 przy użyciu Tapatalka
[Magisk] fenstre:
That should be possible with the AccA app (GUI controller for ACC). However, it requires DJS (Daily Job Scheduler), and that tool doesn't work at all on my ROM. I'm not sure whether it also fails on other Android 11 phones/ROMs. Install the AccA APK (on the "releases" page), then create profiles, then create schedules to activate the profiles. If no schedule is created, it's because DJS doesn't work for you. But it's easy to try it and find out.
[Magisk] Koushik87:
I can confirm that DJ's do work in OOS 10.3.5 along with ACCA app. But there are times it won't work as well or DJ's would say settings missing. It's all random. ACCA interface is clean but some settings doesn't seem to work same like the commands.
[Magisk] CheepPlüm:
For me the Djs says it must be installed,but is is already...

I can press the install button,but it comes everytime the same Question mus install it...

I can't set my djs (I' am on Los 17.1 Root with Magisk)
[Magisk] tavocabe:
Same happens to me, using MIUI 12
[Magisk] Koushik87:
I have same issues but I found a work around. The issue is with ACCA version 1.0.26. It won't allow DJ to install, dont know why. So I removed ACCA completely and installed previous version of ACCA. Set the DJ's in the previous version, it should work. Then updated to latest version again. Make sure you don't touch DJ check box else it will again give same error.
[Magisk] gonzo1963:
Good evening,

It seems that the current combination works, but not 100%: when the smartphone is off, it charges always 100%, which did not happen to me with the previous combination I had: "AccA v1.0.24", with its corresponding Acc included: "v2020.5.4-rc"

I describe the new combination for if it helps:

-Acc: v2020.10.1

-AccA: 1.0.27

-Magisk: 21.0 (21000)

-Magisk manager: 8.0.1 (304)

Regards

Enviado desde mi motorola one vision mediante Tapatalk
[Magisk] gonzo1963:
Good afternoon,

Another bug that I have found: if I connect it to a USB port of a computer, it does not stop charging, it continues up to 100%.

It seems to me that I return to my old AccA v1.0.24 (2020-05-04), with its corresponding Acc included.

Regards

Enviado desde mi unknown mediante Tapatalk
[Magisk] tavocabe:
It worked, thx!
[Magisk] fenstre:
I'm not sure if other people have this problem, but DJS doesn't work at all on my new phone with a pretty new ROM installed. I think it's because the architecture is "system as root" without a second slot, without a /sbin directory. That project is also created/maintained by [MENTION=5228676]VR25[/MENTION], right? I filed a bug on github and I'd be happy to test. I think it needs to change to stop using /sbin and instead use magisk to copy its files to an overlay filesystem over /system. The project might need to be branched to operate this way only on Magisk canary.

To be clear, DJS can install but not initialize on boot. I'm interested in helping with this, but I have no experience with Magisk modules yet. I've learned everything I know from trying to understand this problem.
[Magisk] fever7nova:
I have one question. I set: stop charging at 80% and restart charging at 55. When I charge and use navigation or something else my phone stop charging at 80 but this stay all the time till I unplug the cable then phone start discharging. Battery indicator show that phone is charging but LED indicator show that's not happening. For me is good but this is safe for battery? Temp stay at 34.

HTC U Ultra, LineageOs 17.1, newest magisk, acc and acca. Thanks in advice.

PS: sorry for my bad English :D
[Magisk] mpadhu:
One of the finest apps on earth. Just installed today and was trying different things and got a new version update before a couple of hours.

Faced the 70% Samsung problem so swithced to batt_slate_mode and it worked!.

The readme section created by the devloper is awesome. Appreciate the developer.
[Magisk] VR25:
My bad... this issue was not solved by the previous version.

There's a new version.

Other Pixel users tested it and reported success.

I added relevant information to the readme.

This is a Samsung-specific issue.

To avoid it, you have to set the batt_slate_mode charging control file (acc -ss).
[Magisk] VR25:
Try running /system/bin/sh /data/adb/vr25/acc/service.sh instead (latest acc).

Yes, a custom voltage limit causes state of charge (SoC) deviation on some devices.

This is a design flaw by OEMs.

I added relevant information to the readme's troubleshooting section.

DJS needs an update.

I've been working on it.
[Magisk] VR25:
That's "battery idle mode" and it's fine*.

The phone draws power directly from the external power supply - meaning, the battery is not charged constantly. In fact, if you wait long enough, the level will drop and keep dropping slowly. The same (self-discharge) happens if you leave the battery outside the phone.

* It's only a problem if you leave the battery highly/fully charged for extended periods of time.

Note that lithium ion/polymer batteries last longer when stored 40-60% charged.

For more details, refer to https://batteryuniversity.com/index.php/learn/article/how_to_prolong_lithium_based_batteries .

Thanks!
[Magisk] VR25:
**v2020.10.8 (202010080)**

- Changelog is sorted in reverse order (older first).

- Enhanced dynamic switch delay.

- Fixed capacity_freeze2 and capacity_sync.

- General optimizations

- Move persistent data to /sdcard/Documents/vr25/acc/ for compatibility with Android 11 storage isolation.

- Updated documentation (FAQ, tips, voltage issues, Samsung's "70% problem", etc.).

- Use `cmd` in place of most `dumpsys` calls.

https://github.com/VR-25/acc/releases/tag/v2020.10.8
[Magisk] h-cspu:
What is that supposed to help?

/data/adb/vr25/acc is only a symlink to /data/data/mattecarra.accapp/files/acc
[Magisk] Vantskruv:
ACCA is nice app, but it feels a little buggy sometimes, especially after ACC or ACCA updates, maybe I am doing some wrong.

Everything works great with charging-switch set to charger/charge_disable (Pixel 4XL in Android 11) and 'Automatically cycle through switches' is disabled in the profile in ACCA.

Though, sometimes, in ACCA, the active profile is changing my charging switch to automatic, and enables the 'Automatically cycle through switches' option.

Also, DJS does not work (refuses to be installed).

I have been thinking on ditching ACCA for a while. Is there any easy commands in terminal where you change profiles on the spot? Also I read something about 'tasker', instead of using DJS, is it easy to manage?

I currently normally use two profiles:

42%: Chargingspan between 39% and 42%, max 500mA and 3.92V.

62%: Chargingspan between 59% and 62%, max 500mA. (I noticed that ACC crashed when limiting to 3.92V, I guess it freaks out when it needs to get above 3.92V to reach 62%, so I guess I need to increase the voltage, but have not done it yet).

Also occasionally when needed, I charge up to 80% or 100%, but I have not set any profiles for that yet.

So, anyone have a good tip/examples how to manually set profiles quickly via the terminal, and maybe also using 'tasker' to set a schedule?
[Magisk] VR25:
Aw, snap!

I forgot that point.

You mentioned "sleep 5" helps.

Is your data encrypted?

It seems /data/data/mattecarra.accapp/files/acc/service.sh is not readily accessible by the time your userinit.sh runs.

while [ ! -f /data/data/mattecarra.accapp/files/acc/service.sh ]
do
sleep 5
done

Using this in place of "sleep 5" may be a more robust solution.

Btw, why don't you just let AccA do the initialization job?
[Magisk] VR25:
[42]

acc -s rc=39 pc=42 mcc=500 mcv=3920

[62]

acc --set resume_capacity=59 pause_capacity=62 max_charging_current=500 max_charging_voltage=3920

[Occasionally charge up to 80 or 100%, without current/voltage restrictions]

acc -f 80

acc -f 100 or just acc -f

Until I finish working on the DJS update, you can set up Tasker to run those commands at specific times to switch profiles.

Notes

- [Tasker] Prepend su -c to the commands or mark the "run as root checkbook".

- acc -f does not modify the regular config - meaning, you don't have anything to undo. After the specified battery level is reached, accd restarts with your regular/previous config/profile. You can force that at any time (cancel acc -f) by just running accd (restarts the daemon).
[Magisk] Vantskruv:
Thanks, that is awesome (as I had some problems with chaining the commands in ACC, I will try your commands instead)!
[Magisk] fever7nova:
Thanks for reply!

So is this problem when i drive a car with open navigation and LTE and the phone is in "battery idle mode" about 6 hours? I have calibrated macrodroid with two macros. First: when i start a car (charger on) my phone become unlocked, GPS on, LTE on, Waze and Yanosik on. When I stop the venicle (charger off): GPS off, LTE off, Waze and Yanosik off and phone become locked. That is the reason why i want my phone being pluged to the charger all the time. Maybe you know solution for my problem? BTW. This app is awesome :)
[Magisk] VR25:
Simply put, if you want your phone to remain plugged for extended periods of time (e.g., several hours), don't charge the battery past 60%.

Pick a number within 40-60%.

That's where great longevity lives.
[Magisk] Koushik87:
Thanks dev. But i have oneplus 6T. Never faced the issue with previous builds. Will test again based on suggestions and let know.
[Magisk] h-cspu:
My device is not encrypted.

I did a test. I wrote the result of the existence of /data/data/mattecarra.accapp/files/acc/service.sh during the run of userinit.sh in a log file. The file exists.

I used "sleep 5" only for a test. I wanted to know if accd will be started, if your script runs later in the boot process.

I think, a counter should be used to leave/stop the infinite while loop if the file will never exist.

Do you have any idea, why the call from init.d works with older acc versions but not with the latest ones?

Currently I use tasker to start acc.

I don't use AccA, because it always displays 0mA for "Current Now" and -1° for "Temperature".
[Magisk] VR25:
I have an idea of what could be behind this issue.

An update will be up soon.

Share a fresh log archive generated by acc -le.
[Magisk] rgavioli:
Hi guys,

Your app is fantastic and it should have been part of any device by default.

Many thanks!
[Magisk] nxb:
I installed ACCA. Had 2 issues.

1. It blocks using ADB. On my v20 the debugging setting is always turned off.

2. AccA needs to start at boot or the settings don't get applied, I guess this is good and bad. Putting it all in the on-boot line seems too much to type out.
[Magisk] h-cspu:
Thanks for your reply. I sent you a private message regarding log archive.
[Magisk] VR25:
That's weird.

Are you using the latest version from https://GitHub.com/MatteCarra/AccA/releases/latest/ ?

Issue 1: that's the first report of its kind.

I'll keep an eye on it.

Issue 2: do you use EdXposed?

AccA does not have to start on boot if you use Magisk - i.e., Magisk takes care of initializing ACC.

EdXposed was found to prevent other modules' service.sh scripts from running.

apply_on_boot has nothing to do with regular settings.

It's similar to kernel tweaking apps in what it does - i.e., it's used for applying miscellaneous kernel settings.
[Magisk] nxb:
No edExposed here, I'm on nougat. I installed the magisk version then got the gui so I didn't have type all the commands out. Disabled the boot receiver on the apk thinking the scripts would start and apply what I set in the gui.

For ADB it was consistent, tried every which way to enable debugging until I stopped the ACC service.