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

nostromo12

Senior Member
Sep 23, 2008
109
16
Grossenseebach
ok, VR25 lets do: switched to automatic mode and executed auto loadswitch test. One was found.
Now charge stops at desired limit, but charging symbol in device top line is still active, also infotext: device is charging.
But % indication is rapidly decreasing! 2% in a few minutes! power supply still connected.
acca shows actual current changing between 2 an 4A !!!! Should be negative and 0,1A !
Could I harm the pitiful battery?
 

VR25

Senior Member
Apr 20, 2013
1,816
4,502
github.com
ok, VR25 lets do: switched to automatic mode and executed auto loadswitch test. One was found.
Now charge stops at desired limit, but charging symbol in device top line is still active, also infotext: device is charging.
But % indication is rapidly decreasing! 2% in a few minutes! power supply still connected.
acca shows actual current changing between 2 an 4A !!!! Should be negative and 0,1A !
Could I harm the pitiful battery?
Manually select another working switch (with acc -ss) from the output of acc -t.
Refer to troubleshooting > charging switch.
 
  • Like
Reactions: duttyend

nostromo12

Senior Member
Sep 23, 2008
109
16
Grossenseebach
New approach with Pixel5:
acc -t shoes the switch sm7250_bms/charge_disable 0 1 working
I set this switch with acc -s s="sm7250_bms/charge_disable 0 1"
But result is the same : load stop at 80%, but then high discharge with power attached
wrong command? Little experience with shell commands :-(
 

T Ghost1

Member
Jul 25, 2021
16
0
My phone is making charge plugin sounds often enough.
Infinix Note 2, Resurrection Remix Nougat 7.1.2 default kernel. ACCA always crashes very time I set a charging value, tried ACCA and Magisk module none is very persistent with the value I set.
 

Attachments

  • Screenshot_20210905-141146.png
    Screenshot_20210905-141146.png
    31.6 KB · Views: 25

Textilfrenzy

New member
Jul 14, 2018
4
0
Moto 360
Elephone P8000
Hi all! Im trying to use advanced charging controller on my xiaomi a2 lite with lineageos 17.1 and visually it does itss thing (except the battety icon remains with the charging icon) I set the max to 80% and it stops there, but somehow its hard to belive that it doesnt loose 1 % overnight. How can i check of it keeps charging or not? If thats the case what should i change in order to make it work?

Thanks for the help in advance!
 

gorilla p

Recognized Contributor
Nov 30, 2011
3,661
2,833
Milwaukee
Xiaomi Mi Pad 4
OnePlus 9
Im having trouble getting this to work on my OnePlus 9. Its worked find on my OP5/6/7/8 but on this 9, its having trouble.
At first ACC Daemon would run, but no charge stopping on wireless charger.
Now after updating to latest app and ACC version, the Daemon wont stay running and I keep seeing an error on acc -t

:/data/data/com.termux/files/home # acc -t

:/data/data/com.termux/files/home # acc -t

(!) Charger must be plugged to continue...
(i) Alright, this may take a minute or so...

(!) [/sys/devices/platform/soc/ soc:eek:plus,chg_intf /oplus_chg/battery/mmi_charging_enable 1 0] won't work
 

whitedavidp

Senior Member
Jul 31, 2012
581
168
i9100

Good evening.
We have an old Samsung Galaxy S2 GT-i9100, which we are converting to an advanced gps tracker.
However, we have tried everything to look for a file to toggle/switch the charging.
The phone runs the PhilZ kernel with stock android JB, and is rooted.

The files we find under /sys/devices/platform/sec-battery/power_supply/battery are:
batt_current_adc batt_temp_adc_spec current_avg status
batt_current_now batt_temp_check device subsystem
batt_full_check batt_test_value fg_psoc system_rev
batt_lp_charging batt_tmu_status health technology
batt_lpm_state batt_type mp3 temp
batt_soc batt_vfocv online type
batt_temp batt_vol power uevent
batt_temp_adc capacity present video
batt_temp_adc_avg charging_source siop_activated voltage_now

We have tried toggling the lot, resulting in a lot of reboots. The only file to actually stop charging is the "Online" file. But this can only be used to stop charging, not re-enable it. When we try that, the phone reboots.
The chip responsible for the charging (MAX8922) does have a disable function, which is also implemented in the driver code. But we can's seem to find how to switch this from user space.
Does anyone have a clue?
Cheers!
Hi. I have a similar vintage Note I GT-N7000 which is running NightOwl Lineage. Did you ever find an answer?
 

nostromo12

Senior Member
Sep 23, 2008
109
16
Grossenseebach
Installed ACC 1.9.5 on my Pixel 5.
But still high discharge current, when charge limit is reached. ACCA now recognizes load switch sm7250. Thats new! Keep on track guys!
 

whitedavidp

Senior Member
Jul 31, 2012
581
168
i9100

Good evening.
We have an old Samsung Galaxy S2 GT-i9100, which we are converting to an advanced gps tracker.
However, we have tried everything to look for a file to toggle/switch the charging.
The phone runs the PhilZ kernel with stock android JB, and is rooted.

The files we find under /sys/devices/platform/sec-battery/power_supply/battery are:
batt_current_adc batt_temp_adc_spec current_avg status
batt_current_now batt_temp_check device subsystem
batt_full_check batt_test_value fg_psoc system_rev
batt_lp_charging batt_tmu_status health technology
batt_lpm_state batt_type mp3 temp
batt_soc batt_vfocv online type
batt_temp batt_vol power uevent
batt_temp_adc capacity present video
batt_temp_adc_avg charging_source siop_activated voltage_now

We have tried toggling the lot, resulting in a lot of reboots. The only file to actually stop charging is the "Online" file. But this can only be used to stop charging, not re-enable it. When we try that, the phone reboots.
The chip responsible for the charging (MAX8922) does have a disable function, which is also implemented in the driver code. But we can's seem to find how to switch this from user space.
Does anyone have a clue?
Cheers!
Hello. Here is another question. I went looking at the online file as you mention above. I can cat its contents and it seems that 0 is not connected at all, 1 is connected usb, and 3 is connected AC. Is this consistent with your findings? I note the file has permissions all read-only. How did you go about stopping charging with this file? To write to it would require a chmod as it is all read-only. And what did you write to it? Thanks
 

ncsuwolfs

Senior Member
Dec 21, 2013
233
62
Florida
this works perfectly on wall chargers but if i use it plugged into my car the daemon stops running and i have to restart it manually. when its plugged into my car it starts android auto. is this normal?
 

amn1987

Senior Member
Hi all! Im trying to use advanced charging controller on my xiaomi a2 lite with lineageos 17.1 and visually it does itss thing (except the battety icon remains with the charging icon) I set the max to 80% and it stops there, but somehow its hard to belive that it doesnt loose 1 % overnight. How can i check of it keeps charging or not? If thats the case what should i change in order to make it work?

Thanks for the help in advance!
Maybe bypass charging is working in which case battery charge level won't drop. It works in my Poco F1 (voltage limiting based) and older Redmi devices. I keep Redmi 3s plugged in all the time to minimise stress on the battery and the battery charge doesn't budge for days at a time. You can use 3c Battery Manager to keep track of battery current, voltage, temps. etc in the background.
 
  • Like
Reactions: duttyend

VR25

Senior Member
Apr 20, 2013
1,816
4,502
github.com
New approach with Pixel5:
acc -t shoes the switch sm7250_bms/charge_disable 0 1 working
I set this switch with acc -s s="sm7250_bms/charge_disable 0 1"
But result is the same : load stop at 80%, but then high discharge with power attached
wrong command? Little experience with shell commands :-(
Is it the only working switch?
Keep in mind that this is a kernel issue.
I can only do so much to mitigate it.
The actual fix must come from upstream.
Try acc -s s=3700
This instructs acc to use voltage control files to stop charging.
 

VR25

Senior Member
Apr 20, 2013
1,816
4,502
github.com
My phone is making charge plugin sounds often enough.
Infinix Note 2, Resurrection Remix Nougat 7.1.2 default kernel. ACCA always crashes very time I set a charging value, tried ACCA and Magisk module none is very persistent with the value I set.
MediaTek devices are problematic by design.
Upgrade acc and try the following:
acc -t /proc/mtk_battery_cmd/current_cmd 0::0 0::1
If the switch works, set:
acc -s s="/proc/mtk_battery_cmd/current_cmd 0::0 0::1"
 
  • Like
Reactions: duttyend

VR25

Senior Member
Apr 20, 2013
1,816
4,502
github.com
Hi all! Im trying to use advanced charging controller on my xiaomi a2 lite with lineageos 17.1 and visually it does itss thing (except the battety icon remains with the charging icon) I set the max to 80% and it stops there, but somehow its hard to belive that it doesnt loose 1 % overnight. How can i check of it keeps charging or not? If thats the case what should i change in order to make it work?

Thanks for the help in advance!
As long as charging stops (i.e., battery level stops rising), you can ignore charging indicators.
Those are the result of flawed design by OEMs themselves.
If the battery holds its charge overnight, it's operating in idle mode.
Refer to the doc for details.
 
  • Like
Reactions: duttyend

VR25

Senior Member
Apr 20, 2013
1,816
4,502
github.com
Im having trouble getting this to work on my OnePlus 9. Its worked find on my OP5/6/7/8 but on this 9, its having trouble.
At first ACC Daemon would run, but no charge stopping on wireless charger.
Now after updating to latest app and ACC version, the Daemon wont stay running and I keep seeing an error on acc -t

:/data/data/com.termux/files/home # acc -t

:/data/data/com.termux/files/home # acc -t

(!) Charger must be plugged to continue...
(i) Alright, this may take a minute or so...

(!) [/sys/devices/platform/soc/ soc:eek:plus,chg_intf /oplus_chg/battery/mmi_charging_enable 1 0] won't work
Upgrade acc and try acc -t again.
Wireless charging control support is not as common (kernel issue).
Refer to documentation > troubleshooting > charging switch.
 

VR25

Senior Member
Apr 20, 2013
1,816
4,502
github.com
i9100

Good evening.
We have an old Samsung Galaxy S2 GT-i9100, which we are converting to an advanced gps tracker.
However, we have tried everything to look for a file to toggle/switch the charging.
The phone runs the PhilZ kernel with stock android JB, and is rooted.

The files we find under /sys/devices/platform/sec-battery/power_supply/battery are:
batt_current_adc batt_temp_adc_spec current_avg status
batt_current_now batt_temp_check device subsystem
batt_full_check batt_test_value fg_psoc system_rev
batt_lp_charging batt_tmu_status health technology
batt_lpm_state batt_type mp3 temp
batt_soc batt_vfocv online type
batt_temp batt_vol power uevent
batt_temp_adc capacity present video
batt_temp_adc_avg charging_source siop_activated voltage_now

We have tried toggling the lot, resulting in a lot of reboots. The only file to actually stop charging is the "Online" file. But this can only be used to stop charging, not re-enable it. When we try that, the phone reboots.
The chip responsible for the charging (MAX8922) does have a disable function, which is also implemented in the driver code. But we can's seem to find how to switch this from user space.
Does anyone have a clue?
Cheers!
@whitedavidp
Install the latest acc and share the log archive generated by acc -le.
 
  • Like
Reactions: duttyend

VR25

Senior Member
Apr 20, 2013
1,816
4,502
github.com
Hello. Here is another question. I went looking at the online file as you mention above. I can cat its contents and it seems that 0 is not connected at all, 1 is connected usb, and 3 is connected AC. Is this consistent with your findings? I note the file has permissions all read-only. How did you go about stopping charging with this file? To write to it would require a chmod as it is all read-only. And what did you write to it? Thanks
online is a status file.
It cannot be used to [reliably] control charging.
acc -p prints a list of potential charging switches that you can test with acc -t <line> and set set with acc -s s="<line>".
 
  • Like
Reactions: duttyend

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    v2021.11.3 (202111030)
    - Fixed installation issues
    - Improved support for the current Magisk canary.
    - Shutdown warning notifications (mV) are now posted at shutdown_capacity + 100mV (formerly 200).

    DJS has also been upgraded.
    3
    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.
    Run su -c acc -s cs=true on terminal.
    cs is short for capaciy_sync (more details in the readme).
    3
    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"
    2
    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
    That's one of the recently discovered charging switches.
    There might be more, according to the output of acc -p.
    2
    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=
  • 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.