1 type thermal-engine, domain; 2 type thermal-engine_exec, exec_type, vendor_file_type, file_type; 3 4 init_daemon_domain(thermal-engine) 5 6 allow thermal-engine self:capability2 block_suspend; 7 8 # to read /sys/devices 9 allow thermal-engine sysfs:dir r_dir_perms; 10 11 allow thermal-engine sysfs_msm_subsys:dir r_dir_perms; 12 allow thermal-engine sysfs_msm_subsys:file rw_file_perms; 13 allow thermal-engine sysfs_soc:dir search; 14 allow thermal-engine sysfs_soc:file r_file_perms; 15 allow thermal-engine sysfs_thermal:dir r_dir_perms; 16 allow thermal-engine sysfs_thermal:file rw_file_perms; 17 allow thermal-engine sysfs_thermal:lnk_file read; 18 allow thermal-engine sysfs_rmtfs:dir search; 19 allow thermal-engine sysfs_rmtfs:file r_file_perms; 20 # to read /proc/stat 21 allow thermal-engine proc_stat:file { getattr open read }; 22 # IThermal Thermal HAL 23 hal_server_domain(thermal-engine, hal_thermal) 24 25 allow thermal-engine thermal_device:chr_file rw_file_perms; 26 27 r_dir_file(thermal-engine, sysfs_batteryinfo) 28 allow thermal-engine sysfs_batteryinfo:file w_file_perms; 29 30 r_dir_file(thermal-engine, sysfs_leds) 31 r_dir_file(thermal-engine, sysfs_msm_subsys) 32 r_dir_file(thermal-engine, sysfs_uio) 33 34 allow thermal-engine self:socket create_socket_perms; 35 allowxperm thermal-engine self:socket ioctl msm_sock_ipc_ioctls; 36 37 # reboot/shutdown for thermal limits exceeded 38 set_prop(thermal-engine, powerctl_prop) 39 40 userdebug_or_eng(` 41 allow thermal-engine diag_device:chr_file rw_file_perms; 42 ') 43 dontaudit thermal-engine diag_device:chr_file rw_file_perms; 44