# file_contexts

# DATA
/data/vendor/tee(/.*)?                       u:object_r:tee_vendor_data_file:s0

# DEV
/dev/socket/tz                               u:object_r:tz_socket:s0
/dev/tuihw                                   u:object_r:tz_device:s0
/dev/tzdev                                   u:object_r:tz_user_device:s0
/dev/tzic                                    u:object_r:tz_device:s0
/dev/tzirs                                   u:object_r:tz_device:s0
/dev/tziwsock                                u:object_r:tz_user_device:s0

# VENDOR
/(vendor|system/vendor)/bin/tzdaemon         u:object_r:tzdaemon_exec:s0
/(vendor|system/vendor)/bin/tzts_daemon      u:object_r:tztsdaemon_exec:s0

/(vendor|system/vendor)/lib(64)?/libteecl\.so    u:object_r:same_process_hal_file:s0
### DATA
/data/vendor/biometrics(/.*)?                u:object_r:biometrics_vendor_data_file:s0
/data/vendor/conn(/.*)?                      u:object_r:conn_vendor_data_file:s0
/data/vendor/gps(/.*)?                       u:object_r:gps_vendor_data_file:s0
/data/vendor/wifi(/.*)?                      u:object_r:wifi_vendor_data_file:s0
/data/vendor/log(/.*)?                       u:object_r:log_vendor_data_file:s0
/data/vendor/log/cbd(/.*)?                   u:object_r:log_cbd_vendor_data_file:s0
/data/vendor/secradio(/.*)?                  u:object_r:radio_vendor_data_file:s0

### DEV
/dev/block/platform/.+/by-name/boot          u:object_r:boot_block_device:s0
/dev/block/platform/.+/by-name/cache         u:object_r:cache_block_device:s0
/dev/block/platform/.+/by-name/efs           u:object_r:efs_block_device:s0
/dev/block/platform/.+/by-name/dqmdbg        u:object_r:dqmdbg_block_device:s0
/dev/block/platform/.+/by-name/dtbo          u:object_r:dtbo_block_device:s0
/dev/block/platform/.+/by-name/keydata       u:object_r:keydata_block_device:s0
/dev/block/platform/.+/by-name/keyrefuge     u:object_r:keyrefuge_block_device:s0
/dev/block/platform/.+/by-name/metadata      u:object_r:metadata_block_device:s0
/dev/block/platform/.+/by-name/misc          u:object_r:misc_block_device:s0
/dev/block/platform/.+/by-name/modem         u:object_r:modem_block_device:s0
/dev/block/platform/.+/by-name/omr           u:object_r:omr_block_device:s0
/dev/block/platform/.+/by-name/persistent    u:object_r:frp_block_device:s0
/dev/block/platform/.+/by-name/radio         u:object_r:radio_block_device:s0
/dev/block/platform/.+/by-name/recovery      u:object_r:recovery_block_device:s0
/dev/block/platform/.+/by-name/sec_efs       u:object_r:sec_efs_block_device:s0
/dev/block/platform/.+/by-name/super         u:object_r:super_block_device:s0
/dev/block/platform/.+/by-name/userdata      u:object_r:userdata_block_device:s0

/dev/esfp[0-9]                               u:object_r:fp_sensor_device:s0
/dev/batch_io                                u:object_r:io_device:s0
/dev/ssp_sensorhub                           u:object_r:ssp_device:s0

# bluetooth
/dev/ttySAC[0-9]                             u:object_r:bt_device:s0

# cpu
/dev/cpu_dma_latency                         u:object_r:cpu_dma_device:s0

### epic
/dev/mode                                    u:object_r:epic_device:s0
/dev/socket/epic                             u:object_r:epicd_socket:s0

### gnss/gps
/dev/bbd_control                             u:object_r:bbd_device:s0
/dev/bbd_packet                              u:object_r:bbd_device:s0
/dev/bbd_patch                               u:object_r:bbd_device:s0
/dev/bbd_reliable                            u:object_r:bbd_device:s0
/dev/bbd_sensor                              u:object_r:bbd_device:s0
/dev/bbd_sio                                 u:object_r:bbd_device:s0
/dev/bbd_urgent_patch                        u:object_r:bbd_device:s0
/dev/ttyBCM[0-9]*                            u:object_r:bbd_device:s0

### qos
/dev/bus_throughput                          u:object_r:pm_qos_device:s0
/dev/bus_throughput_max                      u:object_r:pm_qos_device:s0
/dev/cluster0_freq_max                       u:object_r:pm_qos_device:s0
/dev/cluster0_freq_min                       u:object_r:pm_qos_device:s0
/dev/cluster1_freq_max                       u:object_r:pm_qos_device:s0
/dev/cluster1_freq_min                       u:object_r:pm_qos_device:s0
/dev/cluster2_freq_max                       u:object_r:pm_qos_device:s0
/dev/cluster2_freq_min                       u:object_r:pm_qos_device:s0
/dev/cpu_online_max                          u:object_r:pm_qos_device:s0
/dev/cpu_online_min                          u:object_r:pm_qos_device:s0
/dev/device_throughput                       u:object_r:pm_qos_device:s0
/dev/device_throughput_max                   u:object_r:pm_qos_device:s0
/dev/gpu_freq_max                            u:object_r:pm_qos_device:s0
/dev/gpu_freq_min                            u:object_r:pm_qos_device:s0
/dev/mfc_throughput                          u:object_r:pm_qos_device:s0
/dev/mfc_throughput_max                      u:object_r:pm_qos_device:s0
/dev/network_throughput                      u:object_r:radio_qos_device:s0
/dev/npu_throughput                          u:object_r:pm_qos_device:s0
/dev/npu_throughput_max                      u:object_r:pm_qos_device:s0

### radio
# DRB
/dev/drb                                     u:object_r:drb_device:s0

# UMTS
/dev/umts_boot0                              u:object_r:vendor_radio_device:s0
/dev/umts_cass                               u:object_r:vendor_radio_device:s0
/dev/umts_ipc[0-1]                           u:object_r:vendor_radio_device:s0
/dev/umts_dm0                                u:object_r:vendor_radio_device:s0
/dev/umts_rfs0                               u:object_r:vendor_radio_device:s0
/dev/umts_router                             u:object_r:vendor_radio_device:s0

### EFS
/efs/Battery(/.*)?                           u:object_r:battery_efs_file:s0
/efs/DAK(/.*)?                               u:object_r:prov_efs_file:s0
/efs/afc(/.*)?                               u:object_r:sec_efs_file:s0
/efs/bluetooth(/.*)?                         u:object_r:bluetooth_efs_file:s0
/efs/cpk(/.*)?                               u:object_r:cpk_efs_file:s0
/efs/imei(/.*)?                              u:object_r:imei_efs_file:s0
/efs/nfc(/.*)?                               u:object_r:nfc_efs_file:s0
/efs/nv_data\.bin(.*)                        u:object_r:bin_nv_data_efs_file:s0
/efs/pfw_data(/.*)?                          u:object_r:pfw_efs_file:s0
/efs/prov(/.*)?                              u:object_r:prov_efs_file:s0
/efs/prov_data(/.*)?                         u:object_r:prov_efs_file:s0
/efs/root(/.*)?                              u:object_r:app_efs_file:s0
/efs/tee(/.*)?                               u:object_r:tee_efs_file:s0
/efs/wifi(/.*)?                              u:object_r:wifi_efs_file:s0

/mnt/vendor/efs(/.*)?                        u:object_r:efs_file:s0
/mnt/vendor/efs/DAK(/.*)?                    u:object_r:prov_efs_file:s0
/mnt/vendor/efs/afc(/.*)?                    u:object_r:sec_efs_file:s0
/mnt/vendor/efs/bluetooth(/.*)?              u:object_r:bluetooth_efs_file:s0
/mnt/vendor/efs/cpk(/.*)?                    u:object_r:cpk_efs_file:s0
/mnt/vendor/efs/imei(/.*)?                   u:object_r:imei_efs_file:s0
/mnt/vendor/efs/nv_data\.bin(.*)             u:object_r:bin_nv_data_efs_file:s0
/mnt/vendor/efs/pfw_data(/.*)?               u:object_r:pfw_efs_file:s0
/mnt/vendor/efs/prov(/.*)?                   u:object_r:prov_efs_file:s0
/mnt/vendor/efs/prov_data(/.*)?              u:object_r:prov_efs_file:s0
/mnt/vendor/efs/root(/.*)?                   u:object_r:app_efs_file:s0
/mnt/vendor/efs/tee(/.*)?                    u:object_r:tee_efs_file:s0
/mnt/vendor/efs/wifi(/.*)?                   u:object_r:wifi_efs_file:s0

### VENDOR
/(vendor|system/vendor)/bin/cbd              u:object_r:cbd_exec:s0
/(vendor|system/vendor)/bin/secril_config_svc    u:object_r:secril_config_svc_exec:s0

/(vendor|system/vendor)/bin/hw/android\.hardware\.biometrics\.fingerprint@[0-9].[0-9]-service\.samsung    u:object_r:hal_fingerprint_default_exec:s0
/(vendor|system/vendor)/bin/hw/android\.hardware\.light(@[0-9].[0-9])?-service\.samsung              u:object_r:hal_light_default_exec:s0
/(vendor|system/vendor)/bin/hw/android\.hardware\.thermal@[0-9].[0-9]-service\.samsung            u:object_r:hal_thermal_default_exec:s0

####################################
# Devices
/dev/mali[0-9]*                                             u:object_r:gpu_device:s0
/dev/umts_ipc0                                              u:object_r:radio_device:s0
/dev/fimg2d                                                 u:object_r:video_device:s0
/dev/sec-nfc                                                u:object_r:nfc_device:s0
/dev/esfp0                                                  u:object_r:goodix_device:s0
/dev/goodix_fp                                              u:object_r:goodix_device:s0
/dev/gnss_ipc                                               u:object_r:gps_device:s0
/dev/scsc_h4_0                                              u:object_r:bt_device:s0
/dev/cpuset(/.*)?                                           u:object_r:cgroup:s0

# camera
/dev/m2m1shot_scaler0                                       u:object_r:m2m1shot_device:s0
 
# DRM
/dev/s5p-smem 						    u:object_r:drm_device:s0

# usb
/dev/android_ssusbcon(/.*)?                                 u:object_r:usb_device:s0
/dev/mtp_usb*                                               u:object_r:mtp_device:s0
/dev/usb(/.*)?                                              u:object_r:usb_device:s0

# adbroot and storaged
/dev/stune(/.*)?                                            u:object_r:cgroup:s0

# blocks
/dev/block/zram0                                            u:object_r:swap_block_device:s0

/dev/block/platform/.+/by-name/(omr|OMR)?                   u:object_r:omr_block_device:s0
/dev/block/platform/.+/by-name/(misc|MISC)?                 u:object_r:misc_block_device:s0
/dev/block/platform/.+/by-name/(cpefs|CPEFS)?               u:object_r:efs_block_device:s0
/dev/block/platform/.+/by-name/(efs|EFS)?                   u:object_r:efs_block_device:s0
/dev/block/platform/.+/by-name/(radio|RADIO)?               u:object_r:radio_block_device:s0
/dev/block/platform/.+/by-name/(cache|CACHE)?               u:object_r:cache_block_device:s0
/dev/block/platform/.+/by-name/(system|SYSTEM)?             u:object_r:system_block_device:s0
/dev/block/platform/.+/by-name/(userdata|USERDATA)?         u:object_r:userdata_block_device:s0
/dev/block/platform/.+/by-name/(keyrefuge|KEYREFUGE)?       u:object_r:keyrefuge_block_device:s0
/dev/block/platform/.+/by-name/(persistent|PERSISTENT)?     u:object_r:frp_block_device:s0
/dev/block/platform/.+/by-name/(boot|BOOT)?                 u:object_r:boot_block_device:s0
/dev/block/platform/.+/by-name/(recovery|RECOVERY)?         u:object_r:recovery_block_device:s0

####################################
# efs
/mnt/vendor/cpefs(/.*)?                                     u:object_r:efs_file:s0

####################################
# data files
/data/vendor/nfc(/.*)?                                      u:object_r:nfc_vendor_data_file:s0
# drm
/data/vendor/mediadrm(/.*)?                                 u:object_r:mediadrm_data_file:s0

# camera
/data/camera(/.*)?                                          u:object_r:camera_data_file:s0

####################################
### VENDOR
/(vendor|system/vendor)/lib(64)?/hw/gralloc\.exynos7884B\.so  u:object_r:same_process_hal_file:s0
/(vendor|system/vendor)/lib(64)?/hw/gralloc\.exynos7904\.so  u:object_r:same_process_hal_file:s0
/(vendor|system/vendor)/lib(64)?/libion_exynos\.so          u:object_r:same_process_hal_file:s0
/(vendor|system/vendor)/bin/main_abox                       u:object_r:abox_exec:s0
/(vendor|system/vendor)/bin/wlbtd                           u:object_r:wlbtd_exec:s0
/(vendor|system/vendor)/bin/hw/gpsd                         u:object_r:gpsd_exec:s0
/(vendor|system/vendor)/bin/hw/macloader                    u:object_r:macloader_exec:s0
/(vendor|system/vendor)/bin/hw/android\.hardware\.power(@[0-9]\.[0-9])?-service\.samsung-libperfmgr   u:object_r:hal_power_default_exec:s0
/(vendor|system/vendor)/bin/hw/android\.hardware\.vibrator(@[0-9].[0-9])?-service\.samsung    u:object_r:hal_vibrator_default_exec:s0
/(vendor|system/vendor)/bin/hw/android\.hardware\.drm@[0-9]\.[0-9]-service\.clearkey          u:object_r:hal_drm_clearkey_exec:s0
/(vendor|system/vendor)/bin/hw/android\.hardware\.drm@[0-9]\.[0-9]-service\.widevine          u:object_r:hal_drm_widevine_exec:s0
/(vendor|system/vendor)/bin/hw/android\.hardware\.keymaster@[0-9]\.[0-9]-service\.samsung     u:object_r:hal_keymaster_default_exec:s0
/(vendor|system/vendor)/bin/hw/android\.hardware\.nfc@[0-9]\.[0-9]-service\.samsung           u:object_r:hal_nfc_default_exec:s0
/(vendor|system/vendor)/bin/hw/android\.hardware\.usb@[0-9]\.[0-9]-service\.samsung        u:object_r:hal_usb_default_exec:s0
/(vendor|system/vendor)/bin/hw/android\.hardware\.camera\.provider@[0-9]\.[0-9]-service\.exynos7885        u:object_r:hal_camera_default_exec:s0
/(vendor|system/vendor)/bin/hw/android\.hardware\.usb@[0-9]\.[0-9]-service\.a10	              u:object_r:hal_usb_default_exec:s0
/(vendor|system/vendor)/bin/hw/vendor\.samsung\.hardware\.gnss@[0-9]\.[0-9]-service           u:object_r:hal_gnss_default_exec:s0
/(vendor|system/vendor)/firmware(/.*)?       u:object_r:vendor_firmware_file:s0

/factory(/.*)?									u:object_r:sec_efs_file:s0

