#line 1 "device/mediatek/sepolicy/basic/plat_private/property_contexts"
# ==============================================
# MTK Policy Rule
# ==============================================

#allow mtk audio hidl service to read "ro.audio.usb.period_us"
ro.audio.usb.period_us u:object_r:exported_default_prop:s0 exact int

#allow adb daemon to read "persist.adb.nonblocking_ffs"
persist.adb.nonblocking_ffs u:object_r:exported_default_prop:s0 exact int

#============system fingerprint property===========
ro.system.build.fingerprint u:object_r:exported_fingerprint_prop:s0 exact string

vendor.MB.logpost         u:object_r:system_mtk_mobile_log_post_prop:s0
vendor.MB.logpost.        u:object_r:system_mtk_mobile_log_post_prop:s0
persist.vendor.MB.logpost u:object_r:system_mtk_mobile_log_post_prop:s0

#=============allow vendor-init/system process access ro.telephony property==============
ro.telephony.sim.count         u:object_r:exported3_default_prop:s0 exact int

#=============allow netlog==============
vendor.mtklog         u:object_r:system_mtk_debug_mtklog_prop:s0
persist.vendor.mtklog u:object_r:system_mtk_persist_mtklog_prop:s0
vendor.netlog         u:object_r:system_mtk_debug_netlog_prop:s0

#=============allow mdlogger==============
vendor.mdlogger      u:object_r:system_mtk_debug_mdlogger_prop:s0
vendor.mdl           u:object_r:system_mtk_mdl_prop:s0
vendor.starting.mode u:object_r:system_mtk_mdl_start_prop:s0
persist.vendor.mdl   u:object_r:system_mtk_persist_mdlog_prop:s0
vendor.pullmdlog     u:object_r:system_mtk_mdl_pulllog_prop:s0

#=============allow AEE==============
# persist.vendor.mtk.aee.mode && persist.vendor.mtk.aee.dal
persist.vendor.mtk.aee. u:object_r:system_mtk_persist_mtk_aee_prop:s0

# persist.vendor.aee.core.dump && persist.vendor.aee.core.direct
persist.vendor.aee. u:object_r:system_mtk_persist_aee_prop:s0

# vendor.debug.mtk.aee.db
vendor.debug.mtk.aee. u:object_r:system_mtk_debug_mtk_aee_prop:s0

#=============allow AEE_Dumpstate==============
vendor.debug.bq.dump u:object_r:system_mtk_debug_bq_dump_prop:s0

#=============allow bootanim==============
persist.vendor.bootanim. u:object_r:system_mtk_bootani_prop:s0

#=============allow mobile log property================
vendor.MB. u:object_r:system_mtk_mobile_log_prop:s0

#=============allow em to set bgdata disabled property================
persist.vendor.radio.bgdata.disabled u:object_r:system_mtk_bgdata_disabled_prop:s0

#=============allow em to set gprs attach type property================
persist.vendor.radio.gprs.attach.type u:object_r:system_mtk_gprs_attach_type_prop:s0

#=============allow em to set poweroffmd property================
vendor.ril.test.poweroffmd u:object_r:system_mtk_power_off_md_prop:s0
vendor.ril.testmode        u:object_r:system_mtk_power_off_md_prop:s0

#=============allow sim config property==============
vendor.gsm.sim.operator.default-name u:object_r:system_mtk_sim_system_prop:s0

#=============allow consyslogger==============
vendor.connsysfw u:object_r:system_mtk_connsysfw_prop:s0

#=============allow bluetooth==============
vendor.bthcisnoop u:object_r:system_mtk_vendor_bluetooth_prop:s0

#=============allow radio to set/get xcap rawurl config================
persist.vendor.mtk.xcap.rawurl u:object_r:system_mtk_persist_xcap_rawurl_prop:s0

#=============allow ccci_mdinit to ctl. mdlogger==============
ctl.mdlogger   u:object_r:system_mtk_ctl_mdlogger_prop:s0
ctl.emdlogger1 u:object_r:system_mtk_ctl_emdlogger1_prop:s0
ctl.emdlogger2 u:object_r:system_mtk_ctl_emdlogger2_prop:s0
ctl.emdlogger3 u:object_r:system_mtk_ctl_emdlogger3_prop:s0

init.svc.emdlogger1 u:object_r:system_mtk_init_svc_emdlogger1_prop:s0
init.svc.aee_aedv   u:object_r:system_mtk_init_svc_aee_aedv_prop:s0

#2019.12.30 longcheer tianyajun add this for porket modem
odm.pocket.mode.keygurad.locked    u:object_r:exported_dumpstate_prop:s0

#oem rpmb prop
ro.ril.oem.rpmb_state  u:object_r:exported2_radio_prop:s0
#line 1 "device/mediatek/sepolicy/bsp/plat_private/property_contexts"
# ==============================================
# MTK Policy Rule
# ==============================================

#=============allow atcid==============
ctl.atcid-daemon-u                    u:object_r:system_mtk_ctl_atcid_daemon_u_prop:s0
persist.vendor.radio.port_index       u:object_r:system_mtk_atci_sys_prop:s0
vendor.ril.atci.flightmode            u:object_r:system_mtk_atci_sys_prop:s0
persist.vendor.service.atci.autostart u:object_r:system_mtk_atci_sys_prop:s0
persist.vendor.service.atci.usermode  u:object_r:system_mtk_atci_sys_prop:s0

#=============allow capctrl==============
vendor.ril.capctrl_loaded             u:object_r:system_mtk_capctrl_sys_prop:s0

#=============allow mtk aal==============#
persist.vendor.sys.aal. u:object_r:system_mtk_aal_prop:s0

#============allow permission control set property=========
vendor.moms.permission.control.policy.set u:object_r:system_mtk_permission_control_prop:s0

#=============allow terservice to set terservice property==============
persist.vendor.ter u:object_r:system_mtk_terservice_prop:s0
vendor.ter.service u:object_r:system_mtk_terservice_prop:s0

#=============allow systemui to get ro.vendor.mtk_cta_set===============
ro.vendor.mtk_cta_set u:object_r:system_mtk_cta_set_prop:s0

#=============allow RSC===============
ro.sys.current_rsc_path     u:object_r:system_mtk_rsc_sys_prop:s0
ro.product.current_rsc_path u:object_r:system_mtk_rsc_sys_prop:s0
ro.sys_ext.current_rsc_path u:object_r:system_mtk_rsc_sys_prop:s0

#=============Restrict access to starting/stopping campostalgo===============
ctl.start$camerapostalgo   u:object_r:system_mtk_ctl_campostalgo_prop:s0
ctl.stop$camerapostalgo    u:object_r:system_mtk_ctl_campostalgo_prop:s0
ctl.restart$camerapostalgo u:object_r:system_mtk_ctl_campostalgo_prop:s0

#=============allow em to set telecom vibrate property================
persist.vendor.radio.telecom.vibrate u:object_r:system_mtk_telecom_vibrate_prop:s0

#=============allow surfaceflinger get property ============================
ro.vendor.graphiclowlatency.version u:object_r:system_mtk_graphics_sf_gll_ro_prop:s0
vendor.debug.sf.                    u:object_r:system_mtk_debug_sf_prop:s0
vendor.debug.bq.                    u:object_r:system_mtk_debug_bq_prop:s0

#=============allow AudioServer property===========
vendor.af.mixer.pcm         u:object_r:audio_prop:s0
vendor.af.track.pcm         u:object_r:audio_prop:s0
vendor.af.offload.write.raw u:object_r:audio_prop:s0
vendor.af.resampler.pcm     u:object_r:audio_prop:s0
vendor.af.mixer.end.pcm     u:object_r:audio_prop:s0
vendor.af.record.dump.pcm   u:object_r:audio_prop:s0
vendor.af.effect.pcm        u:object_r:audio_prop:s0
vendor.af.mixer.drc.pcm     u:object_r:audio_prop:s0
vendor.af.dumplog           u:object_r:audio_prop:s0
vendor.aaudio.pcm           u:object_r:audio_prop:s0
vendor.af.audioflinger.log  u:object_r:audio_prop:s0
vendor.af.track.log         u:object_r:audio_prop:s0
vendor.af.policy.debug      u:object_r:audio_prop:s0

#=============CT SelfRegister property================
persist.vendor.radio.selfreg u:object_r:system_mtk_selfreg_prop:s0

#=============USB tethering property for auto test================
persist.vendor.net.tethering u:object_r:system_mtk_usb_tethering_prop:s0

#=============allow android log much detect==============
persist.vendor.logmuch u:object_r:system_mtk_logmuch_prop:s0

#=============allow adb to set entitlement property  ==============
persist.vendor.entitlement_enabled u:object_r:system_mtk_wfc_entitlement_prop:s0
persist.vendor.entitlement.sesurl  u:object_r:system_mtk_wfc_entitlement_prop:s0
persist.vendor.net.wo.epdg_fqdn    u:object_r:system_mtk_wfc_entitlement_prop:s0

#=============allow system_app to get opt-in property  ==============
persist.vendor.mtk_wfc_opt_in    u:object_r:system_mtk_wfc_opt_in_prop:s0
persist.vendor.opt-in.url        u:object_r:system_mtk_opt_in_url_prop:s0
persist.vendor.apptoken.required u:object_r:system_mtk_apptoken_required_prop:s0

#=============allow radio to set common data releated property  ==============
persist.vendor.radio.default.data.selected u:object_r:system_mtk_common_data_prop:s0
persist.vendor.radio.mobile.mtu            u:object_r:system_mtk_common_data_prop:s0
vendor.radio.dsda.state                    u:object_r:system_mtk_common_data_prop:s0

#=============allow carrier express (cxp)==============
# system_mtk_usp_srv_prop: system set/get
persist.vendor.operator.optr_1 u:object_r:system_mtk_usp_srv_prop:s0
persist.vendor.operator.spec_1 u:object_r:system_mtk_usp_srv_prop:s0
persist.vendor.operator.seg_1  u:object_r:system_mtk_usp_srv_prop:s0
persist.vendor.mtk_usp         u:object_r:system_mtk_usp_srv_prop:s0

#=============allow system update to set prop=============
persist.vendor.update_finished u:object_r:system_mtk_update_prop:s0
persist.vendor.previous_slot   u:object_r:system_mtk_update_prop:s0

#=============allow system_server to set vendor.media.wfd.*==============
vendor.media.wfd.             u:object_r:system_mtk_media_wfd_prop:s0
vendor.media.wfd.portrait     u:object_r:system_mtk_media_wfd_prop:s0
vendor.media.wfd.video-format u:object_r:system_mtk_media_wfd_prop:s0

#=======================allow vsim===========================
vendor.gsm.disable.sim.dialog u:object_r:system_mtk_vsim_sys_prop:s0

#============= allow supplementary service property ===============
vendor.gsm.radio.ss.sc                u:object_r:system_mtk_supp_serv_prop:s0
vendor.gsm.radio.ss.imsdereg          u:object_r:system_mtk_supp_serv_prop:s0
persist.vendor.radio.cfu.iccid.       u:object_r:system_mtk_supp_serv_prop:s0
persist.vendor.radio.cfu.change.      u:object_r:system_mtk_supp_serv_prop:s0
persist.vendor.radio.cfu_over_ims     u:object_r:system_mtk_supp_serv_prop:s0
persist.vendor.radio.cfu.sync_for_ota u:object_r:system_mtk_supp_serv_prop:s0
persist.vendor.radio.cfu.mode         u:object_r:system_mtk_supp_serv_prop:s0
persist.vendor.radio.cfu.timeslot.    u:object_r:system_mtk_supp_serv_prop:s0
persist.vendor.radio.cfu.querytype    u:object_r:system_mtk_supp_serv_prop:s0
persist.vendor.suppserv.              u:object_r:system_mtk_supp_serv_prop:s0
vendor.suppserv.                      u:object_r:system_mtk_supp_serv_prop:s0

#============= allow bluetooth to set prop ==============
vendor.bluetooth.         u:object_r:system_mtk_bluetooth_prop:s0
persist.vendor.bluetooth. u:object_r:system_mtk_bluetooth_prop:s0

#=============allow EM set tel log property===========
persist.vendor.log.tel_dbg u:object_r:system_mtk_em_tel_log_prop:s0

#=============allow ims config property===========
vendor.ril.imsconfig.force.notify u:object_r:system_mtk_imsconfig_prop:s0

#=============allow mtk duraspeed property==============
persist.vendor.sys.vm.drop_caches u:object_r:system_mtk_duraspeed_drop_caches_prop:s0

#=============allow vendor_init to set ro.vendor.mtk_system_update_support==============
ro.vendor.mtk_system_update_support u:object_r:system_mtk_update_support_prop:s0

#=============allow AMS dynamic enable log property===========
persist.vendor.sys.activitylog u:object_r:system_mtk_amslog_prop:s0

#=============allow AMS-aal dynamic enable property===========
persist.vendor.sys.mtk_app_aal_support u:object_r:system_mtk_amsaal_prop:s0

#=============MTK CDMA Less property===========
persist.vendor.vzw_device_type u:object_r:system_mtk_persist_vendor_vzw_device_type_prop:s0

#=============allow RTT property==============
persist.vendor.mtk_rtt_support u:object_r:system_mtk_rtt_prop:s0

#=============CTM property===========
persist.vendor.ctm_slot_flag u:object_r:system_mtk_ctmslot_prop:s0

#=============MTK UCE property===========
persist.vendor.mtk_uce_support u:object_r:system_mtk_uce_support_prop:s0

#=============MTK CLIENTAPI property===========
persist.vendor.mtk_clientapi_support u:object_r:system_mtk_clientapi_support_prop:s0

#=============CDMA property===========
vendor.cdma.icc.operator.mcc u:object_r:system_mtk_cdma_prop:s0

#=============ECBM property==============
vendor.ril.cdma.inecmmode_by_slot u:object_r:system_mtk_cdma_ecm_prop:s0

#=============MTK RCS property==============
persist.vendor.mtk_rcs_support u:object_r:system_mtk_rcs_support_prop:s0

#=============MTK World Phone property===========
persist.vendor.radio.wm_selectmode u:object_r:system_mtk_world_phone_prop:s0
persist.vendor.radio.wm_fddtimer   u:object_r:system_mtk_world_phone_prop:s0

#=============MTK Capability Switch property===========
persist.vendor.radio.unlock           u:object_r:system_mtk_capability_switch_prop:s0
persist.vendor.radio.unlock.roaming   u:object_r:system_mtk_capability_switch_prop:s0
persist.vendor.radio.wait.imsi        u:object_r:system_mtk_capability_switch_prop:s0
persist.vendor.radio.waitimsi.roaming u:object_r:system_mtk_capability_switch_prop:s0
persist.vendor.radio.sim.status       u:object_r:system_mtk_capability_switch_prop:s0
persist.vendor.radio.new.sim.slot     u:object_r:system_mtk_capability_switch_prop:s0
vendor.ril.imsi.status.               u:object_r:system_mtk_capability_switch_prop:s0
persist.vendor.radio.simswitchstate   u:object_r:system_mtk_capability_switch_prop:s0

#=============allow subsidylock==============
persist.vendor.subsidylock.connectivity_status u:object_r:system_mtk_subsidylock_connect_prop:s0
persist.vendor.subsidylock u:object_r:system_mtk_subsidylock_prop:s0

#============ACS property==================
persist.vendor.mtk_acs_version u:object_r:system_mtk_acs_version_prop:s0
persist.vendor.mtk_acs_support u:object_r:system_mtk_acs_support_prop:s0
persist.vendor.mtk_acs_url     u:object_r:system_mtk_acs_url_prop:s0

#=============allow Modem Monitor property===========
persist.vendor.mdmmonitor u:object_r:config_prop:s0

init.svc.mtk_pkm_service u:object_r:system_mtk_pkm_init_prop:s0

#=============MDM init control property==============
init.svc.md_monitor u:object_r:system_mtk_init_svc_md_monitor_prop:s0

#=============netflix HD property==============
ro.netflix.bsp_rev u:object_r:netflix_bsp_rev_prop:s0

#============allow ctm set property=========
service.ctm.slot_flag u:object_r:system_mtk_ctm_prop:s0

#=============allow surfaceflinger to set property for HE2.0 debug tool=============
vendor.sf.gll.istarget u:object_r:system_mtk_graphics_sf_gll_prop:s0
vendor.sf.gll.q2l u:object_r:system_mtk_graphics_sf_gll_prop:s0
vendor.sf.gll.avgl2p u:object_r:system_mtk_graphics_sf_gll_prop:s0

#=============add for btmac property====================
ro.ril.oem.btmac    u:object_r:vendor_btmac_prop:s0
persist.ro.ril.oem.btmac    u:object_r:vendor_btmac_prop:s0
#=============add for wifimac property====================
ro.ril.oem.wifimac  u:object_r:vendor_wifimac_prop:s0

#=============allow NFC property===========
ro.vendor.se.type                 u:object_r:exported_default_prop:s0

#add for tp panel color
vendor.panel.color               u:object_r:exported_dumpstate_prop:s0

#==============allow mishow property===========
persist.vendor.mishow           u:object_r:persist_vendor_mishow_prop:s0
#============add for Ultrasound property=================
vendor.audio.chk.cal.us u:object_r:exported2_radio_prop:s0

# fingerprint dump
gf.debug.dump_data            u:object_r:vendor_fp_prop:s0
gf.debug.dump_talog_data      u:object_r:vendor_fp_prop:s0
#line 1 "miui/system/sepolicy/private/property_contexts"
# ctl. properties
ctl.mcd_init            u:object_r:system_prop:s0
persist.fastboot.       u:object_r:system_prop:s0

# secureboot. properties
secureboot.             u:object_r:exported_vold_prop:s0
ro.secureboot.          u:object_r:exported_vold_prop:s0

# misc properties for vm optimize
events.cpu              u:object_r:exported_system_prop:s0
mcd.extra.params        u:object_r:exported_system_prop:s0

# miui default prop support
ro.miui.                       u:object_r:exported_system_prop:s0
ro.vendor.miui.                u:object_r:exported_system_prop:s0
ro.com.google.clientidbase     u:object_r:exported_system_prop:s0
ro.product.locale.region            u:object_r:exported_system_prop:s0
ro.product.locale.language        u:object_r:exported_system_prop:s0
miui.usb.dialog                   u:object_r:exported_system_prop:s0
miui.reverse.charge               u:object_r:exported_system_prop:s0
ro.cust.test                      u:object_r:exported_system_prop:s0
ro.config.low_ram.threshold_gb    u:object_r:exported_system_prop:s0

# imei prop
persist.radio.imei      u:object_r:deviceid_prop:s0
persist.radio.meid      u:object_r:deviceid_prop:s0
persist.radio.sar_sar_sensor     u:object_r:system_radio_prop:s0
ro.ril.oem.imei         u:object_r:deviceid_prop:s0
ro.ril.oem.meid         u:object_r:deviceid_prop:s0
ro.ril.miui.imei        u:object_r:core_deviceid_prop:s0

# persist prop for dex2oat-threads
persist.dalvik.vm.dex2oat-threads  u:object_r:dalvik_prop:s0

ro.product.mod_device    u:object_r:exported2_default_prop:s0
ro.fota.oem              u:object_r:exported2_default_prop:s0
persist.debug.timing.enable u:object_r:exported2_default_prop:s0

radio.dataroaming.enable.suffix.subid  u:object_r:radio_prop:s0

radio.newapn.secretcode u:object_r:radio_prop:s0

radio.editims.secretcode u:object_r:radio_prop:s0

# MIUI-1598578 Allow settings to set the smart-dark property
persist.hwui.force_dark     u:object_r:system_prop:s0 exact bool

#get camera using info
vendor.sys.camerainfo         u:object_r:system_prop:s0

ro.boot.hwc             u:object_r:exported_default_prop:s0

# miui daemon collect aging status notifier
miui_daemon.fs_aging_stats              u:object_r:exported_vold_prop:s0

persist.dalvik.vm.flush_tcache  u:object_r:dalvik_prop:s0
persist.dalvik.vm.disable_tcache  u:object_r:dalvik_prop:s0

#dual wifi
ro.vendor.net.enable_dual_wifi u:object_r:vendor_dualwifi_prop:s0

# persist prop for fakecell and sleep mode
persist.sys.support_fakecell       u:object_r:joyose_app_prop:s0
persist.sys.support_detect_fc      u:object_r:joyose_app_prop:s0
persist.sys.detect_fc_enable       u:object_r:joyose_app_prop:s0
persist.sys.rtc.wakeup_record      u:object_r:joyose_app_prop:s0
persist.sys.sport_collect          u:object_r:joyose_app_prop:s0

# Allow settings to set the videocall beauty enable property
persist.vendor.vcb.enable  u:object_r:exported_system_prop:s0

# persist prop for trans opcust_spn
persist.sys.opcust_spn    u:object_r:exported_system_prop:s0

# persist prop for apex
persist.sys.cota.carrier  u:object_r:exported_system_prop:s0

# persist prop for miupdater
persist.sys.cota.package  u:object_r:exported_system_prop:s0
persist.sys.cota.partition  u:object_r:exported_system_prop:s0

# persist prop for maintenance_mode
sys.maintenance_mode      u:object_r:system_prop:s0

#support set prop for COTA
persist.sys.facebook.partnerid  u:object_r:exported_system_prop:s0
ro.facebook.partnerid                       u:object_r:exported_system_prop:s0
persist.sys.netflix.channel  u:object_r:exported_system_prop:s0
ro.netflix.channel                       u:object_r:exported_system_prop:s0

# sno
ro.ril.oem.psno           u:object_r:sno_prop:s0
ro.ril.oem.sno            u:object_r:sno_prop:s0
ro.ril.miui.psno          u:object_r:core_sno_prop:s0
ro.ril.miui.sno           u:object_r:core_sno_prop:s0

#Add otrp property type
vendor.otrp.time                    u:object_r:system_prop:s0
persist.vendor.otrp.key             u:object_r:system_prop:s0

# package manager service prop
ro.miui.pm.install. u:object_r:system_pm_install_prop:s0

# persist prop for extm
persist.miui.extm.enable              u:object_r:system_perf_init_prop:s0
persist.miui.extm.bdsize              u:object_r:system_perf_init_prop:s0
miui.extm.low_data                    u:object_r:system_perf_init_prop:s0
