From 3eaf5d470c6160a5a0f1291b5b569c3dadd08ea0 Mon Sep 17 00:00:00 2001 From: VR-25 <28943176+VR-25@users.noreply.github.com> Date: Mon, 20 Sep 2021 10:52:30 +0100 Subject: [PATCH] **v2021.9.20 (202109200)** - General enhancements - Manual capacitySync toggle (`[capacity_sync|cs] = [true|false]`) - it overrides the automatic. Both include the `freeze at 2%` feature. This is the actual `capacity_freeze2` replacement now. `capacity_mask` implies `capacity_sync`. - Unlike in previous versions, changes to `capacity_mask` and `capacity_sync` take effect (within a few seconds) without a daemon restart. - Updated documentation --- README.html | 59 ++++++++++++++++++--------- README.md | 75 +++++++++++++++++++++++++--------- acc/accd.sh | 93 +++++++++++++++++++++++++++++++++--------- acc/default-config.txt | 26 ++++++++---- acc/misc-functions.sh | 27 ------------ acc/print-config.sh | 3 +- acc/set-prop.sh | 5 ++- acc/write-config.sh | 5 ++- module.prop | 4 +- 9 files changed, 195 insertions(+), 102 deletions(-) diff --git a/README.html b/README.html index 8403b80..3426ac3 100644 --- a/README.html +++ b/README.html @@ -79,6 +79,7 @@
#DC#
-configVerCode=202109190
-capacity=(-1 60 70 75 false)
+configVerCode=202109200
+capacity=(-1 60 70 75 false false)
temperature=(40 60 90 65)
cooldownRatio=()
cooldownCurrent=
@@ -319,16 +320,16 @@ DEFAULT CONFIGURATION
# NOTES
-# The daemon does not have to be restarted after making changes to this file - unless one of the changes is capacity_mask or charging_switch.
+# The daemon does not have to be restarted after making changes to this file - unless one of the changes is charging_switch.
-# Changes to current_workaround (cw) only take effect after an acc [re]initialization (install, upgrade or accd --init) or system reboot.
+# A change to current_workaround (cw) only takes effect after an acc [re]initialization (install, upgrade or "accd --init") or system reboot.
-# If those 3 variables are updated with "acc --set", accd is restarted automatically (--init is implied as needed).
+# If those 2 variables are updated with "acc --set" (not acca --set), accd is restarted automatically (--init is implied as needed).
# BASICS
-# capacity=(shutdown_capacity cooldown_capacity resume_capacity pause_capacity capacity_mask)
+# capacity=(shutdown_capacity cooldown_capacity resume_capacity pause_capacity capacity_sync capacity_mask)
# temperature=(cooldown_temp max_temp max_temp_pause shutdown_temp)
@@ -374,6 +375,7 @@ DEFAULT CONFIGURATION
# cc cooldown_capacity
# rc resume_capacity
# pc pause_capacity
+# cs capacity_sync
# cm capacity_mask
# sc shutdown_capacity
@@ -466,10 +468,16 @@ DEFAULT CONFIGURATION
# pause_capacity (pc) #
# Capacity or voltage_now_millivolts at which charging should pause.
+# capacity_sync (cs) #
+# Some devices, notably from the Pixel lineup, have a capacity discrepancy issue between Android and the kernel.
+# This forces Android to report the actual battery capacity supplied by the kernel.
+# The discrepancy is usually detected and corrected automatically by accd.
+# This setting overrides the automatic behavior.
+# Besides, it also prevents Android from getting capacity readings below 2%, since some systems shutdown before battery level actually drops to 0%.
+
# capacity_mask (cm) #
-# This forces Android to report "capacity = capacity * (100 / pause_capacity)", effectively masking capacity limits.
-# It also prevents Android from getting capacity readings below 2% (because some systems shutdown before battery level actually drops to 0%).
-# A daemon restart is required after changing this (automated by "acc --set").
+# This forces Android to report "capacity = capacity * (100 / pause_capacity)", effectively masking capacity limits (more like capacity_sync on steroids).
+# It also prevents Android from getting capacity readings below 2%, since some systems shutdown before battery level actually drops to 0%.
# cooldown_temp (ct) #
# Temperature (°C) at which the cooldown cycle starts.
@@ -894,13 +902,26 @@ The Output of --info
POWER_NOW=0 # (CURRENT_NOW * VOLTAGE_NOW) (Watts)
Note that the power information refers to what is actually supplied to the battery, not what's coming from the adapter.
External power is always converted before it reaches the battery.
+Profiles
+Those are simply different config files.
+A config path can be supplied as first argument to acca
and second to accd
executables.
+Examples:
+Copy the config:
+Current config: /dev/.vr25/acc/acca --config cat > /path/to/new/file
+Default config: /dev/.vr25/acc/acca /path/to/new/file --version
(--version
can be replaced with any option + arguments, as seen below.)
+Edit the copy:
+/dev/.vr25/acc/acca /path/to/new/file --set pause_capacity=75 resume_capacity=70
(if the file does not exist, it is created as a copy of the default config.)
+Use the copy:
+/dev/.vr25/acc/accd --init /path/to/new/file
(the daemon is restarted with the new config.)
+Back to the main config:
+/dev/.vr25/acc/accd --init
More
ACC daemon does not have to be restarted after making changes to the config.
It picks up new changes within seconds.
There are a few exceptions:
-capacity_mask
(cm
) and charging_switch
(s
) requires a daemon restart.
-current_workaround
(cw
) requires accd --init
.
+charging_switch
(s
) requires a daemon restart (/dev/.vr25/acc/accd
).
+current_workaround
(cw
) requires a full re-initialization (/dev/.vr25/acc/accd --init
).
This information is in the default configuration section as well.
@@ -908,7 +929,7 @@ TROUBLESHOOTING
Battery Capacity (% Level) Doesn't Seem Right
When Android's battery level differs from that of the kernel, ACC daemon automatically syncs it by stopping the battery service and feeding it the real value every few seconds.
Pixel devices are known for having battery level discrepancies for the longest time.
-If your device shuts down before the battery is actually empty, capacity_mask may help.
+
If your device shuts down before the battery is actually empty, capacity_sync or capacity_mask may help.
Refer to the default configuration section above for details.
Bootloop
While uncommon, it may happen.
@@ -1202,13 +1223,6 @@ LINKS
LATEST CHANGES
-v2021.8.31 (202108310)
-
-- Additional charging switches
-- Fixed "current_now is always 0 mA."
-- Logs are exported as a tarball archive.
-- Updated readme > notes/tips for front-end developers > initializing acc
-
v2021.9.5 (202109050)
- Additional charging switches (including a group of 3 for OnePlus that allegedly enable idle mode)
@@ -1230,6 +1244,13 @@ LATEST CHANGES
- Support for "volatile" plugins (gone on reboot, useful for debugging):
/dev/.vr25/acc/plugins/
- Updated documentation (mainly tips > idle mode and alternatives)
- Upgrade rollback feature (
-b|--rollback
or wizard option f
)
+
+v2021.9.20 (202109200)
+
+- General enhancements
+- Manual capacitySync toggle (
[capacity_sync|cs] = [true|false]
) - it overrides the automatic. Both include the freeze at 2%
feature. This is the actual capacity_freeze2
replacement now. capacity_mask
implies capacity_sync
.
+- Unlike in previous versions, changes to
capacity_mask
and capacity_sync
take effect (within a few seconds) without a daemon restart.
+- Updated documentation