-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
If anyone is self-compiling lineage ROM then follow this to make battery safer for 24 hours usage (lineage source code). This reduces the possibility to set the slider to charge max for 20 %. No more battery heating etc.
- For pixel 2 (no need compile. Just use lineageos ROM or even stock ROM)
type as adb root
# adb shell setprop persist.vendor.charge.start.level 10
adb shell setprop persist.vendor.charge.stop.level 21
When compiling: works on pixel3 and 3xl. I don't have other devices to test.
project lineage-sdk/
diff --git a/sdk/src/java/lineageos/providers/LineageSettings.java b/sdk/src/java/lineageos/providers/LineageSettings.java
index 98884790..bb7fe8ad 100644
--- a/sdk/src/java/lineageos/providers/LineageSettings.java
+++ b/sdk/src/java/lineageos/providers/LineageSettings.java
@@ -1397,7 +1397,7 @@ public final class LineageSettings {
/** @hide */
public static final Validator CHARGING_CONTROL_LIMIT_VALIDATOR =
- new InclusiveIntegerRangeValidator(70, 100);
+ new InclusiveIntegerRangeValidator(20, 100);
/**
* Whether the battery light should be enabled (if hardware supports it)
project packages/apps/LineageParts/
diff --git a/res/layout/preference_charging_limit.xml b/res/layout/preference_charging_limit.xml
index 2b4c1879..48c2ebe7 100644
--- a/res/layout/preference_charging_limit.xml
+++ b/res/layout/preference_charging_limit.xml
@@ -45,7 +45,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingVertical="15dip"
- android:min="70"
+ android:min="20"
android:max="100" />
</LinearLayout>
-
Now you can open, Settings -> Battery and change the slider to 20 %.
-
Yes, I know https://github.com/VR-25/acc exists but I prefer editing the code.
Metadata
Metadata
Assignees
Labels
No labels