sm6375-common: Build Lineage Health

This commit is contained in:
Andy | アンディ
2023-09-14 14:58:03 +08:00
parent f89889da20
commit 9a202f1a3b
4 changed files with 16 additions and 0 deletions

View File

@@ -117,7 +117,14 @@ TARGET_USES_ION := true
TARGET_DISABLED_UBWC := true
# Lineage Health
ifneq ($(wildcard hardware/*/interfaces/health),)
TARGET_HEALTH_CHARGING_CONTROL_SUPPORTS_BYPASS := false
TARGET_HEALTH_CHARGING_CONTROL_CHARGING_PATH := /sys/class/power_supply/battery/input_suspend
TARGET_HEALTH_CHARGING_CONTROL_CHARGING_ENABLED := 0
TARGET_HEALTH_CHARGING_CONTROL_CHARGING_DISABLED := 1
BOARD_VENDOR_SEPOLICY_DIRS += $(COMMON_PATH)/sepolicy/vendor/lineage_health
endif
# Partitions
BOARD_BOOTIMAGE_PARTITION_SIZE := 134217728

View File

@@ -328,8 +328,10 @@ PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.software.vulkan.deqp.level-2020-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.vulkan.deqp.level.xml
# Lineage Health
ifneq ($(wildcard hardware/*/interfaces/health),)
PRODUCT_PACKAGES += \
vendor.lineage.health-service.default
endif
# Power
PRODUCT_PACKAGES += \

View File

@@ -489,3 +489,6 @@ firmware_directories /vendor/firmware_mnt/image/
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* in_temp_raw 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* in_temp_scale 0664 system system
/sys/devices/platform/soc/*.i2c/i2c-*/*-*/iio:device* in_temp_scale_available 0664 system system
# Charger
/sys/class/power_supply/battery input_suspend 0660 system system

View File

@@ -0,0 +1,4 @@
rw_dir_file(hal_lineage_health_default, vendor_sysfs_battery_supply)
r_dir_file(hal_lineage_health_default, sysfs_batteryinfo)
allow hal_lineage_health_default sysfs_batteryinfo:file rw_file_perms;