diff --git a/universal7885-common/Android.bp b/universal7885-common/Android.bp index 5157a47..9515b25 100644 --- a/universal7885-common/Android.bp +++ b/universal7885-common/Android.bp @@ -1,3 +1,2 @@ soong_namespace { - imports: ["hardware/google/interfaces"], } diff --git a/universal7885-common/configs/thermal_info_config.json b/universal7885-common/configs/thermal_info_config.json deleted file mode 100644 index 143689d..0000000 --- a/universal7885-common/configs/thermal_info_config.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "Sensors": [ - { - "Name": "BIG", - "Type": "CPU", - "HotThreshold": [ - "NAN", - "NAN", - "NAN", - 91.0, - "NAN", - "NAN", - 115.0 - ], - "VrThreshold": "NAN", - "Multiplier": 0.001 - }, - { - "Name": "LITTLE", - "Type": "CPU", - "HotThreshold": [ - "NAN", - "NAN", - "NAN", - 91.0, - "NAN", - "NAN", - 115.0 - ], - "VrThreshold": "NAN", - "Multiplier": 0.001 - }, - { - "Name": "G3D", - "Type": "GPU", - "HotThreshold": [ - "NAN", - "NAN", - "NAN", - 91.0, - "NAN", - "NAN", - 115.0 - ], - "VrThreshold": "NAN", - "Multiplier": 0.001 - }, - { - "Name": "ac", - "Type": "USB_PORT", - "HotThreshold": [ - "NAN", - "NAN", - "NAN", - "NAN", - "NAN", - "60.0", - "NAN" - ], - "HotHysteresis": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 5.0, - 0.0 - ], - "VrThreshold": "NAN", - "Multiplier": 0.001, - "Monitor": true - }, - { - "Name": "battery", - "Type": "BATTERY", - "HotThreshold": [ - "NAN", - "NAN", - "NAN", - "NAN", - "NAN", - "NAN", - 60.0 - ], - "VrThreshold": "NAN", - "Multiplier": 0.001 - } - ], - "CoolingDevices": [ - { - "Name": "thermal-cpufreq-0", - "Type": "CPU" - }, - { - "Name": "thermal-cpufreq-1", - "Type": "CPU" - }, - { - "Name": "thermal-gpufreq-0", - "Type": "GPU" - } - ] -} diff --git a/universal7885-common/sepolicy/vendor/device.te b/universal7885-common/sepolicy/vendor/device.te index f4fe3f4..55c2674 100644 --- a/universal7885-common/sepolicy/vendor/device.te +++ b/universal7885-common/sepolicy/vendor/device.te @@ -13,7 +13,6 @@ type gps_device, dev_type; # /dev/goodix_fp type goodix_device, dev_type; -type thermal_link_device, dev_type; # device.te type efs_block_device, dev_type; diff --git a/universal7885-common/sepolicy/vendor/file_contexts b/universal7885-common/sepolicy/vendor/file_contexts index 66bb93b..d6f1541 100644 --- a/universal7885-common/sepolicy/vendor/file_contexts +++ b/universal7885-common/sepolicy/vendor/file_contexts @@ -217,11 +217,6 @@ /(vendor|system/vendor)/bin/hw/vendor\.samsung\.hardware\.gnss@[0-9]\.[0-9]-service u:object_r:hal_gnss_default_exec:s0 /(vendor|system/vendor)/firmware(/.*)? u:object_r:vendor_firmware_file:s0 -# Thermal -/(vendor|system/vendor)/bin/hw/android\.hardware\.thermal@2\.0-service\.pixel u:object_r:hal_thermal_default_exec:s0 -/dev/thermal(/.*)? u:object_r:thermal_link_device:s0 -/vendor/bin/thermal_symlinks u:object_r:init-thermal-symlinks-sh_exec:s0 - # SamsungParts /(vendor|system/vendor)/bin/hw/vendor\.eureka\.hardware\.battery@1\.0-service u:object_r:hal_battery_default_exec:s0 /(vendor|system/vendor)/bin/hw/vendor\.eureka\.hardware\.flashlight@1\.0-service u:object_r:hal_flashlight_default_exec:s0 diff --git a/universal7885-common/sepolicy/vendor/hal_thermal_default.te b/universal7885-common/sepolicy/vendor/hal_thermal_default.te index 2fad199..759bdb0 100644 --- a/universal7885-common/sepolicy/vendor/hal_thermal_default.te +++ b/universal7885-common/sepolicy/vendor/hal_thermal_default.te @@ -1,12 +1,8 @@ + +# /acct/tasks +allow hal_thermal_default cgroup:file getattr; + +# /sys/devices/virtual/thermal/ allow hal_thermal_default sysfs_thermal:dir r_dir_perms; -allow hal_thermal_default sysfs_thermal:file rw_file_perms; -allow hal_thermal_default sysfs_thermal:lnk_file r_file_perms; -allow hal_thermal_default thermal_link_device:dir r_dir_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; - -hal_client_domain(hal_thermal_default, hal_power); - -get_prop(hal_thermal_default, vendor_thermal_prop) -allow hal_thermal_default sysfs_virtual:dir search; +allow hal_thermal_default sysfs_thermal:file r_file_perms; +r_dir_file(hal_thermal_default, sysfs_virtual) diff --git a/universal7885-common/sepolicy/vendor/init-thermal-symlinks.sh.te b/universal7885-common/sepolicy/vendor/init-thermal-symlinks.sh.te deleted file mode 100644 index 4ed667a..0000000 --- a/universal7885-common/sepolicy/vendor/init-thermal-symlinks.sh.te +++ /dev/null @@ -1,11 +0,0 @@ -type init-thermal-symlinks-sh, domain; -type init-thermal-symlinks-sh_exec, exec_type, vendor_file_type, file_type; -init_daemon_domain(init-thermal-symlinks-sh) -allow init-thermal-symlinks-sh vendor_toolbox_exec:file rx_file_perms; -allow init-thermal-symlinks-sh thermal_link_device:dir rw_dir_perms; -allow init-thermal-symlinks-sh thermal_link_device:lnk_file create_file_perms; -allow init-thermal-symlinks-sh sysfs_thermal:dir r_dir_perms; -allow init-thermal-symlinks-sh sysfs_thermal:file r_file_perms; -allow init-thermal-symlinks-sh sysfs_thermal:lnk_file r_file_perms; -set_prop(init-thermal-symlinks-sh, vendor_thermal_prop) -allow init-thermal-symlinks-sh sysfs_virtual:dir search; diff --git a/universal7885-common/sepolicy/vendor/property.te b/universal7885-common/sepolicy/vendor/property.te index 37901cc..a8e2bca 100644 --- a/universal7885-common/sepolicy/vendor/property.te +++ b/universal7885-common/sepolicy/vendor/property.te @@ -18,4 +18,3 @@ vendor_internal_prop(rild_prop) vendor_internal_prop(vendor_secureos_prop) vendor_internal_prop(vendor_tzdaemon_prop) vendor_internal_prop(vendor_tztsdaemon_prop) -vendor_internal_prop(vendor_thermal_prop) diff --git a/universal7885-common/sepolicy/vendor/property_contexts b/universal7885-common/sepolicy/vendor/property_contexts index c856519..15e878e 100644 --- a/universal7885-common/sepolicy/vendor/property_contexts +++ b/universal7885-common/sepolicy/vendor/property_contexts @@ -65,9 +65,6 @@ vendor.wlbtd. u:object_r:vendor_wlbtd_prop:s0 # Wlan vendor.wlan. u:object_r:vendor_wlan_prop:s0 -# Thermal -vendor.thermal. u:object_r:vendor_thermal_prop:s0 - # Hwc hwc.exynos.vsync_mode u:object_r:vendor_hwc_prop:s0 diff --git a/universal7885-common/sepolicy/vendor/vendor_init.te b/universal7885-common/sepolicy/vendor/vendor_init.te index 55007a4..53db827 100644 --- a/universal7885-common/sepolicy/vendor/vendor_init.te +++ b/universal7885-common/sepolicy/vendor/vendor_init.te @@ -17,8 +17,3 @@ set_prop(vendor_init, persist_data_wda_prop) set_prop(vendor_init, persist_rmnet_prop) get_prop(vendor_init, system_prop) get_prop(vendor_init, vendor_radio_prop) - -allow vendor_init thermal_link_device:dir r_dir_perms; -allow vendor_init thermal_link_device:lnk_file r_file_perms; -get_prop(vendor_init, vts_status_prop) - diff --git a/universal7885-common/universal7885-common.mk b/universal7885-common/universal7885-common.mk index 6d5fbf5..8482fc2 100644 --- a/universal7885-common/universal7885-common.mk +++ b/universal7885-common/universal7885-common.mk @@ -292,13 +292,10 @@ PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/configs/sysconfig/pixel_eureka.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/sysconfig/pixel_eureka.xml -# Thermal HAL +# Thermal PRODUCT_PACKAGES += \ - android.hardware.thermal@2.0-service.pixel \ - thermal_symlinks - -PRODUCT_COPY_FILES += \ - $(LOCAL_PATH)/configs/thermal_info_config.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config.json + android.hardware.thermal@1.0-impl \ + android.hardware.thermal@1.0-service # Vibrator PRODUCT_PACKAGES += \