vr-25 / acc Goto Github PK
View Code? Open in Web Editor NEWAdvanced Charging Controller
Home Page: https://github.com/Magisk-Modules-Repo/acc
License: GNU General Public License v3.0
Advanced Charging Controller
Home Page: https://github.com/Magisk-Modules-Repo/acc
License: GNU General Public License v3.0
I was wondering if this is a particular problem with my phone or acc
is expected to behavior this way.
If I run acc -d
or acc -e
with the phone disconnected from power source (usb) the new state is not saved even though I get no error messages. If the phone is connected everything works just fine. I have been using acc
with Tasker so that is why I use mainly acc -d
and acc -e
.
I have a OnePlus 5t -Android 9, OxygenOS 9.0.4
Hello everyone,
I have a Pixel 3 currently, and when I run acc -i I see a large disparity between the level reported from /sys/class/power_supply/battery/uevent and dumpsys battery. My question is, is this normal behavior? At first it was only 5% off, but now it is upwards of 15% off and appears to be getting worse. Attached is a screenshot of what is reported from acc -i. Note that this only started when the newer versions of ACC were released, starting with v2020.6.14.
I did look in the README for any information regarding Pixel devices and this issue but it seems to be missing. Any help would be appreciated!
Hello,
Is it ok to install this app from F-Droid?
Thank you.
Hey, I'm using a Vernee Apollo Lite (exotic, I know) with MadOS as custom ROM. When starting the Daemon, I get the following output:
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***
If I can help to fix this somehow, please let me know!
After I installed this my phone only charges to 70% and I haven't found a way to revert this. My battery is already bad and I need the extra 30%. I used some acc commands and accidentally made it worse, so it only charges to ~61% now. I uninstalled the module at one point but it didn't revert the changes this module had applied. What commands do I need to use to fix this? This is my current config:
versionCode=201910130
capacity=0,100,100-100
capacityOffset=+0
capacitySync=false
temperature=70-80_90
coolDownRatio=
resetBsOnPause=false
resetBsOnUnplug=false
loopDelay=10,15
chargingSwitch=
applyOnBoot=battery/charge_control_limit 0
applyOnPlug=battery/charge_control_limit 0
maxChargingVoltage=
rebootOnPause=
chargingOnOffDelay=1
language=en
wakeUnlock=
prioritizeBattIdleMode=false
forceStatusAt100=
After reboot smartphone, ACC start before then file system was mounted in directory "/sdcard/". So that ACC exiting with error in function "misc_stuff" in file "misc-functions.sh", because "set -e".
+ acc --log
(i) Press q to abort/quit
###Mon Nov 8 23:26:34 MSK 1971###
versionCode=202007260
+ misc_stuff
+ set -eu
+ mkdir -p /data/adb/acc-data /sdcard/Download/acc
mkdir: can't create directory '/sdcard/': No such file or directory
+ exxit
+ typeset 'exitCode=1'
+ set +eux
mkdir: can't create directory '/sdcard/': No such file or directory
/data/adb/acc/accd.sh: can't create /sdcard/Download/acc/acc-logs-NX569J.tar.bz2: No such file or directory
I maked some changes in "misc-functions.sh" for show it. Diff in file "misc-functions.sh.diff.txt". And report after reboot available in "accd-NX569J.log", which from "acc-logs-NX569J.tar.bz2".
In short, I wrapped it in a loop with pause.
mkdir -p ${config%/*} $userDir
until mkdir -p ${config%/*} $userDir
do
sleep 10
done
misc-functions.sh.sha1sum.txt
misc-functions.sh.diff.txt
accd-NX569J.log
Not really an issue, more a quick write-up regarding voltageLimit settings on my devices (Sony Xperia Tablet Z/pollux_windy 2014, running LineageOS 15.1; Sony Xperia Z1compact/amami 2014, running LineageOS 16.0; OP6/enchilada running OOS 9.0.7). Installed latest pre-release (201907120) on all three. Over the past few days tested vlotageLimit settings:
pollux_windy apparently has no file allowing voltage limitation, so I can rule this one out completely.
amami has a single file usb/voltage_max. I tried using that file and limiting it to 4000mV. Apparently this does not work: device is being charged with approx. 4200mV. This command:
acc -v 4000
is answered with a message that I'm probably using a wrong file.
enchilada seems to work:
calling
acc -v :
tells me there are 5 files I could potentially use. After running some tests I concluded that I should use bms/constant_charge_voltage. I've currently set it to 3950mV, and as far as I can tell now it's working. What's a bit confusing is the fact that often a few minutes after I set a new limit I realize that the daemon stopped without me telling it to stop.
I also experimented a bit with battIdleMode and chargingSwitches.
However it looks as if none of my three devices where capable of using BattIdleMode at all:
acc -t --
on all three devices and for each of the available switches reports that battIdleMode = false.
Let me know whether you're interested in some more infos regarding these devices.
after upgrading to 2020.3.30-r1-dev (202003301) from an older version a few days ago, acc
then start
reports started
, but in reality it stopped due to unknown reason. Running acc
again shows that it is not running. Maybe add a pause between starting and checking status?
I was using 2019.7.21-r1 (201907211)
on a bunch of phones that were rooted with Magisk and I loved the acc -s endurance+
feature, it was exactly what I needed since 3-4 years!
But some older phones didn't have Magisk and were rooted with SuperSU. I tried to use the same ACC version there, by manually unzipping the release and running install-current.sh
. It would try to install somewhat, but I kept getting busybox help screens, as if busybox wasn't compatible. I updated busybox to v1.31.1 but same problem.
I then tried to install the latest dev version 2020.3.14-dev (202003140)
- which installed just fine, no busybox help screens!
However, it appears the latest dev version does not come with the awesome features such as acc -s endurance+
- anything I am doing wrong?
I have multiple phones running 24/7 and charging and my goal is to prevent the batteries from expanding and damaging the phones.. which happened quite a few times over the past couple years.
thanks alot
install-tarball.sh does not work, there is no acc*.gz archives in releases
install-current.sh fails with:
(i) Installing to /data/adb/acc/...
cp: /data/adb/acc/: Is a directory
Most of the time, after the resume percentage is reached, the wattage is very low and the battery goes down even with the system reporting that it is charging (but decreasing more slowly than not charging). Unplugging the cable and plugging it in again makes the wattage normalize. Rarely the wattage after acc resuming is decent, I can't tell what the pattern is. The first screenshot is after the acc automatically resumes, the second after unplugging and plugging the cable.
This is more of a feature request than an issue.
You have an unusually long day ahead of you. You put your device on charge but then remember it won't charge fully. Of course, you could just change the setting before and after but that's a hassle!
A person unfamiliar with your charging customizations plugs in your device and nothing happens. They try again and again... They are frustrated and your charging port is possibly damaged!
Once the daemon detects plugin event, it monitors for a second one for 5-10 seconds and if the second event detected, it temporarily (until it charges or another plugin event) changes the charging limit to 100%.
A. If you want a full charge, just plugin in the charger twice in 5-10 seconds.
B. If someone unfamiliar plugs in your device and fails to see/hear charging indication they will retry and succeed assuming that the first attempt was a fluke.
Thanks for this useful app. I am having an issue where my device freezes after installing the latest update (v7.24?) through magisk. This also happened two updates ago (v7.03) where it would freeze and not install. However, the previous update v7.22 did work. So i think somethin got fixed 7.03>7.22 and then broke again 7.22>7.24
I have an LG G5 H850 and installed acc via Magisk. I use the UNOFFICIAL LineageOS-15.1 for G5 and the system is quite fresh.
But i realised that acc is only able to switch off the battery charging before the usb cable is disconnected for the first time after boot up. I include a gif which illustrates the process.
The problem is repeatable like so:
acc -t --
I include several logs i saved with:
acc -l -e
acc_logs.zip
I also uploaded power supply log for device le_zl1 on the dropbox. generally ACC works okay, but roughly around 2 of every 5 times when charging, when the charge stops at the designated percent, a weird thing happens:
But it consistently fixes itself upon reboot. It happens on:
attached are the logs after charging to 80 % then discharging to about 67 %
acc-logs-le_zl1 2020-03-10.zip
The app/add-on does not seem to work on the Asus Transformer TF201 prime. I am running KatKiss-7.1_TF201_039 with Kernel 3.1.10-katkernel (based on Asus 10.6.1.27.5 version). I already tried to change some files manually using Solid Explorer but all of them either crashed the tablet our the file changed back immediately. Do you have any tips which files I should try and how to try them?
I send you the logs on Telegram.
What do you think about disable auto-shutdown if battery is not charging and capacity is less than <shutdown_capacity>, but was powered-on after auto-shutdown?
For example, if I set shutdown_capacity = 20 for everyday use, but the user doesn't know how it works, and the user needs to make an important call on the go when the battery capacity is less than 20%.
If normal charging I get adapters 0 and 3 online :
Adapter 0: on-line
Adapter 1: off-line
Adapter 2: off-line
Adapter 3: on-line
When acc resumes charging then I have adapters 2 and 3 and it's not charging actually :
Adapter 0: off-line
Adapter 1: off-line
Adapter 2: on-line
Adapter 3: on-line
Probably because it use OPPO VOOC charge, any solution?
Kernal source is here:https://github.com/realme-kernel-opensource/realmeX-kernel-source
Installed from f-droid. When I plug AC adepter it shows charging but the charge never goes up. I tried waiting for 6hrs.
hi, please update your app its so long past and you dont any update,thanks for your service
Excerpt from accd.log
+ secondsUnplugged=0
+ false
+ du -m /sbin/.acc/accd-le_zl1.log
+ cut -f 1
+ '[' 1 -lt 2 ']'
+ false
+ return 1
+ cat battery/capacity
+ '[' ! 70 -le 70 ']'
+ 2>/dev/null
+ cat battery/temp
+ '[' ! 242 -lt 370 ']'
+ enable_charging
+ false
+ true
+ '[' -f battery/charging_enabled ']'
+ chmod +w battery/charging_enabled
+ >battery/charging_enabled
+ echo 1
+ '[' ! -f ']'
+ sleep
BusyBox v1.31.1-topjohnwu (2019-11-02 01:14:24 EDT) multi-call binary.
Usage: sleep [N]...
Pause for a time equal to the total of the args given, where each arg can
have an optional suffix of (s)econds, (m)inutes, (h)ours, or (d)ays
+ exxit
+ typeset 'exitCode=1'
+ 2>/dev/null
+ set +euxo pipefail
***EXIT 1***
I have a device where the charging switch requires two numbers separated by a space. Acc doesn't currently support this because it uses awk '{print $whatever}' to extract the on/off values in various places, so quotes/escape sequences don't work. I managed to get it working by using read instead, like this:
local switch=""
read -A switch <<< $(get_value chargingSwitch)
file=${switch[0]}
on=${switch[1]}
off=${switch[2]}
This way I can escape the space in the config file (eg chargingSwitch=/foo/bar 0\ 0 1\ 1
) and everything works.
using acc on 3 different devices (currently latest dev acc-201907120); am using Terminal Emulator app by Jack Palevich (jackpal.androidterm):
most times (in rare cases it does not happen) I use one of the start commands (like acc -D start / restart or accd), then try to exit out of su the terminal app freezes. No matter how long I wait, there's nothing more happening in the terminal window. Only way to get out is to force-kill the app. It does not matter whether I stopped acc before the start or restart or not.
Same applies if I'm using the built-in terminal app on one of my two LineageOS devices (on my OP6 no such terminal app exists).
Added a screenshot and also a log both coming from one of my LineageOS driven Xperia devices; although I don't know whether the log is of any use because of course I had to kill the terminal then restart it to be able to create a log.
Let me add that this is the only command I know of that is able to freeze the emulator.
BTW: I had to zip the log as github does not allow to upload a .bz2 file...
acc-logs-amami.tar.zip
UPDATE: just found out that also a windows command open in adb shell mode can freeze this way after trying to exit from su; just happened with my OP6
UPDATE2: in rarer cases the freeze can also occur after a simple acc -D to show current status
Greets,
Lothar
Excerpt from accd.log
+ grep -iq dis battery/status
+ '[' 0 '==' 0 ']'
+ hibernate=true
+ secondsUnplugged=15
+ true
+ sleep 15
+ '[' 15 -lt ']'
/sbin/.acc/acc/accd.sh[356]: [: -lt: missing second argument
error repeats often
The Magisk Module of this is not letting me download it it just says error while downloading so is this a problem on your end or Magisk? the version before worked pretty much fine
Unfortunately acc isn't working for the Nexus 7 (2013 flo model). I've uploaded /sbin/_acc/acc-power_supply-flo.log to your dropbox and hope there is a way to get this working for this older tablet :)
Please let me know if you need anything else from me to help!
Hi i'm using Galaxy Note 8 with custom rom(HadesRom v12) and kernel(Phantom Kernel v2.10)
I tried install latest version using magisk here:
Magisk showed it installed successfully
But app is showing old version installed
If i choose to install acc from inside the app it say "ACC Installation Failed"
Here is the log file:acc-install.log
acc -L used the tail is system tail not the busybox,it's dosen't support -F only support -f.when i modify the system tail it's ok.
version: 201907180
Never had this with any acc version before 202007030:
start acc through termux (tsu > acc)
screen shows me that I'm running V2020.7.3 (202007030), and accd is running
from the menu choose "c" >>"check for update"
Next it says "acc 202007030 is available"; I now can download and install, and after that I'm back at the same version.
All the previous versions the updater would see that there is no newer version and wouldn't offer to install the same one again.
I wonder whether this is on purpose?
Charging does not start upon using voltage charging switch:
chagingSwitch=FILE DEFAULT_VOLTAGE STOP_VOLTAGE
(my config: chargingSwitch=battery/voltage_max 4200000 3800000)
This happens because this switch never reports discharging status when connected to charging plug. To fix it accd should apply FILE:DEFAULT_VOLTAGE even when battery reports Full state.
Hi,
Charging not stopping on set margins 45 90. I have a few Asus P024 Lineage 14.1 working nicely and ACC would be greatly appreciated.
Br, Kinger
Hi!
I would like to achieve to be able to charge phone using fast charge wireless charging wheras USB cable are also connected.
Use case:
I have android auto usb only but current from USB port is about 500mA. I have fast wireless change with current about 1600mA. So I want to have usb cable connected for android auto and charge phone wirelessly.
Notes
I tried to use Disable USB charging app.. but in the end phone was not charged wirelessly as well. Also I broke power pin (5V) on USB cable.. but head unit in the car not detect connected phone.
su -c ls -AlZ /sbin
Device: Ulefone Armor 3w, Android 9, Magisk
acc version v2020.5.4-rc
Issue: acc -t gives two working charging switches. After reaching pause capacity charging is stopped and a working charging switch is written into the config. plugging in after dropping below resume capacity does not re-enable charging.
janky solution: setting charging_switch to automatic (empty in config) allows charging to be re-enabled. setting run_cmd_on_pause=acc -s charging_switch=
solves the issue automatically
Everything works great for me now, but I assume that this is not the intended behaviour. I figured out the janky solution because acca resets charging_switch when selecting a profile.
Log: acc-logs-Armor_3W.tar.gz (created after first manually setting a charging switch and then clearing the variable which re-enabled charging)
Device: Pixel4 (Flame)
OS: Android 10
ACC Version: v2020.6.16
I don't know why, but after a while after switching the charge switch, it automatically switches to another switch.
The log was output after switching from charger/charge_disable 0 1
to /sys/kernel/debug/google_charger/chg_suspend 0 1
acc-logs-flame.tar.gz
acc -le
shortly after, and share the generated log archive.ACC doesn't seem to be working on the Pixel 4 (eg. doesn't stop charging when it reaches the pause charging level). Also tried the forceStatusAt100=5
workaround - still nothing. Currently on the stock kernel.
Hey.
Created issue on ACCA, turns out it's ACC issue. (ACCA issue post here)
Whenever I install ACC, the phone stops charging. The diode stops glowing and the system shows that the cable is connected (I can select transfer files, charge etc), the battery icon shows charging BUT the phone is not charging at all.
acc -i shows not charging as well but it always reports current now 515mA and voltage now ~3.7V. Unplugging USB drops current now to 0 mA.
Switching acc -s s didn't change anything.
I know disabling and enabling power used to work with EngineerMode app bundled with the original ROM but it does not work with ACC.
I'm attaching full logs so you should be able to dig out the issue. Perhaps it's just a matter of simple logic error or wrong sensor read.
More info in linked AccA issue post (if needed).
Hello,
After installing acc v2020.6.14 (202006140), I can't not make any call, I installed it with Magisk 20.4 in a Redmi Note 7 MUI 12, Android 10 (xiaomi.eu rom 20.6.18).
The error is "that I don't have any account registered to do that type of call".
If I disabled the module and reboot the phone, I can call again.
This is my first time using acc in that phone.
In the end I made it to work after doing the following procedure, without install or disable the acc from Magisk, I installed acca from f-droid, change the acc to the bundle one in acca (can't call), reboot the phone (can't call), and again switch to the last version v2020.6.14 from the acca and reboot, now I can call without problem and the acc work OK.
Please forgive me my bad english.
Greetings, Pedro Enrique.
Dear developer,
I'd like to report an issue that occurs both on the stable release from July 2019 and on the latest beta (April 10th).
It's very simple: if I, for example, run
acc 55 60
or apply a "55->60" profile with AccA, the battery is charged correctly until the level reaches the upper bound (in this case, 60), but charging is not inhibited until the level falls to 55. Instead, the battery starts charging again as soon as it drops to 59, or sometimes even before that: sometimes it resumes charging intermittently, for very short time intervals (less than a minute), when it's still at 60. Sometimes, this happens so often that these small charges manage to bump the battery level up beyond the upper bound, e.g. to 61.
I've tried completely removing acc and AccA and all the config files, and performing a fresh installation, but the issue is still there.
I'm using an Oneplus One, with LineageOS 16.
I've attached the logs (exported about one minute after the first "short charging" event).
I'm of course available for further discussion of the problem.
Thanks!
This is a weird case.
Let's assume the battery level is 90% (for example, it got charged when the phone was turned off, when acc couldn't kick in to limit the charging, and then I turned it on on 90% of the battery). The config is:
capacity=0,101,80-85
temperature=100-105_90
all other config settings are default.
When I connect the phone to a charger (at battery level 90%), Android says that the battery isn't charging...
But in reality, when I check again with another application (in my case AccuBattery Pro), it is actually charging! Android doesn't show it up as charging but it is still charging. Even more, after a while the percentage increases to 91, 92 and eventually 100%.
When I do acc -t it stops charging as expected (checked using the same AccuBattery Pro). When I disconnect and then reconnect the cable after that, it charges till 100% again without showing up as charging.
Tried every single one switch present in acc -s s:
. Same with all of them.
Asus Max Pro M1 (X00T), Lineage OS 16.0 (official nightlies, but I remember it was the same on stock ROM too).
I've zipped the tar.bz2 file to allow it's upload here on github.
acc-logs-ASUS_X00T_6.tar.zip
just tried acc -l -a cat, as well acc --log --acc cat. Results in
/sbin/acc[626]: -a not found
or
/sbin/acc[626]: -acc not found
Device is OP6 (same on Xperia z1c). Tested both with on-device terminal emulator and windows command through adb shell
On Xperia Tablet Z not working either, but with different output:
/sbin/acc[626]: /sbin/.acc/acc-power_supply-pollux_windy.log: can't execute: Permission denied
Device is rooted, running terminal in 'Superuser' mode
The daemon won't start at. I can't install the bare acc version. Because then I get a bootloop. As there is no Twrp for my device it's difficult to remove the module.
I have tried al versions non work.
Nice project. I'm not lucky.๐
judypn:/storage/emulated/0 # acc -L
+ sed -n 's|^capacity=||p' /data/media/0/acc/config.txt
+ '[' 69 -le 30 ']'
+ :
+ true
+ return 0
+ exxit 1 '(!) Unsupported device'
+ typeset 'exitCode=1'
+ set +euxo pipefail
(!) Unsupported device
***EXIT 1***
happened after upgrading to the latest 2020.3.9-dev (202003090)
root@android:/ # ls -l /data/adb/acc-data/
total 18
-rw------- 1 root root 9556 2020-03-30 15:05 config.txt
drwx------ 2 root root 3488 2020-03-30 15:05 info
drwx------ 2 root root 3488 2020-03-30 15:05 logs
the file does exist
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.