1# ============================================== 2# Policy File of /system/bin/ccci_fsd Executable File 3 4# ============================================== 5# Type Declaration 6# ============================================== 7type ccci_fsd_exec, exec_type, file_type, vendor_file_type; 8type ccci_fsd, domain; 9 10# ============================================== 11# MTK Policy Rule 12# ============================================== 13init_daemon_domain(ccci_fsd) 14 15wakelock_use(ccci_fsd) 16 17#============= ccci_fsd MD NVRAM============== 18allow ccci_fsd nvram_data_file:dir create_dir_perms; 19allow ccci_fsd nvram_data_file:file create_file_perms; 20allow ccci_fsd nvram_data_file:lnk_file read; 21allow ccci_fsd nvdata_file:lnk_file read; 22allow ccci_fsd nvdata_file:dir create_dir_perms; 23allow ccci_fsd nvdata_file:file create_file_perms; 24allow ccci_fsd nvram_device:chr_file rw_file_perms; 25allow ccci_fsd vendor_configs_file:file r_file_perms; 26allow ccci_fsd vendor_configs_file:dir r_dir_perms; 27 28#============= ccci_fsd device/path/data access============== 29allow ccci_fsd ccci_device:chr_file rw_file_perms; 30allow ccci_fsd ccci_cfg_file:dir create_dir_perms; 31allow ccci_fsd ccci_cfg_file:file create_file_perms; 32#============= ccci_fsd MD Data============== 33allow ccci_fsd protect_f_data_file:dir create_dir_perms; 34allow ccci_fsd protect_f_data_file:file create_file_perms; 35 36allow ccci_fsd protect_s_data_file:dir create_dir_perms; 37allow ccci_fsd protect_s_data_file:file create_file_perms; 38#============= ccci_fsd MD3 related============== 39allow ccci_fsd c2k_file:dir create_dir_perms; 40allow ccci_fsd c2k_file:file create_file_perms; 41allow ccci_fsd otp_part_block_device:blk_file rw_file_perms; 42allow ccci_fsd otp_device:chr_file rw_file_perms; 43allow ccci_fsd sysfs_boot_type:file { read open }; 44#============= ccci_fsd MD block data============== 45#restore>NVM_GetDeviceInfo>open /dev/block/by-name/nvram 46allow ccci_fsd block_device:dir search; 47allow ccci_fsd nvram_device:blk_file rw_file_perms; 48allow ccci_fsd nvdata_device:blk_file rw_file_perms; 49allow ccci_fsd nvcfg_file:dir create_dir_perms; 50allow ccci_fsd nvcfg_file:file create_file_perms; 51#============= ccci_fsd cryption related ============== 52allow ccci_fsd rawfs:dir create_dir_perms; 53allow ccci_fsd rawfs:file create_file_perms; 54#============= ccci_fsd sysfs related ============== 55allow ccci_fsd sysfs_ccci:dir search; 56allow ccci_fsd sysfs_ccci:file r_file_perms; 57 58#============= ccci_fsd ============== 59allow ccci_fsd mnt_vendor_file:dir search; 60 61# Purpose: for fstab parser 62allow ccci_fsd kmsg_device:chr_file w_file_perms; 63allow ccci_fsd proc_lk_env:file rw_file_perms; 64 65#============= ccci_fsd MD Low Power Monitor Related ============== 66allow ccci_fsd ccci_data_md1_file:dir create_dir_perms; 67allow ccci_fsd ccci_data_md1_file:file create_file_perms; 68allow ccci_fsd sysfs_devices_block:dir search; 69allow ccci_fsd sysfs_devices_block:file { read getattr open }; 70 71#============= ccci_fsd access vendor/etc/md file ============== 72allow ccci_fsd vendor_etc_md_file:dir search; 73allow ccci_fsd vendor_etc_md_file:file r_file_perms; 74 75#============= ccci_fsd access data/vendor_de/md file ============== 76allow ccci_fsd data_vendor_de_md_file:dir create_dir_perms; 77allow ccci_fsd data_vendor_de_md_file:file create_file_perms; 78