VR-25 / acc

Advanced Charging Controller
https://github.com/Magisk-Modules-Repo/acc
GNU General Public License v3.0
1.72k stars 108 forks source link

ACC doesn't stop charging #148

Closed bonswouar closed 2 years ago

bonswouar commented 2 years ago

I'm not sure yet if it never stops the charging, but right now I can't make it work. It might be related to kernel issues as in #115 ?

I'm usually using ACCA frontend, but I've just checked few acc commands, and I don't see anything weird in the output :

# /dev/.vr25/acc/acca -t
(!) Charger must be plugged to continue...
(i) This may take a minute or so...

(!) [/sys/class/qcom-battery/restricted_charging 0 1] won't work

(i) [battery/charging_enabled 1 0] works
- battIdleMode=false

(i) [battery/input_suspend 0 1] works
- battIdleMode=false

(i) [battery/step_charging_enabled 1 0] works
- battIdleMode=false

(!) [dc/input_suspend 0 1] won't work

(i) [/sys/class/qcom-battery/restricted_current 1000000 0] works
- battIdleMode=false

(!) [battery/constant_charge_current_max 3000000 0] won't work

(i) [battery/input_current_max 1 0] works
- battIdleMode=false

(!) [dc/current_max 500000 0] won't work

(!) [main/constant_charge_current_max 1950000 0] won't work

(i) [main/current_max 500000 0] works
- battIdleMode=true

(i) [pc_port/current_max 500000 0] is blacklisted; won't be tested

(i) [usb/current_max 500000 0] is blacklisted; won't be tested

(i) [bms/constant_charge_voltage 4359869 voltage_now] works
- battIdleMode=true

(!) [main/voltage_max 4380000 voltage_now] won't work

(i) Results may vary with different power supplies and conditions, as stated in README.md -- TROUBLESHOOTING.
To set charging switches, run acc -ss (wizard) or acc -s s="SWITCHES GO HERE --".
"battIdleMode" refers to the ability of running off the charger.

Although when I do:

# /dev/.vr25/acc/acca -s s="battery/input_suspend 0 1 --"

There's no output, and it's still charging:

# /dev/.vr25/acc/acca --info                                                                                                                                                                           
BATTERY_HEALTH=99
BATTERY_TYPE=OP_3300mah
BQ_SOC=96
CAPACITY=100
CAPACITY_RAW=243
CC_STEP=0
CC_STEP_SEL=0
CHARGER_TEMP=282
CHARGER_TEMP_MAX=803
CHARGE_COUNTER=2734897
CHARGE_COUNTER_SHADOW=2739356
CHARGE_DONE=0
CHARGE_FULL=2878000
CHARGE_FULL_DESIGN=2878000
CHARGE_NOW=0
CHARGE_NOW=4882
CHARGE_NOW_RAW=-2484434
CHARGE_TYPE=Taper
CHARGING_ENABLED=1
CHG_PROTECT_STATUS=0
CONSTANT_CHARGE_CURRENT_MAX=3000000
CONSTANT_CHARGE_VOLTAGE=4359625
CURRENT_QNOVO=-22
CUTOFF_VOLT_WITH_CHARGER=3250
CYCLE_COUNT=5
CYCLE_COUNT_ID=1
DEBUG_BATTERY=0
DIE_HEALTH=Cool
DP_DM=0
FASTCHG_STARTING=0
FASTCHG_STATUS=0
FCC_STEPPER_ENABLE=0
FG_RESET_CLOCK=0
HEALTH=Good
INPUT_CURRENT_LIMITED=1
INPUT_CURRENT_MAX=1
INPUT_SUSPEND=0
IS_AGING_TEST=0
NAME=battery
NAME=bms
PARALLEL_DISABLE=0
PRESENT=1
RERUN_AICL=0
RESISTANCE=358642
RESISTANCE_ID=200000
SET_SHIP_MODE=0
SOC_REPORTING_READY=1
STATUS=Full
STEP_CHARGING_ENABLED=1
SW_JEITA_ENABLED=0
SYSTEM_TEMP_LEVEL=0
TECHNOLOGY=Li-ion
TEMP=206
TEMP_COLD=0
TEMP_COOL=50
TEMP_HOT=500
TEMP_WARM=450
TIME_TO_EMPTY_AVG=79377
TIME_TO_FULL_AVG=0
VOLTAGE_MAX=-22
VOLTAGE_MAX_DESIGN=4370000
VOLTAGE_OCV=4285651
VOLTAGE_QNOVO=-22

CURRENT_NOW=-0.39
VOLTAGE_NOW=4.34
POWER_NOW=-1.69

Any idea?

Don't hesitate if you want me to check any other command

I'm using a OnePlus 5 with LineageOS 18.1 (Android 11), with latest versions of ACC & ACCA

VR-25 commented 2 years ago

Have you tried the latest version of acc? The one that comes with the app is very old. You can upgrade it simply by flashing the zip.

bonswouar commented 2 years ago

@VR-25 thanks for the reply, unfortunately I'm already running Advanced Charging Controller v2022.2.22.1 (202202221)

bonswouar commented 2 years ago

Some updates! I was actually writing this exact message to close the issue:

I've tried to uninstall and reinstall acc, and run it directly, it now seems to work!! :) Probably something has been broken with some android update or something? Any that's solved I guess, thanks for

But while I was writing that I used acc (interactively) to set charge to x% to 95%... And when it arrived at 95% it actually vibrated like charging was stopping, but it actually didn't stop, and my phone kept vibrating every couple of seconds, until it finally arrived at 100%, so I unplugged it. :/ But now when I plug it, no vibration and it seems to not be charging (as it should)?! I'm not sure how to interpret this :sweat_smile:

By the way, here is my profile if it can help:

configVerCode=202202060
capacity=(-1 60 70 75 false false)
temperature=(40 60 90 65)
cooldownRatio=( )
cooldownCurrent=
cooldownCustom=()
resetBattStats=(false false)
chargingSwitch=(battery/input_suspend 0 1 --)
applyOnBoot=()
applyOnPlug=()
maxChargingCurrent=()
maxChargingVoltage=()
language=en
runCmdOnPause=()
ampFactor=
voltFactor=
loopCmd=()
prioritizeBattIdleMode=false
currentWorkaround=false

P.S. I've now uninstalled acca just in case it messed with acc

VR-25 commented 2 years ago

acc_v2022.6.10-dev_202206100_1431.zip Try this build.

bonswouar commented 2 years ago

@VR-25 it seems to work for now with this build, I'll do few more days of testing and will let you know :)

VR-25 commented 2 years ago

New build: https://forum.xda-developers.com/t/advanced-charging-controller-acc.3668427/post-87045121

VR-25 commented 2 years ago

https://github.com/VR-25/acc/releases/tag/v2022.6.21-dev