1# ============================================================================== 2# Type Declaration 3# ============================================================================== 4type mtk_hal_sensors, domain; 5type mtk_hal_sensors_exec, exec_type, file_type, vendor_file_type; 6 7# hwbinder access 8init_daemon_domain(mtk_hal_sensors) 9hwbinder_use(mtk_hal_sensors) 10 11# call into system_server process (callbacks) 12binder_call(mtk_hal_sensors, system_server) 13 14# graphics allocator 15allow mtk_hal_sensors hal_graphics_allocator_default:fd use; 16 17# gpu device 18allow mtk_hal_sensors gpu_device:dir create_dir_perms; 19allow mtk_hal_sensors gpu_device:chr_file rw_file_perms; 20allow mtk_hal_sensors dri_device:chr_file rw_file_perms; 21 22# ion device 23allow mtk_hal_sensors ion_device:dir create_dir_perms; 24allow mtk_hal_sensors ion_device:chr_file rw_file_perms; 25# system file 26allow mtk_hal_sensors system_file:dir read; 27allow mtk_hal_sensors system_file:dir open; 28 29# sensors input rw access 30allow mtk_hal_sensors sysfs_sensor:dir r_dir_perms; 31allow mtk_hal_sensors sysfs_sensor:file rw_file_perms; 32 33# hal sensor for chr_file 34allow mtk_hal_sensors hwmsensor_device:chr_file r_file_perms; 35get_prop(mtk_hal_sensors, hwservicemanager_prop) 36 37#hwservicemanager 38hal_server_domain(mtk_hal_sensors, hal_sensors); 39 40# Access sensor bio devices 41allow mtk_hal_sensors sensorlist_device:chr_file rw_file_perms; 42allow mtk_hal_sensors m_acc_misc_device:chr_file rw_file_perms; 43allow mtk_hal_sensors m_als_misc_device:chr_file rw_file_perms; 44allow mtk_hal_sensors m_ps_misc_device:chr_file rw_file_perms; 45allow mtk_hal_sensors m_mag_misc_device:chr_file rw_file_perms; 46allow mtk_hal_sensors m_gyro_misc_device:chr_file rw_file_perms; 47allow mtk_hal_sensors m_baro_misc_device:chr_file rw_file_perms; 48allow mtk_hal_sensors m_hmdy_misc_device:chr_file rw_file_perms; 49allow mtk_hal_sensors m_act_misc_device:chr_file rw_file_perms; 50allow mtk_hal_sensors m_pedo_misc_device:chr_file rw_file_perms; 51allow mtk_hal_sensors m_situ_misc_device:chr_file rw_file_perms; 52allow mtk_hal_sensors m_step_c_misc_device:chr_file rw_file_perms; 53allow mtk_hal_sensors m_fusion_misc_device:chr_file rw_file_perms; 54allow mtk_hal_sensors m_bio_misc_device:chr_file rw_file_perms; 55allow mtk_hal_sensors hf_manager_device:chr_file rw_file_perms; 56 57# Access mtk sensor setting and calibration node. 58# for data 59allow mtk_hal_sensors sensor_data_file:file create_file_perms; 60allow mtk_hal_sensors sensor_data_file:dir create_dir_perms; 61# for nvcfg 62allow mtk_hal_sensors nvcfg_file:file create_file_perms; 63allow mtk_hal_sensors nvcfg_file:dir create_dir_perms; 64 65 66# Date : WK18.21 67# Operation: P migration 68# Purpose: Allow to search /mnt/vendor/nvdata for fstab when using NVM_Init() 69allow mtk_hal_sensors mnt_vendor_file:dir search; 70 71# Date : WK19.48 72# Purpose: fix [vts_10.0_r2]VtsHalSensorsV2_0Target fail 73allow mtk_hal_sensors merged_hal_service:fd use; 74 75# Date : WK20.25 76# Purpose: Allow to read /bus/platform/drivers/mtk_nanohub/state 77allow mtk_hal_sensors sysfs_mtk_nanohub_state:file r_file_perms; 78