# ============================================================================== # Type Declaration # ============================================================================== type mtk_hal_power, domain; type mtk_hal_power_exec, exec_type, file_type, vendor_file_type; # hwbinder access init_daemon_domain(mtk_hal_power) hal_server_domain(mtk_hal_power, hal_power); hal_server_domain(mtk_hal_power, hal_wifi); # sysfs allow mtk_hal_power sysfs_devices_system_cpu:file rw_file_perms; # debugfs allow mtk_hal_power debugfs_ged:dir r_dir_perms; allow mtk_hal_power debugfs_ged:file rw_file_perms; # proc_thermal allow mtk_hal_power proc_thermal:file w_file_perms; # proc info allow mtk_hal_power mtk_hal_audio:dir r_dir_perms; # Date : 2017/10/02 # Operation: SQC # Purpose : Allow powerHAL to access perfmgr allow mtk_hal_power proc_perfmgr:dir r_dir_perms; allow mtk_hal_power proc_perfmgr:file rw_file_perms; allowxperm mtk_hal_power proc_perfmgr:file ioctl PERFMGR_FPSGO_TOUCH; # Date : 2017/10/11 # Operation: SQC # Purpose : Allow powerHAL to access powerhal folder allow mtk_hal_power sdcard_type:dir create_dir_perms; allow mtk_hal_power sdcard_type:file create_file_perms; allow mtk_hal_power eemcs_device:chr_file rw_file_perms; allow mtk_hal_power mnt_user_file:dir create_dir_perms; allow mtk_hal_power mtk_powerhal_data_file:dir {create_dir_perms rw_dir_perms}; allow mtk_hal_power mtk_powerhal_data_file:file {create_file_perms rw_file_perms}; allow mtk_hal_power mtk_powerhal_data_file:sock_file {create_file_perms rw_file_perms}; #camera contorl cpu allow mtk_hal_power mtk_hal_camera:dir r_dir_perms; allow mtk_hal_power mtk_hal_camera:file r_file_perms; # Date : 2017/10/24 # Operation: SQC # Purpose : Allow powerHAL to access thermal allow mtk_hal_power proc_thermal:dir r_dir_perms; allow mtk_hal_power debugfs_fpsgo:dir r_dir_perms; allow mtk_hal_power debugfs_fpsgo:file rw_file_perms; # Date : 2017/12/19 # Operation: SQC # Purpose : Allow powerHAL to access wlan allow mtk_hal_power proc_net:file w_file_perms; # Date : 2017/12/21 # Operation: SQC # Purpose : Allow powerHAL to access mediacodec allow mtk_hal_power mediacodec:dir r_dir_perms; allow mtk_hal_power mediacodec:file r_file_perms; set_prop(mtk_hal_power, vendor_mtk_thermal_config_prop) # Date : 2018/03/16 # Operation: SQC # Purpose : Allow powerHAL to access /d/mtkfb allow mtk_hal_power debugfs_fb:dir r_dir_perms; allow mtk_hal_power debugfs_fb:file rw_file_perms; # Date : 2018/06/26 # Operation: Thermal change policy in perfservice allow mtk_hal_power proc_thermal:file r_file_perms; allow mtk_hal_power thermal_manager_data_file:file create_file_perms; allow mtk_hal_power thermal_manager_data_file:dir { rw_dir_perms setattr }; allow mtk_hal_power thermalloadalgod:unix_stream_socket connectto; allow mtk_hal_power proc_mtkcooler:dir r_dir_perms; allow mtk_hal_power proc_mtkcooler:file rw_file_perms; allow mtk_hal_power proc_mtktz:dir r_dir_perms; allow mtk_hal_power proc_mtktz:file rw_file_perms; # Date : 2019/05/08 # Operation: SQC # Purpose : Allow powerHAL to access /proc/[pid] allow mtk_hal_power system_server:dir r_dir_perms; allow mtk_hal_power system_server:file r_file_perms; # Date : 2019/07/11 # Operation: mt6779 SQC # Purpose : Allow powerHAL to VPU, RILD allow mtk_hal_power debugfs_vpu_power:dir r_dir_perms; allow mtk_hal_power debugfs_vpu_power:file rw_file_perms; allow mtk_hal_power debugfs_mdla_power:dir r_dir_perms; allow mtk_hal_power debugfs_mdla_power:file rw_file_perms; allow mtk_hal_power rild_oem_socket:sock_file write; allow mtk_hal_power rild:unix_stream_socket connectto; # Date : 2019/05/22 # Operation: SQC # Purpose : Allow powerHAL to access block read ahead allow mtk_hal_power sysfs_dm:dir r_dir_perms; allow mtk_hal_power sysfs_dm:file rw_file_perms; allow mtk_hal_power sysfs_devices_block:dir r_dir_perms; allow mtk_hal_power sysfs_devices_block:file rw_file_perms; allow mtk_hal_power debugfs_eara_thermal:dir search; allow mtk_hal_power debugfs_eara_thermal:file { getattr open write read }; # Date : 2019/05/22 # Operation: SQC # Purpose : Allow powerHAL to access prop set_prop(mtk_hal_power, vendor_mtk_powerhal_prop) # Date : 2019/05/29 # Operation: SQC # Purpose : Allow powerHAL to access wifi driver allow mtk_hal_power self:udp_socket create; allow mtk_hal_power kernel:system module_request; allow mtk_hal_power self:capability sys_module; allowxperm mtk_hal_power self:udp_socket ioctl priv_sock_ioctls; # Date : W19.20 # Operation : MTK power hal migration # Purpose : MTK power hal interface permission set_prop(mtk_hal_power, vendor_mtk_powerhal_prop) # Date : 2019/09/05 # Operation: SQC # Purpose : Add procfs, sysfs policy allow mtk_hal_power proc_ppm:dir r_dir_perms; allow mtk_hal_power proc_ppm:file rw_file_perms; allow mtk_hal_power proc_cpufreq:dir r_dir_perms; allow mtk_hal_power proc_cpufreq:file rw_file_perms; allow mtk_hal_power proc_hps:dir r_dir_perms; allow mtk_hal_power proc_hps:file rw_file_perms; allow mtk_hal_power proc_cm_mgr:dir r_dir_perms; allow mtk_hal_power proc_cm_mgr:file rw_file_perms; allow mtk_hal_power proc_fliperfs:dir r_dir_perms; allow mtk_hal_power proc_fliperfs:file rw_file_perms; allow mtk_hal_power sysfs_ged:dir r_dir_perms; allow mtk_hal_power sysfs_ged:file rw_file_perms; allow mtk_hal_power sysfs_fbt_cpu:dir r_dir_perms; allow mtk_hal_power sysfs_fbt_cpu:file rw_file_perms; allow mtk_hal_power sysfs_fbt_fteh:dir r_dir_perms; allow mtk_hal_power sysfs_fbt_fteh:file rw_file_perms; allow mtk_hal_power sysfs_xgf:dir r_dir_perms; allow mtk_hal_power sysfs_xgf:file rw_file_perms; allow mtk_hal_power sysfs_fpsgo:dir r_dir_perms; allow mtk_hal_power sysfs_fpsgo:file rw_file_perms; allow mtk_hal_power sysfs_gbe:dir r_dir_perms; allow mtk_hal_power sysfs_gbe:file rw_file_perms; allow mtk_hal_power gbe_native:dir r_dir_perms; allow mtk_hal_power gbe_native:file r_file_perms; # Date : 2019/09/17 # Operation: SQC # Purpose : Add cache audit allow mtk_hal_power sysfs_ca_drv:dir r_dir_perms; allow mtk_hal_power sysfs_ca_drv:file rw_file_perms; allow mtk_hal_power sysfs_pftch_qos:dir r_dir_perms; allow mtk_hal_power sysfs_pftch_qos:file rw_file_perms; # Date : 2019/09/18 # Operation: SQC # Purpose : Add f2fs permission allow mtk_hal_power sysfs_fs_f2fs:dir r_dir_perms; allow mtk_hal_power sysfs_fs_f2fs:file rw_file_perms; # Date : 2019/09/19 # Operation: SQC # Purpose : Add task turbo allow mtk_hal_power sysfs_task_turbo:dir r_dir_perms; allow mtk_hal_power sysfs_task_turbo:file rw_file_perms; # Date : 2019/09/23 # Operation: SQC # Purpose : Allow powerHAL to access touch boost allow mtk_hal_power sysfs_change_rate:file rw_file_perms; # Date : 2019/10/16 # Operation: SQC allow mtk_hal_power sysfs_ext4_disable_barrier:file write; allow mtk_hal_power block_device:dir search; # Date : 2019/11/14 # Operation: SQC # Purpose : Allow powerhal to control MCDI allow mtk_hal_power proc_cpuidle:dir r_dir_perms; allow mtk_hal_power proc_cpuidle:file rw_file_perms; # Date : 2020/06/12 # Operation: SQC # Purpose : Allow powerhal to control mali power policy allow mtk_hal_power sysfs_mali_power_policy:file rw_file_perms; # Date : 2020/06/12 # Operation: SQC # Purpose : Allow powerhal to control displowpower allow mtk_hal_power proc_displowpower:dir r_dir_perms; allow mtk_hal_power proc_displowpower:file rw_file_perms;