mirror of
https://github.com/chararomandroid/android_device_samsung_a20
synced 2026-08-23 12:35:33 -04:00
universal7885: switch to pixel thermal hal
Signed-off-by: roynatech2544 <whiteshell2544@naver.com>
This commit is contained in:
parent
a544868979
commit
a94e055586
9 changed files with 131 additions and 9 deletions
|
|
@ -1,2 +1,3 @@
|
||||||
soong_namespace {
|
soong_namespace {
|
||||||
|
imports: ["hardware/google/interfaces"],
|
||||||
}
|
}
|
||||||
|
|
|
||||||
103
universal7885-common/configs/thermal_info_config.json
Normal file
103
universal7885-common/configs/thermal_info_config.json
Normal file
|
|
@ -0,0 +1,103 @@
|
||||||
|
{
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -10,6 +10,7 @@ type gps_device, dev_type;
|
||||||
|
|
||||||
# /dev/goodix_fp
|
# /dev/goodix_fp
|
||||||
type goodix_device, dev_type;
|
type goodix_device, dev_type;
|
||||||
|
type thermal_link_device, dev_type;
|
||||||
|
|
||||||
# device.te
|
# device.te
|
||||||
type efs_block_device, dev_type;
|
type efs_block_device, dev_type;
|
||||||
|
|
|
||||||
|
|
@ -223,6 +223,10 @@
|
||||||
/(vendor|system/vendor)/firmware(/.*)? u:object_r:vendor_firmware_file:s0
|
/(vendor|system/vendor)/firmware(/.*)? u:object_r:vendor_firmware_file:s0
|
||||||
/(vendor|system/vendor)/bin/hw/android\.hardware\.power(@[0-9]\.[0-9])?-service\.samsung-libperfmgr u:object_r:hal_power_default_exec:s0
|
/(vendor|system/vendor)/bin/hw/android\.hardware\.power(@[0-9]\.[0-9])?-service\.samsung-libperfmgr u:object_r:hal_power_default_exec: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
|
||||||
|
|
||||||
# SamsungParts
|
# 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\.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
|
/(vendor|system/vendor)/bin/hw/vendor\.eureka\.hardware\.flashlight@1\.0-service u:object_r:hal_flashlight_default_exec:s0
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,11 @@
|
||||||
|
|
||||||
# /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:dir r_dir_perms;
|
||||||
allow hal_thermal_default sysfs_thermal:file r_file_perms;
|
allow hal_thermal_default sysfs_thermal:file rw_file_perms;
|
||||||
r_dir_file(hal_thermal_default, sysfs_virtual)
|
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)
|
||||||
|
|
|
||||||
|
|
@ -18,3 +18,4 @@ vendor_internal_prop(rild_prop)
|
||||||
vendor_internal_prop(vendor_secureos_prop)
|
vendor_internal_prop(vendor_secureos_prop)
|
||||||
vendor_internal_prop(vendor_tzdaemon_prop)
|
vendor_internal_prop(vendor_tzdaemon_prop)
|
||||||
vendor_internal_prop(vendor_tztsdaemon_prop)
|
vendor_internal_prop(vendor_tztsdaemon_prop)
|
||||||
|
vendor_internal_prop(vendor_thermal_prop)
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,9 @@ vendor.wlbtd. u:object_r:vendor_wlbtd_prop:s0
|
||||||
# Wlan
|
# Wlan
|
||||||
vendor.wlan. u:object_r:vendor_wlan_prop:s0
|
vendor.wlan. u:object_r:vendor_wlan_prop:s0
|
||||||
|
|
||||||
|
# Thermal
|
||||||
|
vendor.thermal. u:object_r:vendor_thermal_prop:s0
|
||||||
|
|
||||||
# Hwc
|
# Hwc
|
||||||
hwc.exynos.vsync_mode u:object_r:vendor_hwc_prop:s0
|
hwc.exynos.vsync_mode u:object_r:vendor_hwc_prop:s0
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,3 +17,6 @@ set_prop(vendor_init, persist_data_wda_prop)
|
||||||
set_prop(vendor_init, persist_rmnet_prop)
|
set_prop(vendor_init, persist_rmnet_prop)
|
||||||
get_prop(vendor_init, system_prop)
|
get_prop(vendor_init, system_prop)
|
||||||
get_prop(vendor_init, vendor_radio_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;
|
||||||
|
|
|
||||||
|
|
@ -274,10 +274,13 @@ PRODUCT_SOONG_NAMESPACES += \
|
||||||
hardware/google/pixel \
|
hardware/google/pixel \
|
||||||
hardware/samsung/aidl/power-libperfmgr
|
hardware/samsung/aidl/power-libperfmgr
|
||||||
|
|
||||||
# Thermal
|
# Thermal HAL
|
||||||
PRODUCT_PACKAGES += \
|
PRODUCT_PACKAGES += \
|
||||||
android.hardware.thermal@1.0-impl \
|
android.hardware.thermal@2.0-service.pixel \
|
||||||
android.hardware.thermal@1.0-service
|
thermal_symlinks
|
||||||
|
|
||||||
|
PRODUCT_COPY_FILES += \
|
||||||
|
$(LOCAL_PATH)/configs/thermal_info_config.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config.json
|
||||||
|
|
||||||
# Vibrator
|
# Vibrator
|
||||||
PRODUCT_PACKAGES += \
|
PRODUCT_PACKAGES += \
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue