Search This thread

nostromo12

Senior Member
Sep 23, 2008
111
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
2,015
4,932
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
111
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
17
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: 36

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,698
2,854
STL
Xiaomi Mi Pad 4
OnePlus Nord N10 5G
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
632
185
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
111
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
632
185
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
2,015
4,932
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
2,015
4,932
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
2,015
4,932
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.
 

VR25

Senior Member
Apr 20, 2013
2,015
4,932
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
2,015
4,932
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
2,015
4,932
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.
  • 2
    Macro to write some values like batt. temperature, charging current, charging voltage, batt. percentage, selected acc-config parameters, etc. to a. txt file during charging

    This post is an update to a previous post here, providing a MacroDroid macro to monitor during charging some related parameters over the time depending on the respective acc settings.

    If you want to use the macro, download it, rename it to .macro and import it. It will start automatically when the charger is plugged.

    First, read the explanations already given here.

    Then, see the long comment at the very end of the macro, trying to explain the used variables and which / how to modify.

    Since I haven't logged all changes I made since the last release, the following summary might be too long / too short, sorry:

    - different output directory can be defined in the variable

    - output directory is created if not already present

    - macro checks if charging follows the config or follows an acc -f command

    - even for a charging following an acc -f xx -s yy command the defined values (like target capacity xx or additional limits defined in the yy term) are reported

    - variables to be reported can be (dis-)activated in the array variable

    - loop to repeat reading of charging voltage if reading was not successful

    - configurable warning if charging was started but macro has detected that acc daemon is not running


    - configurable auto-activation of acc daemon if if charging was started but macro has detected that acc daemon is not running

    😉
    1
    Hello,

    I woud like to use acc to bypass battery, so that the phone runs off the charger instead of the battery, to conserve it's life esperance.
    I do stuff that makes my battery runs very hot, I thought with this method since it bypass the charger I could not only reduce the temperature, but also reducing the number of cycle.
    I have a motorola 40 edge pro phone, which do posses that "bypass battery" functionnality. It's called "Battery optimisation" under motorola stock rom, and basically, it learns your phone charging pattern, so that when you plug in at night, it charges only up to 80%, and use the charger to run the phone (I could tell because it's constantly 0mAH in accubattery). Then, when you're supposed to wake up, it charges till 100%. Thefore the functionnality is indeed present, but do not allow much user control.

    Anyway, I'm trying to reproduce that through acc. At first, even the basic core functionality didn't work for me, I had to switch to switch 1. Now it's fine, but I still can't get battery idle (the 0mAH ) to work.
    I tried emulated "idle mode", but I feel it's not very satisfactory? I set acc 65 64, and what it does it that it simply charge to 65, discharge to 64, and continusly. Considering my usage (let's say gaming), does that makes any difference from just running on battery to 30% and then charging to 60%? Basically a lot of small cycle vs a bigger one (but not as big as 100 0), the impact on the battery should be quite similar? Also, when running high CPU usage process, the battery does get hot. But then, even with small cycles, I'm still charging it therefore increasing temperature?

    Would like your opinion on that please, also if you have any idea how to make idle battery work (since my phone does support the functionnality), I would also be very happy to hear your feedbacks.

    Thank you !
    1
    O. K.
    I would have recommended you
    1) deinstall all front-ends
    2) update in the terminal via acc -u -f dev
    3) try if it works
    🤠
    1
    Thanks for the link. Just installed, still can't get true idle mode to work :/ only one switch with has battery idle=true, I selected that one but then I still get the continuous discharge and not 0mah.
    1
    ACC- Front-End // Your help is appreciated!

    I have made (for fun) a MacroDroid* based front-end for ACC and consider to make it available for others who are interested.
    Before doing so, I would need two or three guys for testing to get feedback how the front-end works on other devices than mine.

    You should:
    - have already some experience with configuring ACC via the terminal
    - have no issues with your actual ACC configuration
    - have installed the MacroDroid app (or are willing to do so which requires to grant root access** to it) - Pro-version is not needed

    edit:
    * take note that Jamie, the developer of MacroDroid, is also an XDA member having an own thread for MacroDroid
    **if granting root access is a concern for you: root is needed since MacroDroid has to pass acc commands to the shell as ACC does (which also requires root as you know 😁); however internet access of MacroDroid can be prohibited with a firewall (e. g. AFWall+) and is nevertheless working fine.

    If this fits and if you want to help me, please send me a private message.

    Features of the Front-End:

    - read / modify most acc variables (30+)
    - directly see the default values
    - get dev's help text for the acc variables
    - backup / restore your config
    - return to default config
    - background / manual acc update checks
    - direct upgrade / rollback of acc builds
    - start / stop the daemon (idle mode)
    - enhanced one-time charging (acc -f)
    - add / modify /delete time profiles
    - test / set all or selected charg. switches
    - (de-)activate selected charg. switches
    - get static / dynamic (dis-)charging info
    - show full / filtered config info
    - create full / short acc logs
    - execute pasted terminal commands
    - write outputs / results into files
    - define directories for output writings

    🤠
  • 280
    Repository
    Source Code and Documentation
    Releases

    Front-ends (outdated -- no longer supported)
    ACC App (AccA)
    ACC Settings
    79
    Archive
    Find newer zips here.
    41
    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.