type pm_qos_device, dev_type;
type radio_qos_device, dev_type;
type ssp_device, dev_type;
+type thermal_link_device, dev_type;
type vendor_radio_device, dev_type;
/dev/esfp[0-9] u:object_r:fp_sensor_device:s0
/dev/batch_io u:object_r:io_device:s0
/dev/ssp_sensorhub u:object_r:ssp_device:s0
+/dev/thermal(/.*)? u:object_r:thermal_link_device:s0
# bluetooth
/dev/ttySAC[0-9] u:object_r:bt_device:s0
### VENDOR
/(vendor|system/vendor)/bin/cbd u:object_r:cbd_exec:s0
/(vendor|system/vendor)/bin/secril_config_svc u:object_r:secril_config_svc_exec:s0
+/(vendor|system/vendor)/bin/thermal_symlinks\.samsung u:object_r:init-thermal-symlinks-sh_exec:s0
/(vendor|system/vendor)/bin/hw/gpsd u:object_r:gpsd_exec:s0
/(vendor|system/vendor)/bin/hw/lhd u:object_r:lhd_exec:s0
--- /dev/null
+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)
vendor_restricted_prop(vendor_hwc_prop)
vendor_internal_prop(vendor_radio_prop)
vendor_internal_prop(vendor_fastcharge_prop)
+vendor_internal_prop(vendor_thermal_prop)
vendor_internal_prop(vendor_wifi_prop)
### fastcharge
persist.vendor.sec.fastchg_enabled u:object_r:vendor_fastcharge_prop:s0
+## thermal
+vendor.thermal. u:object_r:vendor_thermal_prop:s0
+
### wifi
vendor.wifi. u:object_r:vendor_wifi_prop:s0
ro.vendor.wifi. u:object_r:vendor_wifi_prop:s0