Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7c284697 authored by Rohit Sekhar's avatar Rohit Sekhar
Browse files

FP6: Setup Lineage Health for charging limit

parent a5f84489
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -211,6 +211,15 @@ PRODUCT_COPY_FILES += \
    frameworks/native/data/etc/android.hardware.keystore.app_attest_key.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.keystore.app_attest_key.xml \
    frameworks/native/data/etc/android.software.device_id_attestation.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.device_id_attestation.xml

# Lineage Health
$(call soong_config_set,lineage_health,charging_control_charging_path,/sys/class/qcom-battery/charge_disable)
$(call soong_config_set,lineage_health,charging_control_charging_enabled,0)
$(call soong_config_set,lineage_health,charging_control_charging_disabled,1)
$(call soong_config_set,lineage_health,charging_control_supports_bypass,false)

PRODUCT_PACKAGES += \
    vendor.lineage.health-service.default

# Linker config
PRODUCT_VENDOR_LINKER_CONFIG_FRAGMENTS += \
    $(LOCAL_PATH)/configs/linker.config.json
+3 −0
Original line number Diff line number Diff line
@@ -610,3 +610,6 @@ subsystem mem_buf_vm

#MMITest usb2
/sys/devices/platform/soc/a600000.ssusb/a600000.dwc3/udc/a600000.dwc3/current_speed     0660   system     system

# Battery
/sys/class/qcom-battery    charge_disable    0660    system  system
+8 −5
Original line number Diff line number Diff line
# Battery
genfscon sysfs /class/qcom-battery                                                                        u:object_r:vendor_sysfs_battery_supply:s0

# Camera
genfscon sysfs /class/debug_ois                                                                           u:object_r:vendor_sysfs_camera:s0

+2 −0
Original line number Diff line number Diff line
allow hal_lineage_health_default vendor_sysfs_battery_supply:file rw_file_perms;
allow hal_lineage_health_default vendor_sysfs_battery_supply:dir r_dir_perms;