mirror of
https://github.com/Evolution-X-Devices/device_xiaomi_rosemary
synced 2026-01-27 18:07:31 +00:00
40 lines
1.1 KiB
Plaintext
40 lines
1.1 KiB
Plaintext
type mi_thermald, domain;
|
|
type mi_thermald_exec, exec_type, vendor_file_type, file_type;
|
|
type thermal_data_file, data_file_type, file_type;
|
|
|
|
vendor_public_prop(thermal_engine_prop)
|
|
|
|
init_daemon_domain(mi_thermald)
|
|
|
|
allow mi_thermald self:capability { fsetid sys_boot };
|
|
allow mi_thermald mi_thermald:capability { chown fowner };
|
|
allow mi_thermald mi_thermald:capability2 { wake_alarm block_suspend };
|
|
|
|
# Allow mi_thermald to read thermal_core_data_file
|
|
allow mi_thermald thermal_core_data_file:dir rw_dir_perms;
|
|
allow mi_thermald thermal_core_data_file:file create_file_perms;
|
|
|
|
allow mi_thermald sysfs_batteryinfo:dir { search };
|
|
allow mi_thermald sysfs_batteryinfo:file r_file_perms;
|
|
|
|
r_dir_file(mi_thermald, sysfs)
|
|
r_dir_file(mi_thermald, sysfs_leds)
|
|
r_dir_file(mi_thermald, sysfs_therm)
|
|
r_dir_file(mi_thermald, sysfs_thermal)
|
|
r_dir_file(mi_thermald, sysfs_power_supply)
|
|
|
|
# Allow mi_thermald to read and write to sysfs_*
|
|
allow mi_thermald {
|
|
sysfs
|
|
sysfs_leds
|
|
sysfs_therm
|
|
sysfs_thermal
|
|
sysfs_power_supply
|
|
sysfs_devices_system_cpu
|
|
}:{
|
|
file
|
|
lnk_file
|
|
} rw_file_perms;
|
|
|
|
set_prop(mi_thermald, thermal_engine_prop)
|