From 18e033d2cd3abbfeceaeae001b34c3d24c346f00 Mon Sep 17 00:00:00 2001 From: VR-25 <28943176+VR-25@users.noreply.github.com> Date: Sat, 8 Jan 2022 08:27:09 +0100 Subject: [PATCH] **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. --- META-INF/com/google/android/update-binary | 8 +++-- README.html | 38 +++++++++++++++++------ README.md | 32 +++++++++++++------ acc/acc.sh | 10 +++--- acc/accd.sh | 13 +++++--- acc/batt-info.sh | 25 ++++++--------- acc/batt-interface.sh | 22 ++++++++----- acc/ctrl-files.sh | 6 ++++ acc/default-config.txt | 3 +- acc/misc-functions.sh | 38 +++++++++++++++++------ acc/oem-custom.sh | 8 +++++ acc/post-fs-data.sh | 12 ------- acc/read-ch-curr-ctrl-files-p2.sh | 5 +-- acc/strings.sh | 5 +-- acc/translations/id/strings.sh | 4 --- build.sh | 11 ++++--- customize.sh | 8 +++-- install.sh | 8 +++-- module.prop | 4 +-- 19 files changed, 160 insertions(+), 100 deletions(-) delete mode 100644 acc/post-fs-data.sh diff --git a/META-INF/com/google/android/update-binary b/META-INF/com/google/android/update-binary index 81587b4..919aa61 100644 --- a/META-INF/com/google/android/update-binary +++ b/META-INF/com/google/android/update-binary @@ -1,6 +1,6 @@ #!/system/bin/sh # $id Installer/Upgrader -# Copyright 2019-2021, VR25 +# Copyright 2019-2022, VR25 # License: GPLv3+ # # devs: triple hashtags (###) mark non-generic code @@ -146,7 +146,7 @@ fi ### echo "$name $version ($versionCode) -Copyright 2017-2021, $author +Copyright 2017-2022, $author GPLv3+ (i) Installing in $installDir/$id/..." @@ -280,4 +280,8 @@ esac # initialize $id /data/adb/$domain/$id/service.sh --init +[ $(date +%m%d) -gt 110 ] || su -lp 2000 -c "/system/bin/cmd notification post -S bigtext -t 'ACC' 'Tag' \"Happy New Year!\"" < /dev/null > /dev/null 2>&1 + +rm $data_dir/curr $data_dir/warn 2>/dev/null ### + exit 0 diff --git a/README.html b/README.html index ce12860..41d4930 100644 --- a/README.html +++ b/README.html @@ -125,7 +125,7 @@
Copyright 2017-2021, VR25
+Copyright 2017-2022, VR25
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or @@ -284,7 +284,7 @@
#DC#
-configVerCode=202111030
+configVerCode=202201010
capacity=(-1 60 70 75 false false)
temperature=(40 60 90 65)
cooldownRatio=()
@@ -461,7 +461,6 @@ DEFAULT CONFIGURATION
# shutdown_capacity (sc) #
# When the battery is discharging and its capacity/voltage_now_millivolts <= sc and phone has been running for 15 minutes or more, acc daemon turns the phone off to reduce the discharge rate and protect the battery from potential damage induced by voltage below the operating range.
# sc=-1 disables it.
-# [Beta] if the file /data/adb/vr25/acc-data/warn exists, accd posts Android shutdown warning notifications at sc + 5% or sc + 100 mV.
# cooldown_capacity (cc) #
# Capacity/voltage_now_millivolts at which the cooldown cycle starts.
@@ -770,6 +769,7 @@ Terminal Commands
acc -t /proc/mtk_battery_cmd/current_cmd 0::0 0::1 /proc/mtk_battery_cmd/en_power_path 1 0 ("::" is a placeholder for " " - MTK only)
-t|--test [file] Test charging switches from a file (default: /dev/.vr25/acc/ch-switches)
+ Control files that trigger reboots or kernel panics are automatically backlisted
e.g.,
acc -t (test known switches)
acc -t /sdcard/experimental_switches.txt (test custom/foreign switches)
@@ -1016,7 +1016,19 @@ Diagnostics/Logs
The logs do not contain any personal information and are never automatically sent to the developer.
Automatic exporting (local) happens under specific conditions (refer back to SETUP/USAGE > Terminal Commands > Exit Codes
).
Finding Additional/Potential Charging Switches Quickly
-Refer to (search for) the --parse
option in the terminal commands section.
+
+-
+
Generate a list of potential charging switches: acc -p > /sdcard/acc-p.txt
.
+
+-
+
Remove from the list, all lines that you're SURE don't resemble a charging switch.
+
+-
+
Test all: acc -t /sdcard/acc-p.txt
.
+
+
+Note that some control files may trigger reboots or kernel panics.
+ACC automatically blacklists these, so that the user can continue testing (step 2) after each reboot.
Install, Upgrade, Stop and Restart Processes Seem to Take Too Long
The daemon stop process implies complete reversal of changes made to the charging management system.
Sometimes, this requires the charger to be plugged.
@@ -1161,6 +1173,7 @@
FREQUENTLY ASKED QUESTIONS (FAQ)
With modern battery management systems, that's generally unnecessary.
However, if your battery is underperforming, you may want to try the procedure described at https://batteryuniversity.com/article/bu-603-how-to-calibrate-a-smart-battery .
+ACC automatically optimizes system performance and battery utilization, by forcing bg-dexopt-job
on daemon [re]start, if charging.
I set voltage to 4080 mV and that corresponds to just about 75% charge.
But is it typically safer to let charging keep running, or to have the circuits turn on and shut off between defined percentage levels repeatedly?
@@ -1243,12 +1256,6 @@ LINKS
LATEST CHANGES
-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).
-
v2021.12.14 (202112140)
- Additional charging switches;
@@ -1269,6 +1276,17 @@ LATEST CHANGES
- [ctrl-files]: added
battery/op_disable_charge 0 1
switch;
- [README]: updated troubleshooting section;
- General optimizations.
+
+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.