1# ============================================== 2# MTK Policy Rule 3# ============ 4 5############################# 6# proc files 7# 8genfscon proc /driver/thermal u:object_r:proc_thermal:s0 9genfscon proc /thermlmt u:object_r:proc_thermal:s0 10genfscon proc /fps_tm u:object_r:proc_thermal:s0 11genfscon proc /wmt_tm u:object_r:proc_thermal:s0 12genfscon proc /mobile_tm u:object_r:proc_thermal:s0 13genfscon proc /bcctlmt u:object_r:proc_thermal:s0 14genfscon proc /battery_status u:object_r:proc_thermal:s0 15genfscon proc /mtkcooler u:object_r:proc_mtkcooler:s0 16genfscon proc /mtktz u:object_r:proc_mtktz:s0 17genfscon proc /lk_env u:object_r:proc_lk_env:s0 18genfscon proc /driver/storage_logger u:object_r:proc_slogger:s0 19genfscon proc /driver/icusb u:object_r:proc_icusb:s0 20genfscon proc /mrdump_rst u:object_r:proc_mrdump_rst:s0 21genfscon proc /mtk_battery_cmd u:object_r:proc_battery_cmd:s0 22genfscon proc /mtd u:object_r:proc_mtd:s0 23genfscon proc /ged u:object_r:proc_ged:s0 24genfscon proc /mtk_jpeg u:object_r:proc_mtk_jpeg:s0 25genfscon proc /perfmgr u:object_r:proc_perfmgr:s0 26genfscon proc /driver/wmt_dbg u:object_r:proc_wmtdbg:s0 27genfscon proc /zraminfo u:object_r:proc_zraminfo:s0 28genfscon proc /gpulog u:object_r:proc_gpulog:s0 29genfscon proc /cpu/alignment u:object_r:proc_cpu_alignment:s0 30genfscon proc /sched_debug u:object_r:proc_sched_debug:s0 31genfscon proc /chip u:object_r:proc_chip:s0 32genfscon proc /atf_log u:object_r:proc_atf_log:s0 33genfscon proc /gz_log u:object_r:proc_gz_log:s0 34genfscon proc /last_kmsg u:object_r:proc_last_kmsg:s0 35genfscon proc /bootprof u:object_r:proc_bootprof:s0 36genfscon proc /pl_lk u:object_r:proc_pl_lk:s0 37genfscon proc /msdc_debug u:object_r:proc_msdc_debug:s0 38genfscon proc /ufs_debug u:object_r:proc_ufs_debug:s0 39genfscon proc /pidmap u:object_r:proc_pidmap:s0 40#genfscon proc /kpageflags u:object_r:proc_kpageflags:s0 41genfscon proc /mtk_memcfg/slabtrace u:object_r:proc_slabtrace:s0 42genfscon proc /mtk_cmdq_debug/status u:object_r:proc_cmdq_debug:s0 43genfscon proc /cpuhvfs/dbg_repo u:object_r:proc_dbg_repo:s0 44 45# mtk EM FreqHopping setting 46genfscon proc /freqhopping/freqhopping_debug u:object_r:proc_freqhop:s0 47genfscon proc /freqhopping/status u:object_r:proc_freqhop:s0 48genfscon proc /freqhopping/dumpregs u:object_r:proc_freqhop:s0 49 50# mtk EM flash reading 51genfscon proc /partitions u:object_r:proc_partition:s0 52 53# Purpose dump not exit file 54genfscon proc /isp_p2/isp_p2_dump u:object_r:proc_isp_p2_dump:s0 55genfscon proc /isp_p2/isp_p2_kedump u:object_r:proc_isp_p2_kedump:s0 56genfscon proc /mali/memory_usage u:object_r:proc_memory_usage:s0 57genfscon proc /mtk_es_reg_dump u:object_r:proc_mtk_es_reg_dump:s0 58 59# Date : 2018/11/01 60# Purpose : mtk EM c2k bypass read usb file 61genfscon proc /isp_p2 u:object_r:proc_isp_p2:s0 62 63# Date : WK19.27 64# Purpose: Android Migration for SVP 65genfscon proc /m4u u:object_r:proc_m4u:s0 66 67genfscon proc /driver/wmt_aee u:object_r:proc_wmt_aee:s0 68 69 70############################# 71# sysfs files 72# 73genfscon sysfs /bus/platform/drivers/mtk-kpd u:object_r:sysfs_keypad_file:s0 74genfscon sysfs /power/vcorefs/pwr_ctrl u:object_r:sysfs_vcorefs_pwrctrl:s0 75genfscon sysfs /power/dcm_state u:object_r:sysfs_dcm:s0 76genfscon sysfs /power/mtkdcs/mode u:object_r:sysfs_dcs:s0 77genfscon sysfs /power/mtkpasr/execstate u:object_r:sysfs_execstate:s0 78genfscon sysfs /mtk_ssw u:object_r:sysfs_ssw:s0 79 80# Date : 2018/06/15 81# Purpose : mtk EM Audio headset detect 82genfscon sysfs /bus/platform/drivers/Accdet_Driver/state u:object_r:sysfs_headset:s0 83genfscon sysfs /bus/platform/drivers/dev_info/dev_info u:object_r:sysfs_devinfo:s0 84genfscon sysfs /bus/platform/drivers/meta_com_type_info/meta_com_type_info u:object_r:sysfs_comport_type:s0 85genfscon sysfs /bus/platform/drivers/meta_uart_port_info/meta_uart_port_info u:object_r:sysfs_uart_info:s0 86 87genfscon sysfs /devices/platform/battery u:object_r:sysfs_batteryinfo:s0 88genfscon sysfs /devices/platform/charger/ADC_Charger_Voltage u:object_r:sysfs_vbus:s0 89genfscon sysfs /devices/platform/battery/ADC_Charger_Voltage u:object_r:sysfs_vbus:s0 90genfscon sysfs /devices/platform/charger/Pump_Express u:object_r:sysfs_pump_express:s0 91genfscon sysfs /devices/platform/battery/Pump_Express u:object_r:sysfs_pump_express:s0 92genfscon sysfs /devices/platform/mt_charger/power_supply u:object_r:sysfs_batteryinfo:s0 93genfscon sysfs /devices/platform/1000d000.pwrap/1000d000.pwrap:main_pmic/mt6357-gauge/power_supply u:object_r:sysfs_batteryinfo:s0 94genfscon sysfs /devices/platform/11016000.i2c5/i2c-5/5-0034/mt6370_pmu_charger/power_supply u:object_r:sysfs_batteryinfo:s0 95genfscon sysfs /devices/platform/mt-rtc/rtc u:object_r:sysfs_rtc:s0 96genfscon sysfs /devices/platform/1000d000.pwrap/1000d000.pwrap:mt6359-pmic/mt6359-rtc/rtc u:object_r:sysfs_rtc:s0 97genfscon sysfs /devices/platform/1000d000.pwrap/1000d000.pwrap:mt6358-pmic/mt6358-rtc/rtc u:object_r:sysfs_rtc:s0 98genfscon sysfs /devices/platform/1000d000.pwrap/1000d000.pwrap:main_pmic/mt6397-rtc/rtc u:object_r:sysfs_rtc:s0 99genfscon sysfs /devices/platform/mt-pmic u:object_r:sysfs_pmu:s0 100genfscon sysfs /devices/platform/1000d000.pwrap/mt-pmic u:object_r:sysfs_pmu:s0 101genfscon sysfs /devices/platform/1000d000.pwrap/1000d000.pwrap:mt6358-pmic/mt-pmic u:object_r:sysfs_pmu:s0 102genfscon sysfs /devices/platform/1000d000.pwrap/1000d000.pwrap:mt6359-pmic/mt-pmic u:object_r:sysfs_pmu:s0 103genfscon sysfs /devices/platform/mt6333-user u:object_r:sysfs_pmu:s0 104genfscon sysfs /devices/platform/mt6311-user u:object_r:sysfs_pmu:s0 105genfscon sysfs /devices/platform/mt_usb/musb-hdrc/dual_role_usb u:object_r:sysfs_dual_role_usb20:s0 106genfscon sysfs /devices/platform/mt_usb/musb-hdrc/cmode u:object_r:sysfs_usb_cmode:s0 107 108genfscon sysfs /devices/virtual/BOOT/BOOT/boot/boot_mode u:object_r:sysfs_boot_mode:s0 109genfscon sysfs /devices/virtual/BOOT/BOOT/boot/boot_type u:object_r:sysfs_boot_type:s0 110 111genfscon sysfs /devices/virtual/misc/md32 u:object_r:sysfs_md32:s0 112genfscon sysfs /devices/virtual/misc/scp u:object_r:sysfs_scp:s0 113genfscon sysfs /devices/virtual/misc/scp_B u:object_r:sysfs_scp:s0 114genfscon sysfs /devices/virtual/misc/sspm u:object_r:sysfs_sspm:s0 115genfscon sysfs /devices/virtual/misc/adsp u:object_r:sysfs_adsp:s0 116 117# Date : 2019/09/12 118genfscon sysfs /devices/virtual/thermal u:object_r:sysfs_therm:s0 119genfscon sysfs /devices/class/thermal u:object_r:sysfs_therm:s0 120 121genfscon sysfs /devices/virtual/switch/fps u:object_r:sysfs_fps:s0 122 123genfscon sysfs /firmware/devicetree/base/chosen/atag,devinfo u:object_r:sysfs_devinfo:s0 124 125genfscon sysfs /kernel/ccci u:object_r:sysfs_ccci:s0 126 127# Date : 2018/06/15 128# Purpose : mtk EM touchscreen settings 129genfscon sysfs /module/tpd_debug u:object_r:sysfs_tpd_debug:s0 130genfscon sysfs /module/tpd_setting u:object_r:sysfs_tpd_setting:s0 131genfscon sysfs /power/vcorefs/vcore_debug u:object_r:sysfs_vcore_debug:s0 132genfscon sysfs /power/vcorefs/opp_table u:object_r:sysfs_vcore_debug:s0 133 134# Date: 2018/08/09 135#Purpose : MTK Vibrator 136genfscon sysfs /devices/virtual/timed_output/vibrator u:object_r:sysfs_vibrator:s0 137genfscon sysfs /devices/platform/odm/odm:vibrator@0/leds/vibrator u:object_r:sysfs_vibrator:s0 138genfscon sysfs /devices/platform/soc/soc:regulator_vibrator/leds/vibrator u:object_r:sysfs_vibrator:s0 139genfscon sysfs /devices/platform/leds-mt65xx/leds u:object_r:sysfs_leds:s0 140# Date : 2018/08/109 141# Purpose : mtk EM Power debug_log setting 142genfscon sysfs /devices/platform/spm u:object_r:sysfs_spm:s0 143 144# Date : 2018/11/01 145# Purpose : mtk EM c2k bypass read usb file 146genfscon sysfs /devices/virtual/usb_rawbulk u:object_r:sys_usb_rawbulk:s0 147 148#Date : 2018/11/22 149#Purpose: allow mdlogger to read mdinfo file 150genfscon sysfs /kernel/md/mdee u:object_r:sysfs_mdinfo:s0 151 152# Date : 2019/04/09 153# Purpose: mtk EM battery temprature settings 154genfscon sysfs /devices/platform/battery/Battery_Temperature u:object_r:sysfs_battery_temp:s0 155genfscon sysfs /devices/platform/battery/FG_Battery_CurrentConsumption u:object_r:sysfs_battery_consumption:s0 156genfscon sysfs /devices/platform/battery/Power_On_Voltage u:object_r:sysfs_power_on_vol:s0 157genfscon sysfs /devices/platform/battery/Power_Off_Voltage u:object_r:sysfs_power_off_vol:s0 158genfscon sysfs /devices/platform/battery/FG_daemon_disable u:object_r:sysfs_fg_disable:s0 159genfscon sysfs /devices/platform/battery/disable_nafg u:object_r:sysfs_dis_nafg:s0 160 161# Date : 2019/07/03 162# Purpose: SIU update mmcblk access 163genfscon sysfs /devices/platform/bootdevice/mmc_host/mmc0/mmc0:0001/block/mmcblk0 u:object_r:sysfs_devices_block:s0 164genfscon sysfs /devices/mtk-msdc.0/11230000.msdc0/mmc_host/mmc0/mmc0:0001/block/mmcblk0 u:object_r:sysfs_devices_block:s0 165genfscon sysfs /devices/platform/mtk-msdc.0/11230000.msdc0/mmc_host/mmc0/mmc0:0001/block/mmcblk0 u:object_r:sysfs_devices_block:s0 166genfscon sysfs /devices/platform/bootdevice/host0/target0:0:0/0:0:0:0/block/sda u:object_r:sysfs_devices_block:s0 167genfscon sysfs /devices/platform/bootdevice/host0/target0:0:0/0:0:0:1/block/sdb u:object_r:sysfs_devices_block:s0 168genfscon sysfs /devices/platform/bootdevice/host0/target0:0:0/0:0:0:2/block/sdc u:object_r:sysfs_devices_block:s0 169 170# Date : 2019/07/12 171# Purpose:dumpstate mmcblk1 access 172genfscon sysfs /devices/platform/externdevice/mmc_host/mmc0 u:object_r:sysfs_devices_block:s0 173genfscon sysfs /devices/platform/externdevice/mmc_host/mmc1 u:object_r:sysfs_devices_block:s0 174 175# Date : 2019/10/22 176# Purpose : mrdump_tool(copy_process by aee_aedv) need to write data to lbaooo 177genfscon sysfs /module/mrdump/parameters/lbaooo u:object_r:sysfs_mrdump_lbaooo:s0 178 179############################# 180# debugfs files 181# 182genfscon debugfs /binder u:object_r:debugfs_binder:s0 183genfscon debugfs /blockio u:object_r:debugfs_blockio:s0 184genfscon debugfs /cpuhvfs u:object_r:debugfs_cpuhvfs:s0 185genfscon debugfs /displowpower u:object_r:debugfs_fb:s0 186genfscon debugfs /disp u:object_r:debugfs_fb:s0 187genfscon debugfs /dispsys u:object_r:debugfs_fb:s0 188genfscon debugfs /dmlog u:object_r:debugfs_dmlog_debug:s0 189genfscon debugfs /dynamic_debug u:object_r:debugfs_dynamic_debug:s0 190genfscon debugfs /emi_mbw/dump_buf u:object_r:debugfs_emi_mbw_buf:s0 191genfscon debugfs /fbconfig u:object_r:debugfs_fb:s0 192genfscon debugfs /fpsgo u:object_r:debugfs_fpsgo:s0 193genfscon debugfs /fuseio u:object_r:debugfs_fuseio:s0 194genfscon debugfs /ged u:object_r:debugfs_ged:s0 195genfscon debugfs /ion/client_history u:object_r:debugfs_ion_mm_heap:s0 196genfscon debugfs /ion/clients u:object_r:debugfs_ion:s0 197genfscon debugfs /ion/heaps u:object_r:debugfs_ion_mm_heap:s0 198genfscon debugfs /ion/ion_mm_heap u:object_r:debugfs_ion_mm_heap:s0 199genfscon debugfs /kmemleak u:object_r:debugfs_kmemleak:s0 200genfscon debugfs /mali0/gpu_memory u:object_r:debugfs_gpu_mali_midgard:s0 201genfscon debugfs /mali/gpu_memory u:object_r:debugfs_gpu_mali_utgard:s0 202genfscon debugfs /mtkfb u:object_r:debugfs_fb:s0 203genfscon debugfs /mmprofile u:object_r:debugfs_fb:s0 204genfscon debugfs /musb-hdrc u:object_r:debugfs_usb:s0 205genfscon debugfs /page_owner_slim u:object_r:debugfs_page_owner_slim_debug:s0 206genfscon debugfs /pvr u:object_r:debugfs_gpu_img:s0 207genfscon debugfs /rcu u:object_r:debugfs_rcu:s0 208genfscon debugfs /shrinker u:object_r:debugfs_shrinker_debug:s0 209genfscon debugfs /usb20_phy u:object_r:debugfs_usb20_phy:s0 210genfscon debugfs /usb_c u:object_r:debugfs_usb:s0 211genfscon debugfs /vpu/device_dbg u:object_r:debugfs_vpu_device_dbg:s0 212 213# mtk VPU/MDLA power reading 214genfscon debugfs /vpu/power u:object_r:debugfs_vpu_power:s0 215genfscon debugfs /mdla/power u:object_r:debugfs_mdla_power:s0 216genfscon debugfs /vpu/vpu_memory u:object_r:debugfs_vpu_memory:s0 217 218# mtk eara thermal reading 219genfscon debugfs /eara_thermal/enable u:object_r:debugfs_eara_thermal:s0 220 221# mtk EM power PMU register 222genfscon debugfs /rt-regmap u:object_r:debugfs_regmap:s0 223 224# 2019/08/15 225genfscon debugfs /smi_mon u:object_r:debugfs_smi_mon:s0 226 227genfscon iso9660 / u:object_r:iso9660:s0 228genfscon rawfs / u:object_r:rawfs:s0 229genfscon fuseblk / u:object_r:fuseblk:s0 230 231# 2019/08/24 232genfscon sysfs /class/sensor u:object_r:sysfs_sensor:s0 233genfscon sysfs /devices/virtual/sensor u:object_r:sysfs_sensor:s0 234 235# MTEE trusty 236genfscon sysfs /devices/platform/trusty u:object_r:mtee_trusty_file:s0 237 238# Date : 2019/08/29 239# Purpose: allow rild to access /proc/aed/reboot-reason 240genfscon proc /aed/reboot-reason u:object_r:proc_aed_reboot_reason:s0 241 242# 2019/09/05 243# Purpose: Allow powerhal to control kernel resources 244genfscon proc /ppm u:object_r:proc_ppm:s0 245genfscon proc /cpufreq u:object_r:proc_cpufreq:s0 246genfscon proc /hps u:object_r:proc_hps:s0 247genfscon proc /cm_mgr u:object_r:proc_cm_mgr:s0 248genfscon proc /fliperfs u:object_r:proc_fliperfs:s0 249genfscon sysfs /module/ged u:object_r:sysfs_ged:s0 250genfscon sysfs /module/fbt_cpu u:object_r:sysfs_fbt_cpu:s0 251genfscon sysfs /module/fbt_fteh u:object_r:sysfs_fbt_fteh:s0 252 253# 2019/09/05 254# Purpose: Allow powerhal to control cache audit 255genfscon sysfs /module/ca_drv u:object_r:sysfs_ca_drv:s0 256genfscon sysfs /module/pftch_qos u:object_r:sysfs_pftch_qos:s0 257 258# Date : WK19.38 259# Purpose: Android Migration for video codec driver 260genfscon sysfs /firmware/devicetree/base/model u:object_r:sysfs_device_tree_model:s0 261 262# Date : 2019/10/11 263# Purpose : allow system_server to access /proc/wlan/status for Q Migration 264genfscon proc /wlan/status u:object_r:proc_wlan_status:s0 265 266# Date : 2019/10/11 267# Purpose : allow system_server to access /sys/kernel/mm/ksm/pages_xxx 268genfscon sysfs /kernel/mm/ksm/pages_shared u:object_r:sysfs_pages_shared:s0 269genfscon sysfs /kernel/mm/ksm/pages_sharing u:object_r:sysfs_pages_sharing:s0 270genfscon sysfs /kernel/mm/ksm/pages_unshared u:object_r:sysfs_pages_unshared:s0 271genfscon sysfs /kernel/mm/ksm/pages_volatile u:object_r:sysfs_pages_volatile:s0 272 273# Date : 2019/10/25 274# Purpose : To avoid using the SELabel of u:object_r:proc:s0 or u:object_r:sysfs:s0 275# to access /proc/device-tree/chosen/atag,chipid or /sysfs/firmware/devicetree/base/chosen/atag,chipid 276genfscon sysfs /firmware/devicetree/base/chosen/atag,chipid u:object_r:sysfs_chipid:s0 277 278# Date : 2019/10/18 279# Purpose : allow system_server to access rt5509 param and calib node 280genfscon sysfs /devices/platform/rt5509_param.0 u:object_r:sysfs_rt_param:s0 281genfscon sysfs /devices/virtual/rt5509_cal/rt5509.0 u:object_r:sysfs_rt_calib:s0 282genfscon sysfs /devices/platform/11270000.usb3/musb-hdrc/cmode u:object_r:sysfs_usb_cmode:s0 283 284# Date : 2019/12/12 285# Purpose : allow media sources to access /sys/bus/platform/drivers/mem_bw_ctrl/* 286genfscon sysfs /bus/platform/drivers/mem_bw_ctrl/concurrency_scenario u:object_r:sysfs_concurrency_scenario:s0 287 288# Date : WK20.07 289# Operation: R migration 290# Purpose : Add permission for new device node. 291genfscon sysfs /firmware/devicetree/base/chosen/atag,meta u:object_r:sysfs_meta_info:s0 292 293