yashsingh1/xdaforums huggingface dataset:
[Magisk] lm089:
...and it did, great!

or, sorry no, it didn't. Here's what I did on top:

made sure there are no more Magisk modules installed

uninstalled Magisk from recovery

installed LineageOS SU tool from recovery

rebooted into system

made sure that I can run apps as root (e.g. terminal)

from terminal tested whether acc is available >> negative ("acc not found")

re-ran the entire process (including the initial push of 'module.prop' into /data/acc)

after remounting /system as 'ro' issued the final terminal command "./acc"

Result:

1|pollux_windy:/system/etc/init.d # ./acc
pollux_windy:/system/etc/init.d # mkdir: '/sbin/.acc': Read-only file system
/data/acc/service.sh[28]: :-18200}: unexpected ':'
cp: /sbin/.acc/acc: No such file or directory
ln: cannot create symbolic link from '/sbin/.acc/acc/acc.sh' to '/sbin/acc': Read-only file system
ln: cannot create symbolic link from '/sbin/.acc/acc/accd-init.sh' to '/sbin/accd': Read-only file system
mkdir: '/sbin/.acc': Read-only file system
/data/acc/psl.sh[44]: can't create /sbin/.acc/acc-power_supply-pollux_windy.log: No such file or directory
/data/acc/service.sh[28]: /sbin/accd: not found

So apparently LineageOS SU tool is not sufficient (I assume that because of multiple "Read-only file system" output)

I had hoped I could remove Magisk from my ageing Xperia tablet and still be able to use your module :(

So I'll go back to using Magisk meanwhile

Greetings
[Magisk] Camerado:
RebootOnPause still not working.
[Magisk] VR25:
I see.

/sbin is not writable when Magisk is uninstalled. This can be fixed with mount -o remount,rw /sbin.

A note on init.d: LineageOS killed it. I'm afraid you have to use an app to run /data/acc/service.sh on boot to initialize acc.

Verdict

The current procedure won't work for you.

I'll update it - but if you have time, would you mind working with me on this? Essentially, you would be testing a dedicated installer for non-Magisk root solutions.

Yes, I didn't update it. Try the recently introduced rebootOnUnplug, which should be more reliable.
[Magisk] Camerado:
This is not suitable if the smartphone is charged at night. As I wrote earlier, after reaching pauseCapacity increased charge consumption begins, the reboot saves from this. I can restart in the morning manually, but by this time the system will already spend the charge.
[Magisk] chorweiler:
Hello there,

Inam extensive user of Android Auto on a one plus 6t and I was wondering if I have to customise the settings of the app in order to get the most benefit out of it? Will cycling the default threshold over long drives negatively affect my battery health?
[Magisk] lm089:
Thanks for your hint; reading through the remainder of your answer I assume this woudn't help much without additional steps

I see, wasn't aware of that; there are 2 additional files in my init.d, both coming from Lineage itself ('00banner' and '90userinit'); strange

No real harm done; main reason why I'm looking into getting rid of Magisk on my Xperia(s) is a current conflict between newer versions of Magisk and that special method needed to use twrp on Xperia devices. As long as I can still use Magisk V18.1 this is not a big issue

Sure, no problem. I'm currently having a spare Xperia Z1c which I can use for that. Just let me know. It's running an official version of LOS 15.1 (see my signature), rooted through Lineage's SU tool.
[Magisk] infearno:
Hello! Can you provide more info about what user get when install this module out of box? Like what I get when install and forget, as you said. If there was an anwser to that - please add such info into description. Thank you.
[Magisk] lm089:
There used to be a link somewhere in the OP, dealing with facts about batteries etc.; can't find it any longer, though (@VR25, have you removed that or am I just incapable of searching? ;)).

This tool basically gives you more control about what happens to your battery while yuo charge it (hope I'm not writing absolute nonsense here, but that's how I understand this)
[Magisk] infearno:
Thanks for your reply. But you haven't answered to my question. I know that it gives more charge control, whole OP post states that))). But what it gives if I just install it? There should be some default settings, what do they do?
[Magisk] sic0048:
If the device will be plugged in the whole time, then no - you don't need to change anything as the default settings are the best option.

The default settings will cause the device to charge to a max of 80% and then discharge to 70% before charging again. It may seem that this is going to be worse for the battery because of the increased number of "charge cycles" (if that is the correct term). However research has shown that batteries don't have a set number of charge cycles built into them and the short charging cycle actually increases the batteries life expectancy, not "use up" precious charge cycles.
[Magisk] lm089:
About halfway down the OP there is a section called "## DEFAULT CONFIGURATION", just above the "## USAGE" section you cited before
[Magisk] infearno:
Yeah, I've seen it. Not readable enough with unprepared eye.

Okay then. Don't bother.

Thanks again)
[Magisk] htaige:
I had to start the ACC dameon to get the logs to export, but here they are. Please let me know if you need something else.
[Magisk] VR25:
I missed that point. A new release will be up soon.

Btw, do you use Telegram? If so, message me (vr25xda). Working on this with you in real time would be easier and faster.

Not dramatically, but for long drives, it's recommended stay within 30-60% capacity. There are two resume-pause presets for that - endurance (59-60%) and endurance+ (40-41%).

acc --set endurance (or 5960)

acc --set endurance+ (or 4041)

For battery information/tips, check https://cadex.com.

Great

The legacy installer is ready.

I'll test it a bit more, then release a new version.
[Magisk] VR25:
A new release is around the corner.

Thanks
[Magisk] VR25:
**2019.6.11 (201906110)**

- Enhanced power supply logger (psl.sh) and `rebootOnPause`

- Fixed accd not auto-starting and `coolDownRatio` issues

- General fixes

- `install-legacy.sh` - for older Magisk versions and other root solutions

- Major optimizations

> Note: compatible with ACCApp 1.0.6-1.0.8

Download: https://github.com/VR-25/acc/releases/download/201906110/acc-201906110.zip

[MENTION=4149551]lm089[/MENTION], find legacy installation instructions at https://github.com/VR-25/acc/tree/201906110#older-magisk-versions-and-other-root-solutions.
[Magisk] lm089:
I'll try to install that tonight, maybe tomorrow.

Question though: on github you write:

Install: extract acc-*.zip/install-legacy.sh, run su, then execute sh /path/to/install-legacy.sh /absolute/path/to/acc-*.zip.

Just to be sure: I assume target path would be '/data/acc' as described previously?
[Magisk] VR25:
No, acc will always be installed to /data/adb/acc/. The target path refers to the acc zip to install.

Example

Lets say I extracted acc-201906110.zip/install-legacy.sh to /sdcard and the acc zip is in /sdcard/Download/. To install it, I would run...

$ su

# sh /sdcard/install-legacy.sh /sdcard/Download/acc-201906110.zip
[Magisk] lm089:
got it (I hope :D)

===== update =====

Tried exactly as recommended (install-legacy.sh and .zip at the locations "recommended" by you). Didn't work, though.

Result:

mount: 'sbin' not in /proc/mounts
mv: bad 'module.prop': Not a directory
mv: bad 'acc/service.sh': No such file or directory

(I) Use init.d or an app to run /data/adb/acc/acc-init.sh on boot to initialize acc.

sed: acc/acc.sh: No such file or directory
sed: acc/accd.sh: No such file or directory
chmod: acc/*.sh: No such file or directory
/sdcard/install-legacy.sh[34]: /data/adb/acc/acc-init.sh: not found

===== Update 2 =====

Had a look at /data/adb/ to see whether some files where installed. What I find is module.prop from this version directly in this folder, no acc sub folder though. Maybe this helps
[Magisk] VR25:
Perhaps I should revert to /dev. ?

- What's the output of grep tmpfs /proc/mounts?

- What do you have in /sbin (su -c ls -A /sbin) when Magisk is not installed?
[Magisk] lm089:
Hi, am a bit in a hurry therefore just a screenshot of my terminal session hoping it's sufficient

(screenshot is not really readable...)

amami:/ # grep tmpfs /proc/mounts
tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,mode=755 0 0
tmpfs /mnt tmpfs rw,seclabel,relatime,mode=755,gid=1000 0 0
tmpfs /tmp tmpfs rw,seclabel,nosuid,relatime,mode=755 0 0
tmpfs /idd tmpfs rw,seclabel,nosuid,nodev,noexec,noatime,size=8192k 0 0
tmpfs /storage tmpfs rw,seclabel,relatime,mode=755,gid=1000 0 0

amami:/ # ls -A /sbin
charger tad_static ueventd wait4tad_static watchdogd

BTW: we can revert to PMs or any other platform for this discussion if you wish...
[Magisk] VR25:
The screenshot has it all, thanks.

Telegram (vr25xda) would be great!
[Magisk] nogaff:
Love that ACC can now be updated without requiring a reboot, but there's a slight problem with the console output in Magisk Manager! :laugh: ;)

(The info line telling you to ignore the reboot button is partially obscured by the reboot button).
[Magisk] lm089:
Just update acc to the latest version (201906110) on my two active devices:

On my OnePlus6 running Magisk V 19.3 the update went fine, acc daemon started automatically. running "su -c acc -D" tells me that "accd is running"

On my tablet (Xperia TabletZ, running Magisk V 18.1) the update failed, however: the same terminal command as above returns "acc not found". I even rebooted the device, but no change. I then uninstalled acc through Magisk >> rebooted to system >> re-installed acc V 201906080. Then again issued the above command: accd is now running again.

Probably the same issue as with the test device, maybe because of an old Magisk version?
[Magisk] VR25:
I'll put the second sentence below the first.

Thanks

Hmm, if the June 8 version installed and ran, 11 should work as well. ?

Have you tried installing the latest version a second time? Did you check whether acc files were present in /sbin/.acc/acc/?
[Magisk] shouk_1987:
I have a bug where when I turn off daemon completely

Charging gets its max capacity till 87 % exactly instead of 100%

If I uninstall the module completely it charges to 100%

What kind of logs exactly to provide so the issue can be fixed

Thx in advance
[Magisk] lm089:
Strange (I had assumed that this could be due to my old Magisk version, sinceyour 201906110 build states that it also is aiming at old Magisk versions)...

No and no. But I can try again tonight (tablet is happily sleeping at home)
[Magisk] SbAgOoTs:
Killed?

I've just installed acc through Magisk. Rebooted several times. No change in config.

I'm sorry if it has been already asked before, but I didn't find any trace about it: basically acc is not working and every time I try to launch

whatever

command (e.g.: acc -D start) the terminal answers Killed...

Any idea about where is the problem?

Thanks
[Magisk] VR25:
Are you limiting the charging voltage?

Did you stop the daemon while the device was unplugged?

Logs can be exported to /sdcard/acc-logs-*.tar.bz2 with "acc --log --export".
[Magisk] VR25:
Which Magisk version are you using?

Can you run "acc --info", "acc --enable" and "acc --disable"? Do these work as expected?
[Magisk] SbAgOoTs:
Magisk 19.3.

And unfortunately no: as I said,

every

acc command gives the same Killed answer...

(By the way: some other modules requiring terminal commands work fine).
[Magisk] shouk_1987:
Yes I am limiting it to 4195 mV

But shouldnot everything be stock when the daemon is not running ?

And yes I stopped daemon when I was unplugged

When exactly to run the log command so you can know the source of the issue ?
[Magisk] VR25:
Yes, everything should have been restored to stock.

Similar to locat, these logs should be exported right or shortly after the occurrence of a problem.

Don't worry about grabbing logs, thought. Since you confirmed you're limiting voltage, I can reproduce the issue.

Thanks
[Magisk] VR25:
**2019.6.14-r1 (201906141)**

- Added `battery/batt_tune_float_voltage` (Samsung) to the list of supported voltage control files

- Enhanced log exporter (`acc -l --export`)

- Fixed: default voltage limit not restored when accd is stopped

- `From-source` installer for any root solution (install-current.sh)

- General fixes

- Major optimizations

- Redesigned `rebootOnPause`

- Update charging switches database

- Updated documentation (`assorted tips` section and more)

- Updated Portuguese translation

> Note: compatible with ACCApp 1.0.6-1.0.8
[Magisk] shayanb2004:
New voltage control file for samsung doesnt work :rolleyes:

Edit: I tested with two different kernels, device: samsung galaxy s8
[Magisk] VR25:
Unfortunately, not all devices/kernels support custom charging voltage limit. Those that do are rare. Most OEMs don't care about that.

The existence of a potential voltage control file doesn't necessarily mean it works.

My system has 3; none works.
[Magisk] shayanb2004:
Then i guess I have to continue using my old cable in order to natively limit current and voltage :laugh: :fingers-crossed:
[Magisk] VR25:
**2019.6.15 (201906150)**

- Prioritize charging switches that put the battery on idle when charging is paused - allowing the device to draw power directly from the external power supply

- Updated documentation

Kernel developers, please message me. I have thoughts on enabling charging voltage control.

:D
[Magisk] shouk_1987:
I can report that the bug where charging limited to 87% when using limiting voltage and when daemon is stopped has gone

Thanks [MENTION=5228676]VR25[/MENTION] keep.up the good work
[Magisk] SbAgOoTs:
Unfortunately I can't say the same about my Killed problem: the latest release didn't solve it...

Maybe an important info I forgot to give before: the 08.06.19 version had other serious problems but at least acc was running.

I have a Samsung J4+ (real crap, I know... ;)).
[Magisk] Da-BOSS:
I'm a kernel developer for Note9 Oreo :) kindly check your PM boss :fingers-crossed::)
[Magisk] VR25:
Interesting and intriguing... ?

The strangest thing is that any acc command is killed - as if something was set up to watch for and kill acc.

This is still under investigation.

Questions

1. Have you tried the last working version again?

2. Did it still work?

3. What other kind of problems did you face?

4. Which modules did you have installed alongside the latest acc?

5. Does acc run under permissive SELinux?
[Magisk] shayanb2004:
is there a way to enable "battery idle" when battery reaches the pause threshold? or it just happens automatically? because I use batt_slate_mode and "battery idle" didn't happen
[Magisk] VR25:
It happens automatically, but there are two requirements:

- The kenel must support it.

- config.txt: chargingSwitch must be unset (meaning, "automatic") for acc to determine which of the available switches has the "battery idle" feature. However, if you already know the switch that can do that, you can set it (acc -s s) and the idle mode will always take precedence.

FAQ

How does one know "battery idle" works?

A: While plugged in and charging is paused, acc -i shows the battery status "not charging", instead of "discharging". In some cases, the status may be "discharging", but battery capacity will hold up for a very long time.
[Magisk] shayanb2004:
Damn!

my kernels Support Nothing at all :D

this doesn't work either :(
[Magisk] 64ashg:
i am having the issue of my phone not charging on the latest release until a reboot.

i charge till 60 and then around 38, I'd like to put charge my phone. now my profile is set for 60-20 cycles with 15% shutdown. it does not happen if i stop charging and the start charging right away, but after some hours, the 60-38 interval, it just shows discharging in the app with -2xxmah charging speed. even restarting or stopping the service doesn't fall back to default behavior, which was possible till 14th june r1 release. but the status bar shows the charging sign, strange.

i am running a los16 based rom on a oneplus 3t.

edit: i will upload logs using acc -l --export when it occurs next
[Magisk] 64ashg:
here are the logs

edit, the last correctly working version for me was 10th june build. the 14th june r1 had the same problem for me.
[Magisk] VR25:
Hi,

You have conflicting settings:

capacity=20,60,59-60
temperature=40-40_90
coolDownRatio=50/10

A better approach would be:

capacity=20,60,59-60
temperature=40-45_90
coolDownRatio=
[Magisk] 64ashg:
Hi, i tried your suggestion. The issue still persisted
[Magisk] VR25:
Note that if your device's temperature reaches 40+°C while charging, temperature=39-40_90 is not the best setting. accd will turn charging off at 40+°C for 90 seconds to cool the device down, and repeat as needed. The 39 is ignored since coolDownRatio is null.

You may want to restore the default settings (acc -s r) and only change the pause and resume capacities (e.g., acc 60 59).

Does the battery charge normally when accd is not running?
[Magisk] 64ashg:
No, not until i reboot or reflash 10th june build. And also, my battery temps are around 32 when i posted this log, the same config and the previous config is working fine on the 10th june release.

I will try your suggestion and report back.
[Magisk] peppe1996:
Last version not works on me... Specifically, up threshold is not respected to 90 as i set. I'm posting my config file and logs. Thanks.

EDIT: I noticed that graph battery is good. It is reset by 90, but charging continue until 100. So now i see line starting from 90, increasing to 100 and now is going down with discharging.
[Magisk] SbAgOoTs:
So:

Yes, right now.

Yes, or at least it's not killed...

To be honest probably nothing: I'm so stupid, I thought charging stopping at around 78% was a problem, but now I better understand how acc works and I see in default config.txt the max is 80%...

CloudfareDNS4Magisk IPv6, Debloater, ExSDCard Access Enabler, Systemless Hosts and LKT. (If you think it could be LKT killing acc, I already tried to uninstall it, but the result was the same... ;)).

Unfortunately I can't set SElinux permissive (I suppose because of Samsung KNOX...).

It's likely I can at least use this version, but if you find the problem I will be able to update...
[Magisk] SbAgOoTs:
And just to stop me from making further stupid questions: can somebody explain me what the 60 parameter means in the

capacity=0,60,70-80

line, if the cooldown is managed by the

temperature=40-45_90

one?

Thanks in advance.
[Magisk] 64ashg:
I would like to report back with the same problem. I have tried your suggestion with just keeping one parameter.

It doesn't charge until rebooted. Restarting or stopping the service doesn't change the behaviour.

Thank you for looking into it and please look into these logs too :)
[Magisk] zozoz13:
Hi, I just tried the latest version for the night charge. I set it it to pause at 90% and resume at 85%. But, after I saw the phone in the morning, the phone charged 'till 100%.

Can you look into my logs, please? What can be wrong
[Magisk] VR25:
Both temp=x (first value only) and that 60% work with coolDownRatio to keep battery voltage and temperature in check. In other words, coolDownRatio kicks in not only when temperature reaches 40°C (default), but also when capacity >= 60% (to lower the voltage). If coolDownRatio is null (default), both of those values are ignored, meaning coolDown is turned off. Read /sdcard/acc/config.txt or the documentation's "default config" section for more details.

The acc issue you're facing is still under investigation.

A new version was released yesterday, June 17, GMT+1.

Let me know how it holds up.

https://GitHub.com/VR-25/acc/releases/
[Magisk] VR25:
Everyone With Wakelock Issues

I'm writing a list of wakelocks for accd to block.

So far, I put together the following:

- SEC_BATTERY_VBUS

- f9200000.ssusb

- chg_wake_lock

- qcom_step_chg

- c440000.qcom,spmi:qcom,pmi8998@2:qcom,qpnp-smb2

- qpnp smbcharger17 (incomplete name)

Let me know of any other wakelocks (full names) related to charging.

This list will be in config.txt and users will be able to add to it whatever wakelocks they want blocked.
[Magisk] 64ashg:
Yes, happy to report that its fixed. Thanks a ton :)
[Magisk] 64ashg:
I would like to report that the service stopped when i kep it overnight with the 59-60 profile. I unplugged my phone to find it 100% charged. I'll see what happens the next night, with me making sure that the service is running before i goto sleep

Anyways, here are the logs.

https://drive.google.com/file/d/17gPquN2TNWzH7PbZaA1YojgUigzmHiSh/view?usp=drivesdk

Xda app is acting up with a weird network error
[Magisk] *justintime*:
I have the same issue unfortunately no log. All battery enhancements for the app are turned off.
[Magisk] 64ashg:
And it has happened again today morning. [MENTION=5228676]VR25[/MENTION] please help.

Ps, the service stopped when kept for an overnight charge
[Magisk] SbAgOoTs:
No luck with new version either: acc still killed, last working version still 08.06.19. :crying:
[Magisk] *justintime*:
For me it's working now... Great!

Maybe also a nice feature to have.... When turning on the phone and screen is on stop charging. And as addition after set an amount of time
[Magisk] phongtoanquan:
Can someone help me config fast charge at 7AM to 22PM, slow charge at 22PM to 7AM. Thanks you
[Magisk] Estebanium:
With 2019.06.20 Acc stopped working for me. The phone is charging to 100% even the default settings of Acc tell another thing. I downloaded 2019.6.11 and now Acc is working again. I guess that Acc stopped working somewhere between version 2019.6.11 and the latest version.. I have a Samsung Galaxy S7 Edge and always used the batt_slate_mode.
[Magisk] VR25:
Try the latest version: https://github.com/VR-25/acc/releases/download/201906120/acc-201906120.zip

I'm still trying to reproduce that issue.

Interesting

I'll think about that.

Keep in mind that this feature only makes sense on devices that supports "battery idle" mode (i.e., acc -i shows battery status "not charging" as opposed to "discharging").

1. Install "Daily Job Scheduler (djs)" module from Magisk Manager.

2. Run the following commands to set things up (only needed once):

$ su

# djs daily 22 00 'acc 60 59 && acc --set applyOnPlug usb/current_max:500000 && sleep $((60*60*8)) && acc 80 70 && acc --set applyOnPlug'

Explanation/notes

- "acc 60 59" keeps battery capacity within that range. Batteries prefer staying 40-60% full; 40-ish seems to be optimal."

- "acc 80 70" restores the default setting.

- The scheduler (djs) assumes your device is rebooted at least once, everyday, anytime within 7:07 and 22:00. Before you think "djs daily 21 55 reboot" can do the job for you, stop - it can't. The next version won't have this limitation.

- It's better and way more efficient to limit charging voltage at night. You would set things up with djs daily 22 00 'acc -v 3920 && sleep $((60*60*8)) && acc -v -. However you have to test first whether your device suports custom charging voltage. Run "acc -v millivolts" to test, and "acc -v -" to restore the default value.

Could you confirm that the previous version works?

https://github.com/VR-25/acc/releases/download/201906170/acc-201906170.zip
[Magisk] Estebanium:
I will give it a try and report later. Thx.

Edit: It seems to work. Charging stopped at 80%. I am looking forward if it begins charging at <70% again..
[Magisk] Boulder08:
I'm having an issue with the latest version where charging first goes to 80%, then stops like it should and after I use the phone so the charge goes below 70% and plug it into the charger, charging stops at 70%. I've used the default settings and I'm running LineageOS 16 on my Samsung S7.

Any tips regarding what to try next to make it work?
[Magisk] 64ashg:
I will try it tonight and report back.

Thanks a ton for the releases :)
[Magisk] VR25:
Does the issue persist after running "acc -s wakeUnlock"?