1# ============================================== 2# Policy File of /vendor/bin/hw/vendor.mediatek.hardware.mms@1.0-service Executable File 3 4# ============================================== 5# Type Declaration 6# ============================================== 7 8type mtk_hal_mms, domain, mtk_safe_halserverdomain_type; 9type mtk_hal_mms_exec, exec_type, file_type, vendor_file_type; 10 11# ============================================== 12# MTK Policy Rule 13# ============================================== 14 15# Setup for domain transition 16init_daemon_domain(mtk_hal_mms) 17 18# Allow to use HWBinder IPC 19hwbinder_use(mtk_hal_mms) 20 21# Allow a set of permissions required for a domain to be a server which provides a HAL implementation over HWBinder. 22hal_server_domain(mtk_hal_mms, hal_mms) 23 24# add/find permission rule to hwservicemanager 25add_hwservice(hal_mms_server, mtk_hal_mms_hwservice) 26 27# Purpose : Allow to use kernel driver 28allow mtk_hal_mms graphics_device:chr_file { read write open ioctl }; 29allow mtk_hal_mms ion_device:chr_file { read open ioctl }; 30allow mtk_hal_mms mtk_cmdq_device:chr_file r_file_perms; 31allow mtk_hal_mms mtk_mdp_device:chr_file r_file_perms; 32allow mtk_hal_mms mtk_mdp_sync:chr_file r_file_perms; 33allow mtk_hal_mms sw_sync_device:chr_file r_file_perms; 34 35# Purpose : Allow to use allocator for JPEG 36hal_client_domain(mtk_hal_mms, hal_allocator) 37hal_client_domain(mtk_hal_mms, hal_graphics_allocator) 38hal_client_domain(mtk_hal_mms, hal_pq) 39 40# Purpose : Allow to use graphics allocator fd for gralloc_extra 41allow mtk_hal_mms hal_graphics_allocator_default:fd use; 42allow mtk_hal_mms debugfs_ion:dir search; 43allow mtk_hal_mms merged_hal_service:fd use; 44 45# Purpose : VDEC/VENC device node 46allow mtk_hal_mms Vcodec_device:chr_file rw_file_perms; 47allow mtk_hal_mms proc_mtk_jpeg:file r_file_perms; 48allowxperm mtk_hal_mms proc_mtk_jpeg:file ioctl { 49 JPG_BRIDGE_ENC_IO_INIT 50 JPG_BRIDGE_ENC_IO_CONFIG 51 JPG_BRIDGE_ENC_IO_WAIT 52 JPG_BRIDGE_ENC_IO_DEINIT 53 JPG_BRIDGE_ENC_IO_START 54 }; 55 56# Purpose : Allow to use mms by JPEG with handle 57allow mtk_hal_mms platform_app:fd use; 58# Purpose : Allow Miravision to set Sharpness 59allow mtk_hal_mms system_app:fd use; 60 61# Purpose : Allow to set property for AIPQ 62allow mtk_hal_mms apusys_device:chr_file rw_file_perms; 63