yashsingh1/xdaforums huggingface dataset:
[Magisk] stillnoexpert:
[usb/current_max ]

limiting to 500 mA is not really exiting. And it's always nearly 500mA.

The number behind usb/current_max doesn't matter. Even lower values than 500mA results in nearly 500mA.

What does that mean?

We should not confuse shield and ground. None of my cables has a shield. (Therefore none of my cables has a grounded shield.) I have the same result with all of my cables. For me it's that charger.
[Magisk] Demodroid:
The OnePlus 2 is known for interference with badly designed chargers and/or cables, try another well known brand.
[Magisk] iPAQ 6515a User:
It is 1.0.7 not 1.0.8. Otherwise perfect ;)
[Magisk] danielfilosofia:
Hi! I really liked the idea of ​​profiles! One suggestion: It would be great if you could program profiles according to the time. Thus it would be possible, for example, at night to charge the battery at a slower speed than during the day. Congrats on the job!
[Magisk] Svetlio Andonov:
Hi all,

I am using Tasker for Day/Night/Morning/Full/Charge-Restart profiles by shell cp day.txt to config.txt (etc...) at a given hour and this is working for me.

Using the "acc" version prior Magisk 19.x I was able after the copy task to invoke /sbin/acc -D restart and force the charging according to the config settings, but not anymore with current versions. How can I achieve this? It is helpful when using Tasker and notifications from alarm app/snooze to force recharging and topping up to max battery percents for the given config.
[Magisk] dkoek:
After turning GPS mode on, acc switch doesn't charge anymore. Oy after a fresh restart charging will work again...
[Magisk] shayanb2004:
when Im charging at night and the phone stays connected to the charger, after it reaches the pause threshold, it looses about 9% percent in 3 hrs :|

I think it's doze related and the doze is not activated.. does it have anything to do with acc??? or it is android?
[Magisk] stillnoexpert:
[MENTION=5308232]shayanb2004[/MENTION]

Have a look at your wakelocks after charge. (Apps: GSAM, Wakelock Detector, etc.)

Can you open a Terminal?

What is your charging mode? (That was the case in my cause.)

Try

acc -s

for info

and

aac -s s

for a change.

Another charging mode may work without wakelocks
[Magisk] shayanb2004:
well batt_slate_mode workes for me (galaxy s8)

as long as the charger is connected this happens (even though its not charging)

the moment I disconnect the charger everything gets back to normal
[Magisk] adrianogoes:
ACC daemon not starting at boot

Hi guys.

My ACC daemon is not starting automatically during/after boot.

I have to manually start every time I reboot my phone. Sometimes I forgot and charge goes beyond 80%. :(

What do I have to do to setup automatic start at boot?

Thanks!
[Magisk] lm089:
Just realized that since I installed this version temperature control / max value is constantly showing 90°C. I can adjust it to whatever I like, then save. When I return to temp settings max value is back at 90.

I can change the other 2 values though, and they stick.

Editing acc/config.txt I see the correct values:

temperature=400-450_90

Uninstalling / re-installing the app didn't help.

Anyone else is seeing this?
[Magisk] lovekobeme:
If my battery has 4000 mah, but I can only charge it up to 80%, that means my battery only has 3600 mah, and I use it for a few hours less. This is a strange question about how long the equipment will last.
[Magisk] Camerado:
[MENTION=5228676]VR25[/MENTION] rebootOnPause not working in last version.
[Magisk] shayanb2004:
[MENTION=5228676]VR25[/MENTION] is SEC_BATTERY_VBUS kernel wakelock related to this module??

BBS is showing that it has been active 40% of the time :(
[Magisk] Estebanium:
First of all thank you for the Mudule and the App. I really like the functionality and what it gives to my battery.

However I noticed that the App will freeze if I enter a value for one charge after pressing Apply. The Apply is freezed until the value is reached e. g. 85 %. I noticed the same behavior, when I enter the value via Terminal. The terminal freezes until the value is reached. Until then you can not enter any new command.
[Magisk] MatteCarra:
Please check that you have installed latest version ( v1.0.8 ).

The bug was present in version 1.0.7 but it has been fixed.

Thanks

Thanks for the report.

I will look into this!
[Magisk] paolocorpo:
Dear [MENTION=5228676]VR25[/MENTION]

is it possible to add the last version of Magsk Module into the list of available to download ?

I know that it can be downloaded by Magisk Manager (already done ;)) but I would like to have a my personal database

I have all your module from teh first :)

Thanks

Paolo
[Magisk] VR25:
Work in progress
[Magisk] VR25:
Instead of the "cp" method, why don't you write acc commands to files and run "sh <file> <wait hours>" to apply settings?

Example:

# Keep battery capacity at ~45% and limit charging current to 500mA for 7 hours. Restore regular charging settings afterwards.

(acc 45 44 && acc --set applyOnPlug usb/current_max:500000 && sleep $((60*60*${1-:7})) && acc 80 70 &) &

exit 0

This is being simplified with the addition of "acc profiles" feature.

Regarding "/sbin/acc -D restart" does it work on terminal?

Send me your Tasker setup for analysis.

Weird...

See if "acc -s s" helps (enforce a switch).

Refer to the previous answer. This is caused by a problematic charging switch, not acc itself.

Does it run as expected when manually started?

Do you see "acc: exec..." in Magisk log?

This will be checked, thanks.

Keep in mind that "temperature=400-450_90" is interpreted as is - meaning the latest acc uses no multiplier. Thus, you want "temperature=40-45_90" instead.

Shorter runtime is a price to pay for extended service life.

Hopefully you're not thinking that charging the battery often enough will reduce/nullify the longevity gain.

Longer battery lifespan is achieved mainly through reducing its exposure to high voltage and temperature. Limiting capacity to 80% is just one of many ways of doing that.

Ok, the logic must grow in complexity, then.

No, refer to my "acc -s s" answer above.
[Magisk] VR25:
First, note that the terminal is not frozen. The command waits for the operation to finish. It runs in the foreground by default.

For terminal, this behavior is intended, but can be avoided by enclosing the commands in "( &) &".

Example: (acc -f 90 &) &

If the operations still seems frozen, simply press [enter].

The XDA archive is no longer updated.

Download all the other zips from https://github.com/VR-25/acc/releases/
[Magisk] Estebanium:
thank you for the explanation. I know that I can escape from this "frozen" state and that the operation is still processed, but I was not sure if this was intended.
[Magisk] danielfilosofia:
Hi. The options for limiting the maximum current and maximum voltage do not work here. I have a S8 with hadesROM. How do I know if these settings are supported or how do I know what the problem is? Thank you!
[Magisk] VR25:
You're welcome.

In forgot to mention that acc -f freezes the app because the command must be executed differently - my fault.

Whether or not these work is dictated by the kernel, not acc.

Testing voltage control:

acc -v :4100

- That's a wizard

Testing current control:

acc -s applyOnPlug usb/current_max:500000 (or similar file)

- If the current decreases to 500mAh or bellow, you know that works. Check with acc -i.
[Magisk] danielfilosofia:
Thanks for the answer. I think both settings do not work here. There is no voltage file and the current does not decrease with the command. Are there any alternatives? Thank you.
[Magisk] Svetlio Andonov:
Regarding "/sbin/acc -D restart" does it work on terminal?

--------------

# SSH for Magisk

:/data/ssh/root # /sbin/acc -D

(i) accd is running

:/data/ssh/root # /sbin/acc -D restart (i) accd restarted

/sbin/acc[626]: accd: not found

127|:/data/ssh/root #

# adb shell

falcon_umts:/ $ su

falcon_umts:/ # /sbin/acc -D

(i) accd is running

falcon_umts:/ # /sbin/acc -D restart

(i) accd restarted

--------------

and still the daemon is not forced to restart charging according to the config.txt
[Magisk] VR25:
Send me /sbin/_acc/acc-power-supply-*.log.
[Magisk] VR25:
That looks like a PATH issue. The secure shell may not have /sbin in the PATH (echo $PATH).

To start or restart the daemon, run /sbin/accd. Forget about "acc -D restart".

As for accd not restarting charging...

1) Could you reproduce the issue again, run acc --log --export (-l -e for short) and upload /sdcard/acc-logs-*.tar.bz2?

2) Do acc -e and -d options enable and disable charging, respectively?

3) Have you tried enforcing a charging switch (acc -s s)?
[Magisk] dkoek:
Still does not solve the problem
[Magisk] thrik:
Hi, I'm on an OG Pixel with rooted stock (updated last month). I am also on the latest Magisk. When I try to install ACC with default settings, and if I turn my phone off and on, my phone hangs during boot.

I know it has to be something with ACC because if I disable it, it boots fine. For what it's worth I know I don't need to reboot to use ACC, but I'd rather not have to disable it every time I boot.

I would like some help but I'm not sure what further information I could give that might help...
[Magisk] danielfilosofia:
Tank you!
[Magisk] Intrudx:
Where's the acc app you told about?

I tried to find the acc apk file but couldn't get it. Please give a direct link to download the app. And lastly provide a direct link for the app in your thread for convenience.

Thanks,

Saif Shaikh, India
[Magisk] Didgeridoohan:
Did you happen to read through the OP? There's a section called "Links" right there... (No direct links, no, but I'm confident you'll find it.)
[Magisk] lysiong:
seem like doesn't work on Mi9 wireless charging, keep on discharge & charging when reach target capacity.
[Magisk] slimshouki:
No charging switches are available in ACCA app although it's configured in config.txt and exist in acc -i command.

Just showing "automatic"
[Magisk] lm089:
Thanks, worked!

btw.: would be great if there was some kind of "about" box inside the app, telling us at least the app's version
[Magisk] merbiyatch:
Does this do the same as battery charge limit
[Magisk] VR25:
Yes, but it goes even beyond -- more features, wider device support, faster debugging and updates.

[MENTION=2431719]michaelcrossland[/MENTION], hopefully the zip you provided has the required data to support your device. Wait for the next version (coming up soon).
[Magisk] dyingbread:
Basically that app similar to this module. To stop charging at certain percentage and start again at certain percentage.
[Magisk] merbiyatch:
ok. Finally working on pn 6p after latest update. Will it disable charging when i remove the charger? What command to use if i plan to sleep while its charged. Whats the difference between cs 80 and cs 80 20?
[Magisk] guest4711:
See the first post:
[Magisk] michaelcrossland:
No it does not. Looked at what control file it's using for my phone it show it's using store_mode Samsung Note. So far it's been working with out it flipping out.

But would like to use this module because once you have set it up right you can just forget about as the other one is an app that has to have something in notification bar. Yes I know how to remove them but the other draw back to the app is your phone has to fully boot out before it starts working where as this module will get loaded as the phone boots up.
[Magisk] merbiyatch:
Idk what that means since i dont have a samsung device but using it on nexus and i do t have an option for control file unless i aint doin anything rivht with it other than enabling limit charging
[Magisk] michaelcrossland:
You have to click on the wrench icon in the upper right part of the main screen. It right next to the I. Once inside of there you can click on the top most thing should show what file it's trying to use then you try a new one if the one it's using is not working right. Just do your home work on the chips in your phone and see if there is phone that close to it. It should work but watch what you fo as you could really f up your phone if you don't know what you are doing.
[Magisk] VR25:
# 2017.11.7 (201711070)

- Additional devices support

- Fixed "cs debug" errors

- Redesigned "get_batt_level" mechanism ("charging not found" bug is gone)

[MENTION=2431719]michaelcrossland[/MENTION], you have an odd device... never seen HTC "SM-G900T" model. That's supposed to be Samsung. Did you mess up your /system/build.prop file?

Anyway, the latest version should work.

1. With the charger disconnected, charging remains disabled till the lower threshold (RESUME%) is reached (if running in auto mode). You can manually re-enable it with "cs -e".

2. Forget about cs 80; it's obsolete -- if you don't specify the RESUME% value, 10 is used. You have to figure out which settings work best for your usage scenario. I stick with "cs 90 10".
[Magisk] guest4711:
Thanks for the update. As requested, my debug.zip...
[Magisk] suraj1:
Automatic function not working.
[Magisk] AlexBurnout77:
I hope you are aware of the following error:

OnePlus3:/ $ su

OnePlus3:/ # cs

sh: cs: not found

127|OnePlus3:/ #

It's no problem really, it's simply a privilege that you've shared your work for free, but I will just say that I'm waiting for the next update. Thanks for the great work.

P. S.: The latest module is installed.via TWRP since Magisk Manager gives an installation error.
[Magisk] merbiyatch:
There use to be something onthe op about tasker and nacrodroid auto config but its gone now. How do i enable auto for mcs?

Edit: nvm. Found it on op.
[Magisk] nike8899:
Thanks for your work :D but still have some bug

My phone is HTC M8 with RR 5.8.5

When my battery only 56% i charging and typed "cs 90", device was stop charging??

That is very weird i type "cs -e" but stop charging and "cs -d" start charging:confused::confused:
[Magisk] KnifeFed:
Any plans on adding support for Nexus 7 2013 (flo)?
[Magisk] iluvatrix:
Is there support for Nextbit Robin on Los 14.1 official?
[Magisk] VR25:
I never said it was working. That's work in progress. For now, stick with MacroDroid or Tasker method.

Are you on Magisk's beta channel? Perhaps topjohnwu has updated the module template for that... :rolleyes:

I'll make the necessary changes to the module. For now, simply copy the attached file to the root of your internal storage and see how things go.

[MENTION=665266]KnifeFed[/MENTION], [MENTION=4808470]iluvatrix[/MENTION], I need your cs_debug zips to do that. ;)
[Magisk] alextytan:
not

hello again VR. the 2017.10.21 commit was working fine on my leeco le 1s. i have installed latest update and it's not functional. thanks
[Magisk] VR25:
Copy the provided file to the root of your internal storage. You should be fine with that. The file won't be needed with the next version.
[Magisk] nike8899:
I tried but same problem:crying:

here is my debug files and screenshot
[Magisk] zputnyq:
Hi,

It's the first time I use AccA app.

I have a question regarding to the app.

Does AccA app require the magisk module to make it works ?

I get installation failed due to network connection when I open it, but my device's network is working fine for all apps on my device

It's the latest AccA 1.0.8

Android mm 6.0.1

Magisk 19.2

Xperia M4 aqua

Edit: My apology, found the answer on AccA github that it requires magisk module
[Magisk] luppolui:
"Work in process" afaik

Settings->Apps->ACCA in Android and you see the version - and I think the last is 1.0.7 not 8
[Magisk] lm089:
yes I know, but thanks.

And latest meanwhile *really* is 1.0.8 (there was a quit update)

---------- Post added at 07:04 PM ---------- Previous post was at 07:04 PM ----------

yes I know, but thanks.

And latest meanwhile *really* is 1.0.8 (there was a quiet update)
[Magisk] amendwins:
Hi, my daemon doesnt start

Im in magisk 19.2 downloaded by it, and by github and still not working

My log from acca:

+ echo /sys/devices/soc.0/qpnp-linear-charger-8/power_supply/battery_qpnp/charging_enabled 1 0

+ awk '{print $1}'

+ '[' -f /sys/devices/soc.0/qpnp-linear-charger-8/power_supply/battery_qpnp/charging_enabled ']'

+ IFS= read -r file

+ false

+ exxit 1 '(!) Unsupported device'

+ typeset 'exitCode=1'

+ set +euxo pipefail

(!) Unsupported device

***EXIT 1***

My Device: Cubot Power
[Magisk] lm089:
If I get you right you're asking whether ACCA ( the app) can work just by itself. In that case the answer is NO. The app is a frontend for the acc module which needs to be installed through magisk.

In other words: you can run the module by itself, then you have to manually edit a config file. Or you install the app which does the config file editing for you through a nice and user friendly frontend
[Magisk] zputnyq:
Yes, you're right.

I thought AccA could work by itself.

Thanks for the explanation :)
[Magisk] aero7even:
Same problem here. The charging process is always starting and stopping and starting etc. in a short time.

Is there any solution for this?
[Magisk] evev:
Hi, i have a problem with the battery temperature sensor. It shows -40 thus not charging. Can i use this module and the app to trick the phone or to stop reading that temperature sensor error?

I have already installed magisk module and then the app. Disabled temperature sensor by using high values (90-95-90), but phone keeps saying "discharging" and showing -40 temp.

Do i need anything else?

Thanks!
[Magisk] dkoek:
Have you installed another battery app? I did and charging with acc didn't work. Uninstall all the other battery apps.

In acc define a new profile with only capacity control settings. Don't define any thermal settings. Reboot.
[Magisk] Dorian57600:
good
[Magisk] evev:
No other battery apps installed.

Clean installation of OxygenOS 9.0.2, no custom kernel, rooted with latest magisk. ACC magisk module installed and the ACC App. Nothing else done.

I set the profile like you told me but nothing happens. Battery still at %50 all the time and Discharging.
[Magisk] stillnoexpert:
At the moment it's only a one time observation:

I have activated advanced doze on charge in the Naptime app. (I have still issues with battery drain after charging, but the wakekocks etc don't show anything obvious. That's why I gave that setting a try)

With battery_charging_enabled set in acc my phone now failed to fall into the external power mode after charging.

Can anybody reproduce that?
[Magisk] Macusercom:
In the latest version 2019.5.13 with Magisk v19.3 "acc -d" doesn't seem to work. It always says "acc is enabled" and charges to the set limit. Also "acc -e" doesn't apply. It also charges to the pause/resume limit instead of the set percentage or to 100 percent.
[Magisk] VR25:
A new build is up!

Stop the daemon (acc --daemon stop) before upgrading. If you forgot to do so, reboot.

**2019.6.8 (201906080)**

- Customizable minimum charging on/off toggling interval (`chargingOnOffDelay`)

- Enhanced modularity to work even without Magisk

- Fixed `applyOnBoot`

- Major optimizations

- Multi-language support (refer to `README.md` for details)

- Partial Portuguese language support (first additional language)

- Updated documentation, charging switches database and building/debugging tools

- Workaround for re-enabling charging (`rebootOnUnplug`)

> Note: compatible with ACCApp 1.0.6-1.0.8

EDIT

Run the following commands to fix coolDownRatio:

$ su

# sed -i 's/e coolDown/e coolDownRatio/' /sbin/.acc/acc/accd.sh && accd

I'll be answering queries soon.
[Magisk] lm089:
A very big Thank You once again!

What does this mean? Running your module without installing Magisk? If so, would I then flash it from recovery?
[Magisk] VR25:
Your device's power supply log contains the following candidates:

/sys/devices/platform/battery/power_supply/battery/batt_tune_fast_charge_current (default: 2100)

/sys/devices/platform/battery/power_supply/battery/batt_tune_input_charge_current (default: 1800)

/sys/devices/platform/battery/power_supply/battery/batt_tune_float_voltage (max: 43500)

You can run acc --set applyOnBoot=file1:value file2:value file3:value to apply settings, then restart the daemon (accd command).

For out of the box support, please report whether or not these files work.
[Magisk] VR25:
The logs are generated by the demon. Therefore, it does start. According to the logs, your device is not supported. In this case, the daemon stops automatically - since there's no reason for it to keep running.

"Unsupported device" means no suitable charging control file was found for your device. Read the "power supply log" section of zipFile/README.md for assistance.

ACC's temperature settings are not meant for modifying/overriding the battery management system's output (-40°C). That value can only be modified by the BMS itself - and it's updated in realtime. The reading comes from the battery's thermistor. Either that piece of hardware is broken or one of the battery's terminals is dirty/oxidized.

Temperature settings control charging based on temperature readings. You can't override these readings, unless the kernel is patched for that.

What you may be able to do is modify the cold/cool temperature threshold using the "applyOnBoot" feature.

Search for "cold" and "cool" in /sbin/.acc/acc-power_supply-*.log. or upload the file for me to look for potential targets myself.
[Magisk] VR25:
Unfortunately, not much can be done about this. It's a kernel level (driver) issue.

You should keep looking for and testing additional charging control files in the hope that at least one will provide the desired end result.

What device is that? Did you upload its power support log yet?

Sorry, I forgot to point out that the daemon must be stopped (acc --daemon stop) prior to running these commands. Otherwise, charging control is taken over by it.

You're welcome!

That means ACC no longer depends on Magisk.

- As long as you have root, you can install and use it.

- Recovery is unnecessary. You can use terminal or even a file manager to install.

All you have to do is copy "zipFile/acc/" to say, /data/, set 755 permissions (*.sh files only), and run "acc/service.sh" (preferably on boot) to initialize ACC. Refer to README.md for extensive details.
[Magisk] lm089:
Hm, can't get daemon to start. Here's what I did:

- uninstalled module through Magisk, then rebooted to system

- opened terminal and entered all commands quoted in readme.md:

(remark: zipfile was located at /sdcard/, and renamed removing the brackets as in 'Advanced_Charging_Controller_acc-2019.6.8.zip')

$ su
# cd /data
# unzip -o <zipFile> 'acc/*' -d .
# chmod -R 0755 acc
# mount -o remount,rw /system
# cd /system/etc/init.d
# echo "#!/system/bin/sh" > acc
# echo /data/acc/service.sh >> acc
# chmod 755 acc
# mount -o remount,ro /system
# ./acc

Result:

calling "acc daemon status" (terminal still in 'su' mode) results in "(i) modPath not found". And (of course) ACCA also tells me that the daemon is NOT running.

I'm not really an expert when it comes to Linux so I'm a bit lost interpreting this. Any hints?

And: before I re-install through Magisk, should I somehow revert what I just did?
[Magisk] VR25:
My bad - zipFile/module.prop must also be copied to /data/acc/.

Do that and it should work.

I'll write dedicated installers and uninstallers for older Magisk versions and non-Magisk root solutions.

Yes, by removing /data/acc/ and /system/etc/init.d/acc.

Note: you may need to run su -c mount -o remount,rw /system before removing the latter, and ...ro... afterwards.
[Magisk] htaige:
I'm running into an issue where my huawei mate 10 running emui 9 cannot start the acc daemon on boot automatically. I always have to toggle the daemon on using the ACCA app after rebooting.

Is there a workaround for this? Please let me know which files are needed
[Magisk] VR25:
Please, upload /sdcard/acc-logs-*.tar.bz2, after running acc --log --export.