sm6375-common: Switch to Thermal 2.0 mock

* QTI Thermal couldn't read the temperature for some reason
* sepolicy: Adjust sepolicy for thermal

Change-Id: Idea1bcdea070913ef35b699fafd1242d740453a9
This commit is contained in:
EcrosoftXiao 2024-07-19 12:56:42 +05:30 committed by Anand S
parent 03607b1959
commit 8c48cfa833
No known key found for this signature in database
GPG key ID: 3B2983FA448B3D61
7 changed files with 23 additions and 5 deletions

View file

@ -465,7 +465,7 @@ PRODUCT_COPY_FILES += \
# Thermal # Thermal
PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \
android.hardware.thermal@2.0-service.qti \ android.hardware.thermal@2.0-service.mock \
android.hardware.thermal@2.0 \ android.hardware.thermal@2.0 \
android.hardware.thermal@2.0.vendor android.hardware.thermal@2.0.vendor

View file

@ -92,6 +92,7 @@
# Thermal # Thermal
/dev/mmi_sys_temp u:object_r:vendor_thermal_device:s0 /dev/mmi_sys_temp u:object_r:vendor_thermal_device:s0
/(vendor|system/vendor)/bin/hw/android\.hardware\.thermal@2\.0-service\.mock u:object_r:hal_thermal_default_exec:s0
# Vendor init scripts # Vendor init scripts
/(vendor|system/vendor)/bin/load_touch\.sh u:object_r:vendor_qti_init_shell_exec:s0 /(vendor|system/vendor)/bin/load_touch\.sh u:object_r:vendor_qti_init_shell_exec:s0

View file

@ -0,0 +1,8 @@
allow hal_thermal_default sysfs_thermal:dir r_dir_perms;
allow hal_thermal_default sysfs_thermal:file rw_file_perms;
allow hal_thermal_default proc_stat:file r_file_perms;
allow hal_thermal_default self:netlink_kobject_uevent_socket create_socket_perms_no_ioctl;
# read thermal config
get_prop(hal_thermal_default, vendor_thermal_prop)

View file

@ -8,3 +8,6 @@ vendor_internal_prop(vendor_mot_nfc_prop);
# Power # Power
vendor_internal_prop(vendor_power_prop) vendor_internal_prop(vendor_power_prop)
# Thermal engine
vendor_internal_prop(vendor_thermal_prop)

View file

@ -24,3 +24,6 @@ vendor.hw.fingerprint.status u:object_r:vendor_mot_fingerprint
# Power # Power
vendor.powerhal. u:object_r:vendor_power_prop:s0 vendor.powerhal. u:object_r:vendor_power_prop:s0
# Thermal engine
vendor.thermal.config u:object_r:vendor_thermal_prop:s0

7
sepolicy/vendor/thermal-engine.te vendored Normal file
View file

@ -0,0 +1,7 @@
allow vendor_thermal-engine { proc_stat proc_loadavg }:file r_file_perms;
allow vendor_thermal-engine vendor_thermal_device:chr_file rw_file_perms;
rw_dir_file(vendor_thermal-engine, vendor_sysfs_battery_supply)
rw_dir_file(vendor_thermal-engine, vendor_sysfs_usb_supply)
set_prop(vendor_thermal-engine, vendor_thermal_prop);
r_dir_file(vendor_thermal-engine, sysfs_thermal)

View file

@ -1,4 +0,0 @@
allow vendor_thermal-engine { proc_stat proc_loadavg }:file r_file_perms;
allow vendor_thermal-engine vendor_thermal_device:chr_file rw_file_perms;
r_dir_file(vendor_thermal-engine, vendor_sysfs_battery_supply)
r_dir_file(vendor_thermal-engine, vendor_sysfs_usb_supply)