• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
Search This thread

wolfenstein3de

Senior Member
Feb 27, 2014
76
9
Kraków
Hello, does anybody have any idea how to set ACCA so it won't show charging icon, when connected&not charging? I would like to see to be able to check when the phone has stopped charging during the night, exactly.
 

gorilla p

Recognized Contributor
Nov 30, 2011
3,669
2,837
Milwaukee
Xiaomi Mi Pad 4
OnePlus 9
Running initial test on wireless charger provided
:/ $ su :/ # acc --test (!) Charger must be plugged to continue... (i) Alright, this may take a minute or so... (!) [/sys/devices/platform/soc/soc:oplus,chg_intf/oplus_chg/battery/mmi_charging_enable 1 0] won't work :/ #
After latest update, I now get
[/sys/devices/platform/soc/soc:eek:plus,chg_intf/oplus_chg/battery/mmi_charging_enable 1 0] works
- battIdleMode=false

Will see how it works tonight
 

Ascii3

Senior Member
Sep 17, 2015
222
64
Unfortunately, Android is a mess when it comes to standards.
Only a handful of devices/kernels actually offer fairly well defined intefaces for those features.
Nonetheless, I'm exploring ways of abstracting as many control interfaces as possible.
Keep an eye on release changelogs.
I shall keep an occasional watch for the changes.

Meanwhile, as workarounds, you can disable/enable charging on demand with acc -d and acc -e, respectivelly - and limit the max charging current to 500 mA.
Thanks. Right now disabling and enabling online charging manually is what I oftentimes do.
 

gorilla p

Recognized Contributor
Nov 30, 2011
3,669
2,837
Milwaukee
Xiaomi Mi Pad 4
OnePlus 9
That's one of the recently discovered charging switches.
There might be more, according to the output of acc -p.
Acc -p came back with the following. Wireless charging is still charging to 100%. Seeing if latest update helped.
Code:
:/ $ su
:/ # acc -p

/sys/class/qcom-battery/moisture_detection_en 0 1
battery/hwmon4/waiting_for_supplier 0 1
battery/cycle_count 0 1
battery/waiting_for_supplier 0 1
wireless/hwmon7/waiting_for_supplier 0 1
wireless/waiting_for_supplier 0 1
usb/hwmon6/in0_input 0 1
usb/hwmon6/waiting_for_supplier 0 1
usb/waiting_for_supplier 0 1
/sys/devices/platform/soc/soc:oplus,chg_intf/soc:oplus,chg_intf:oplus,common-charge/oplus_chg/common/camera_on 0 1
/sys/devices/platform/soc/soc:oplus,chg_intf/soc:oplus,chg_intf:oplus,common-charge/oplus_chg/common/chg_enable 1 0
/sys/devices/platform/soc/soc:oplus,chg_intf/soc:oplus,chg_intf:oplus,common-charge/oplus_chg/common/ship_mode 0 1
/sys/devices/platform/soc/soc:oplus,chg_intf/soc:oplus,chg_intf:oplus,common-charge/oplus_chg/common/waiting_for_supplier 0 1
/sys/devices/platform/soc/soc:oplus,chg_intf/oplus_chg/battery/chg_enable 1 0
/sys/devices/platform/soc/soc:oplus,chg_intf/oplus_chg/battery/cycle_count 0 1
/sys/devices/platform/soc/soc:oplus,chg_intf/oplus_chg/battery/waiting_for_supplier 0 1
/sys/devices/platform/soc/soc:oplus,chg_intf/oplus_chg/battery/battery_notify_code 0 1
/sys/devices/platform/soc/soc:oplus,chg_intf/soc:oplus,chg_intf:oplus,wireless-charge/oplus_chg/wireless/deviated 0 1
/sys/devices/platform/soc/soc:oplus,chg_intf/soc:oplus,chg_intf:oplus,wireless-charge/oplus_chg/wireless/chg_enable 1 0
/sys/devices/platform/soc/soc:oplus,chg_intf/soc:oplus,chg_intf:oplus,wireless-charge/oplus_chg/wireless/trx_power_vol 0 1
/sys/devices/platform/soc/soc:oplus,chg_intf/soc:oplus,chg_intf:oplus,wireless-charge/oplus_chg/wireless/rx_power 0 1
/sys/devices/platform/soc/soc:oplus,chg_intf/soc:oplus,chg_intf:oplus,wireless-charge/oplus_chg/wireless/batt_chg_enable 1 0
/sys/devices/platform/soc/soc:oplus,chg_intf/soc:oplus,chg_intf:oplus,wireless-charge/oplus_chg/wireless/adapter_type 0 1
/sys/devices/platform/soc/soc:oplus,chg_intf/soc:oplus,chg_intf:oplus,wireless-charge/oplus_chg/wireless/factory_mode 0 1
/sys/devices/platform/soc/soc:oplus,chg_intf/soc:oplus,chg_intf:oplus,wireless-charge/oplus_chg/wireless/waiting_for_supplier 0 1
/sys/devices/platform/soc/soc:oplus,chg_intf/soc:oplus,chg_intf:oplus,wireless-charge/oplus_chg/wireless/tx_power 0 1
/sys/devices/platform/soc/soc:oplus,chg_intf/soc:oplus,chg_intf:oplus,wireless-charge/oplus_chg/wireless/fod_cal 0 1
/sys/devices/platform/soc/soc:oplus,chg_intf/soc:oplus,chg_intf:oplus,wireless-charge/oplus_chg/wireless/trx_power_en 0 1
/sys/devices/platform/soc/soc:oplus,chg_intf/soc:oplus,chg_intf:oplus,wireless-charge/oplus_chg/wireless/quiet_mode 0 1
/sys/devices/platform/soc/soc:oplus,chg_intf/soc:oplus,chg_intf:oplus,wireless-charge/oplus_chg/wireless/adapter_sid 0 1/sys/devices/virtual/devlink/f000000.pinctrl--soc:qcom,pmic_glink:qcom,battery_charger:oplus,pm8350b_typec/sync_state_only 0 1
/sys/devices/virtual/devlink/f000000.pinctrl--soc:qcom,pmic_glink:qcom,battery_charger:oplus,pm8350b_typec/waiting_for_supplier 0 1
/sys/devices/virtual/devlink/c440000.qcom,spmi:qcom,[email protected]:[email protected]:oplus,chg_intf:oplus,wireless-charge/sync_state_only 0 1
/sys/devices/virtual/devlink/c440000.qcom,spmi:qcom,[email protected]:[email protected]:oplus,chg_intf:oplus,wireless-charge/waiting_for_supplier 0 1
/sys/devices/virtual/devlink/f000000.pinctrl--soc:oplus,chg_intf:oplus,wireless-charge/sync_state_only 0 1
/sys/devices/virtual/devlink/f000000.pinctrl--soc:oplus,chg_intf:oplus,wireless-charge/waiting_for_supplier 0 1
/sys/devices/virtual/devlink/c440000.qcom,spmi:qcom,[email protected]:[email protected]:qcom,pmic_glink:qcom,battery_charger/sync_state_only 0 1
/sys/devices/virtual/devlink/c440000.qcom,spmi:qcom,[email protected]:[email protected]:qcom,pmic_glink:qcom,battery_charger/waiting_for_supplier 0 1
/proc/charger/hmac 1 0
/proc/charger/passedchg_reset_count 0 1
/proc/tbatt_pwroff 1 0
/proc/touchpanel/charge_detect 0 1
/proc/touchpanel/wireless_charge_detect 1 0

:/ #
 

Gibsonflyingv

Senior Member
Jul 28, 2011
372
59
I'm curious if anyone has had success with this on the Pixel 6. I read this on the acc github but I'm not sure how to make use of that in the configuration (I'm a noob with this module/config app).

It mentions:
Code:
/sys/devices/platform/google,charger/charge_start_level:100
/sys/devices/platform/google,charger/charge_stop_level:0

I'm confused on how to create the commands to set this up. It's clearly a "acc -s" command, but where does the "charger/charge_start_level:100" go? I'm assuming "/sys/devices/platform/google" is the switch file?
 
Last edited:
  • Like
Reactions: zee3are0

VR25

Senior Member
Apr 20, 2013
1,863
4,570
github.com
You ca
Acc -p came back with the following. Wireless charging is still charging to 100%. Seeing if latest update helped.
Code:
:/ $ su
:/ # acc -p

/sys/class/qcom-battery/moisture_detection_en 0 1
battery/hwmon4/waiting_for_supplier 0 1
battery/cycle_count 0 1
battery/waiting_for_supplier 0 1
wireless/hwmon7/waiting_for_supplier 0 1
wireless/waiting_for_supplier 0 1
usb/hwmon6/in0_input 0 1
usb/hwmon6/waiting_for_supplier 0 1
usb/waiting_for_supplier 0 1
/sys/devices/platform/soc/soc:oplus,chg_intf/soc:oplus,chg_intf:oplus,common-charge/oplus_chg/common/camera_on 0 1
/sys/devices/platform/soc/soc:oplus,chg_intf/soc:oplus,chg_intf:oplus,common-charge/oplus_chg/common/chg_enable 1 0
/sys/devices/platform/soc/soc:oplus,chg_intf/soc:oplus,chg_intf:oplus,common-charge/oplus_chg/common/ship_mode 0 1
/sys/devices/platform/soc/soc:oplus,chg_intf/soc:oplus,chg_intf:oplus,common-charge/oplus_chg/common/waiting_for_supplier 0 1
/sys/devices/platform/soc/soc:oplus,chg_intf/oplus_chg/battery/chg_enable 1 0
/sys/devices/platform/soc/soc:oplus,chg_intf/oplus_chg/battery/cycle_count 0 1
/sys/devices/platform/soc/soc:oplus,chg_intf/oplus_chg/battery/waiting_for_supplier 0 1
/sys/devices/platform/soc/soc:oplus,chg_intf/oplus_chg/battery/battery_notify_code 0 1
/sys/devices/platform/soc/soc:oplus,chg_intf/soc:oplus,chg_intf:oplus,wireless-charge/oplus_chg/wireless/deviated 0 1
/sys/devices/platform/soc/soc:oplus,chg_intf/soc:oplus,chg_intf:oplus,wireless-charge/oplus_chg/wireless/chg_enable 1 0
/sys/devices/platform/soc/soc:oplus,chg_intf/soc:oplus,chg_intf:oplus,wireless-charge/oplus_chg/wireless/trx_power_vol 0 1
/sys/devices/platform/soc/soc:oplus,chg_intf/soc:oplus,chg_intf:oplus,wireless-charge/oplus_chg/wireless/rx_power 0 1
/sys/devices/platform/soc/soc:oplus,chg_intf/soc:oplus,chg_intf:oplus,wireless-charge/oplus_chg/wireless/batt_chg_enable 1 0
/sys/devices/platform/soc/soc:oplus,chg_intf/soc:oplus,chg_intf:oplus,wireless-charge/oplus_chg/wireless/adapter_type 0 1
/sys/devices/platform/soc/soc:oplus,chg_intf/soc:oplus,chg_intf:oplus,wireless-charge/oplus_chg/wireless/factory_mode 0 1
/sys/devices/platform/soc/soc:oplus,chg_intf/soc:oplus,chg_intf:oplus,wireless-charge/oplus_chg/wireless/waiting_for_supplier 0 1
/sys/devices/platform/soc/soc:oplus,chg_intf/soc:oplus,chg_intf:oplus,wireless-charge/oplus_chg/wireless/tx_power 0 1
/sys/devices/platform/soc/soc:oplus,chg_intf/soc:oplus,chg_intf:oplus,wireless-charge/oplus_chg/wireless/fod_cal 0 1
/sys/devices/platform/soc/soc:oplus,chg_intf/soc:oplus,chg_intf:oplus,wireless-charge/oplus_chg/wireless/trx_power_en 0 1
/sys/devices/platform/soc/soc:oplus,chg_intf/soc:oplus,chg_intf:oplus,wireless-charge/oplus_chg/wireless/quiet_mode 0 1
/sys/devices/platform/soc/soc:oplus,chg_intf/soc:oplus,chg_intf:oplus,wireless-charge/oplus_chg/wireless/adapter_sid 0 1/sys/devices/virtual/devlink/f000000.pinctrl--soc:qcom,pmic_glink:qcom,battery_charger:oplus,pm8350b_typec/sync_state_only 0 1
/sys/devices/virtual/devlink/f000000.pinctrl--soc:qcom,pmic_glink:qcom,battery_charger:oplus,pm8350b_typec/waiting_for_supplier 0 1
/sys/devices/virtual/devlink/c440000.qcom,spmi:qcom,[email protected]:[email protected]:oplus,chg_intf:oplus,wireless-charge/sync_state_only 0 1
/sys/devices/virtual/devlink/c440000.qcom,spmi:qcom,[email protected]:[email protected]:oplus,chg_intf:oplus,wireless-charge/waiting_for_supplier 0 1
/sys/devices/virtual/devlink/f000000.pinctrl--soc:oplus,chg_intf:oplus,wireless-charge/sync_state_only 0 1
/sys/devices/virtual/devlink/f000000.pinctrl--soc:oplus,chg_intf:oplus,wireless-charge/waiting_for_supplier 0 1
/sys/devices/virtual/devlink/c440000.qcom,spmi:qcom,[email protected]:[email protected]:qcom,pmic_glink:qcom,battery_charger/sync_state_only 0 1
/sys/devices/virtual/devlink/c440000.qcom,spmi:qcom,[email protected]:[email protected]:qcom,pmic_glink:qcom,battery_charger/waiting_for_supplier 0 1
/proc/charger/hmac 1 0
/proc/charger/passedchg_reset_count 0 1
/proc/tbatt_pwroff 1 0
/proc/touchpanel/charge_detect 0 1
/proc/touchpanel/wireless_charge_detect 1 0

:/ #
You can place those lines into a file (e.g., acc -p /sdcard/my-list.txt) and run acc -t /path/to/file to test all.
Perhaps you may want to filter the output a bit - i.e., remove lines that don't remotely resemble a charging switch.
Sometimes, certain lines may trigger a reboot. ACC remebers to skip those next time, so that one can continue testing by simply running the same command again until all lines get tested.
 
  • Like
Reactions: duttyend

VR25

Senior Member
Apr 20, 2013
1,863
4,570
github.com
I'm curious if anyone has had success with this on the Pixel 6. I read this on the acc github but I'm not sure how to make use of that in the configuration (I'm a noob with this module/config app).

It mentions:
Code:
/sys/devices/platform/google,charger/charge_start_level:100
/sys/devices/platform/google,charger/charge_stop_level:0

I'm confused on how to create the commands to set this up. It's clearly a "acc -s" command, but where does the "charger/charge_start_level:100" go? I'm assuming "/sys/devices/platform/google" is the switch file?

zee3are0 et al.,


I've been experimenting with botth.
So far, those control files seem to behave very inconsistently.
Perhaps Google released non-production quality software.
Have you tried the current/voltage approaches? (Readme > tips > idle mode and alternatives)


Anyway, here's how to test and and set those two switches:


1. /sys/devices/platform/google,charger/charge_stop_level and /sys/devices/platform/google,charger/charge_start_level

Test: acc -t /sys/devices/platform/google,charger/charge_stop_level 100 5 /sys/devices/platform/google,charger/charge_start_level 0 95

Set: acc -s s="/sys/devices/platform/google,charger/charge_stop_level 100 5 /sys/devices/platform/google,charger/charge_start_level 0 95"


2. Just /sys/devices/platform/google,charger/charge_stop_level

Test: acc -t /sys/devices/platform/google,charger/charge_stop_level 100 5

Set: acc -s s="/sys/devices/platform/google,charger/charge_stop_level 100 5"
 

Darth Bidder

Senior Member
May 11, 2017
136
20
Xiaomi Redmi 7
Should I update the Magisk module even though I'm using the AccA or should I only update the AccA through the apk?
Last update for AccA was from a few months ago while the Magisk module was just last updated back in the 1st week of November.
 

VR25

Senior Member
Apr 20, 2013
1,863
4,570
github.com
Should I update the Magisk module even though I'm using the AccA or should I only update the AccA through the apk?
Last update for AccA was from a few months ago while the Magisk module was just last updated back in the 1st week of November.
The general rule of thumb is updating things only if you absolutelly need to.
Don't fix what's not broken.

That's not to discourage anyone.
Being a bit adventurous won't hurt.
I don't intruduce breakng changes without notice.
Besides, acc has a rollback feature - acc -b command reverts everthing (including the config) - no reboot required.
 

gorilla p

Recognized Contributor
Nov 30, 2011
3,669
2,837
Milwaukee
Xiaomi Mi Pad 4
OnePlus 9
You ca

You can place those lines into a file (e.g., acc -p /sdcard/my-list.txt) and run acc -t /path/to/file to test all.
Perhaps you may want to filter the output a bit - i.e., remove lines that don't remotely resemble a charging switch.
Sometimes, certain lines may trigger a reboot. ACC remebers to skip those next time, so that one can continue testing by simply running the same command again until all lines get tested.
After testing, I found the following 2 reporting "works" on my OP9.

sys/devices/platform/soc/soc:eek:plus,chg_intf/oplus_chg/battery/chg_enable 1 0

/sys/devices/platform/soc/soc:eek:plus,chg_intf/soc:eek:plus,chg_intf:eek:plus,wireless-charge/oplus_chg/wireless/batt_chg_enable 1 0

For each, I entered acc -ss /path/to/switchabove.

Ill see of it works nay better.
 
Last edited:

VR25

Senior Member
Apr 20, 2013
1,863
4,570
github.com
After testing, I found the following 2 reporting "works" on my OP9.

sys/devices/platform/soc/soc:eek:plus,chg_intf/oplus_chg/battery/chg_enable 1 0

/sys/devices/platform/soc/soc:eek:plus,chg_intf/soc:eek:plus,chg_intf:eek:plus,wireless-charge/oplus_chg/wireless/batt_chg_enable 1 0

For each, I entered acc -ss /path/to/switchabove.

Ill see of it works nay better.
To set switches, run acc --set charging_switch="file on off file2 on off --"

As you can see, more than one switch can be set at once, but most of the time, one is enough. The trailing " --" ensures the switch is not unset if it fails (i.e., prevents falling back to "automatic")

acc --set charging_switch= can be shortened for faster typing: acc -s s=
 

gorilla p

Recognized Contributor
Nov 30, 2011
3,669
2,837
Milwaukee
Xiaomi Mi Pad 4
OnePlus 9
To set switches, run acc --set charging_switch="file on off file2 on off --"

As you can see, more than one switch can be set at once, but most of the time, one is enough. The trailing " --" ensures the switch is not unset if it fails (i.e., prevents falling back to "automatic")

acc --set charging_switch= can be shortened for faster typing: acc -s s=
Ran again with a better usb charger and found another working switch. Applied first and third. Now Daemon is back to stopping while charging. Both with battery idle mode=true cause the daemon to stop almost immediately after starting charging.
I tried the one with battery idle mode=false and the profile didnt work. It didnt throtttle charging or enable cooldown and kept charging past the set threshold of 90%.

/sys/devices/platform/soc/soc:eek:plus,chg_intf/oplus_chg/battery/chg_enable 1 0

/sys/devices/platform/soc/soc:eek:plus,chg_intf/soc:eek:plus,chg_intf:eek:plus,wireless-charge/oplus_chg/wireless/chg_enable 1 0 works
- battIdleMode=false

/sys/devices/platform/soc/soc:eek:plus,chg_intf/soc:eek:plus,chg_intf:eek:plus,wireless-charge/oplus_chg/wireless/batt_chg_enable 1 0]
works
- battIdleMode=true
 
Last edited:

Alaunus

Member
Jan 25, 2015
30
3
Hello everyone!

I've got a Galaxy M21

After installing ACC, I used the setting "acc 3920" but for some reason the values do not set to 3920/3870 but to 3920/3820.

Is this change a bug or something made on purpose? If it's on purpose, why is a 100mv difference better than 50mv?

Is there a list of known charging witches which support idle mode?
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 6
    **v2022.1.8 (202201080)**
    - `acc -p` finds even more potential switches;
    - Enhanced charging status detection;
    - General fixes & optimizations;
    - Improved idle mode support;
    - New charging switches;
    - Optimize system performance and battery utilization, by forcing `bg-dexopt-job` on daemon [re]start, if charging;
    - Support for Qualcomm SnapDragon 8 Gen 1 devices, Nokia 2.2 and more;
    - Updated documentation.
    3
    **v2021.12.20 (202112200)**
    - [accd, misc-functions]: prevent unwanted crashes related to `eval` and `set -eu`;
    - [batt-info]: filter out the unreliable `POWER_SUPPLY_CHARGE_TYPE` property (note: this change makes AccA always display "unknown" charge type);
    - [batt-info]: fixed current reading issue;
    - [batt-info]: round current and voltage values to two decimal places;
    - [ctrl-files]: added `battery/op_disable_charge 0 1` switch;
    - [README]: updated troubleshooting section;
    - General optimizations.
    3
    v2022.1.6 (202201060)
    - acc -p finds even more potential switches;
    - Additional charging switches;
    - Enhanced charging status detection;
    - General fixes & optimizations;
    - Improved idle mode support;
    - Support for Qualcomm SnapDragon 8 Gen 1 devices, Nokia 2.2 and more;
    - Updated documentation.

    This is a pre-release. Anyone who's facing major issues is encouraged to try it.
    Please provide feedback!

    Not satisfied? acc -b undoes the upgrade.
    2
    Results of acc --log tail

    354: >pca9468-mains/current_max
    354: eval echo '$on'
    354: echo 0
    355: sleep 0.5
    260: 2>/dev/null
    260: shift 3
    260: exxit
    87: exitCode=1
    88: false
    88: set +eux

    And after restarting the daemon (if this is helpful)

    141: set +eu
    142: eval ''
    143: eval ''
    145: '[' -n '' ']'
    171: true
    205: false
    210: false
    214: '[' -n '' ']'
    266: cooldown=false
    267: sleep 10
    Try the attached build.
    1

    Back to the combination of Custom Max Charging Voltage with a max Capacity in %.​


    What I think could go wrong is that over time the set maximum charging capacity becomes associated with the set voltage limit. That can possibly lead to rapid drops at the lower end.

    My initial observations suggest that all the above may be the case.
    Readme > troubleshooting > custom max charging voltage and current limits reads:

    WARNING: limiting voltage causes battery state of charge (SoC) deviation on some devices. The battery management system self-calibrates constantly, though. Thus, as soon as the default voltage limit is restored, it'll start "fixing" itself.

    Limiting current, on the other hand, has been found to be universally safe. Some devices do not support just any current value, though. That's not to say out-of-range values cause issues. These are simply ignored.
  • 75
    Archive
    Find newer zips here.
    40
    Those who are worried about other projects of mine not being updated for a long time, possibly abandoned...
    Stop worrying.
    After the next stable ACC release, I'll focus more on the other Magisk modules (fbind, Migrator, Systemless GApps, etc.).
    The current ACC framework is the base of all the other projects - meaning, making it rock stable it priority #0.
    29
    A new stable release is up.
    It can be downloaded from Magisk Manager > Downloads as well.
    Refer to the readme for a full list of changes, features and recommendations.
    Now I'll be focusing more on the other projects (migrator, fbind, systemless GApps, daily job scheduler...).
    Until these reach satisfactory status, acc will only get occasional maintenance updates (bugfixes, optimizations, new charging control files...).

    Edit: the installer enforced by Magisk Manager is not playing nice with acc. Until I fix that, use the zip from GitHub (release link above).

    Edit 2: fixed.