preserve battery health
Change-Id: I95978baffd8134512b4c362993e2f174bb7fcd43
# Permissions for LCD
chown system radio /sys/class/lcd/panel/mcd_mode
chown system media_rw /sys/class/backlight/panel/weakness_hbm_comp
-
+
+ # Restore the previous batt_capacity_max (if it exists)
+ copy /efs/Battery/prev_batt_capacity_max /sys/class/power_supply/battery/batt_capacity_max
+
on property:sys.boot_completed=1
write /proc/sys/vm/dirty_bytes 31457280
write /proc/sys/vm/dirty_background_bytes 15728640
+
+on shutdown
+ # Fix permissions then store the current batt_capacity_max value in the EFS partition
+ chmod 600 /sys/class/power_supply/battery/batt_capacity_max
+ copy /sys/class/power_supply/battery/batt_capacity_max /efs/Battery/prev_batt_capacity_max
+