sepolicy: Bring-up changes for following targets on new components

moving the sepolicy to new branch for following targets
  msmsteppe
  trinket
  sdmmagpie

Change-Id: Id4b80adafad4f64610e0ae17cfbce56a3b1b6f94
This commit is contained in:
vijay.rayabarapu
2019-02-20 14:24:34 +05:30
committed by Gerrit - the friendly Code Review server
parent 72b1eb3af1
commit 2f62f4c113
32 changed files with 1381 additions and 0 deletions

31
qva/vendor/msmsteppe/file.te vendored Normal file
View File

@@ -0,0 +1,31 @@
# Copyright (c) 2018, The Linux Foundation. All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
type sysfs_fps_attr, fs_type, sysfs_type;
# secure element file type for data vendor access
type secure_element_vendor_data_file, file_type, data_file_type;

168
qva/vendor/msmsteppe/file_contexts vendored Normal file
View File

@@ -0,0 +1,168 @@
# Copyright (c) 2016-2019, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
###################################
# Dev block nodes
#Primary storage device nodes
/dev/block/mmcblk0rpmb u:object_r:rpmb_device:s0
/dev/block/mmcblk0 u:object_r:root_block_device:s0
# UFS Devices
/dev/block/platform/soc/1d84000.ufshc/by-name/system u:object_r:system_block_device:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/metadata u:object_r:metadata_block_device:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/userdata u:object_r:userdata_block_device:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/boot u:object_r:boot_block_device:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/logdump u:object_r:logdump_partition:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/fsc u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/fsg u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/modemst1 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/modemst2 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/ssd u:object_r:ssd_block_device:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/misc u:object_r:misc_block_device:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/rpm u:object_r:rpmb_device:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/msadp u:object_r:mba_debug_dev:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/recovery u:object_r:recovery_block_device:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/cache u:object_r:cache_block_device:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/frp u:object_r:frp_block_device:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/mdtp u:object_r:mdtp_device:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/dip u:object_r:dip_device:s0
#rawdump partition
/dev/block/platform/soc/1d84000.ufshc/by-name/rawdump u:object_r:rawdump_block_device:s0
# A/B partitions.
/dev/block/platform/soc/1d84000.ufshc/by-name/abl_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/aop_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/apdp_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/bluetooth_[ab] u:object_r:modem_block_device:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/boot_[ab] u:object_r:boot_block_device:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/cmnlib_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/cmnlib64_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/devcfg_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/dsp_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/dtbo_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/hyp_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/keymaster_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/mdtp_[ab] u:object_r:mdtp_device:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/mdtpsecapp_[ab] u:object_r:mdtp_device:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/modem_[ab] u:object_r:modem_block_device:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/msadp_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/persist u:object_r:persist_block_device:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/pmic_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/qupfw_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/rpm_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/system_[ab] u:object_r:system_block_device:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/tz_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/vbmeta_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/vendor_[ab] u:object_r:system_block_device:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/xbl_[ab] u:object_r:xbl_block_device:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/xbl_config_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/imagefv_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/1d84000.ufshc/by-name/uefisecapp_[ab] u:object_r:uefi_block_device:s0
# Block device holding the GPT, where the A/B attributes are stored.
/dev/block/platform/soc/1d84000.ufshc/sd[ade] u:object_r:gpt_block_device:s0
# Block devices for the drive that holds the xbl_a and xbl_b partitions.
/dev/block/platform/soc/1d84000.ufshc/sd[bc] u:object_r:xbl_block_device:s0
##################################
# non-hlos mount points
/firmware u:object_r:firmware_file:s0
/bt_firmware u:object_r:bt_firmware_file:s0
#for eMMC
/dev/block/platform/soc/7c4000.sdhci/by-name/abl_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/apdp_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/boot_[ab] u:object_r:boot_block_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/cmnlib_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/cmnlib64_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/devcfg_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/hyp_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/keymaster_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/modem_[ab] u:object_r:modem_block_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/bluetooth_[ab] u:object_r:modem_block_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/msadp_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/pmic_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/rpm_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/system_[ab] u:object_r:system_block_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/tz_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/vendor_[ab] u:object_r:system_block_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/xbl_[ab] u:object_r:xbl_block_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/aop_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/vbmeta_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/dtbo_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/dsp_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/mdtp_[ab] u:object_r:mdtp_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/mdtpsecapp_[ab] u:object_r:mdtp_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/qupfw_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/xbl_config_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/storsec_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/imagefv_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/uefisecapp_[ab] u:object_r:uefi_block_device:s0
#non A/B
/dev/block/platform/soc/7c4000.sdhci/by-name/system u:object_r:system_block_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/metadata u:object_r:metadata_block_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/userdata u:object_r:userdata_block_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/boot u:object_r:boot_block_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/logdump u:object_r:logdump_partition:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/fsc u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/fsg u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/modemst1 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/modemst2 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/ssd u:object_r:ssd_block_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/misc u:object_r:misc_block_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/rpm u:object_r:rpmb_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/msadp u:object_r:mba_debug_dev:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/recovery u:object_r:recovery_block_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/cache u:object_r:cache_block_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/frp u:object_r:frp_block_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/mdtp u:object_r:mdtp_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/dip u:object_r:dip_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/storsec u:object_r:boot_block_device:s0
/dev/block/platform/soc/7c4000.sdhci/by-name/persist u:object_r:persist_block_device:s0
#rawdump partition
/dev/block/platform/soc/7c4000.sdhci/by-name/rawdump u:object_r:rawdump_block_device:s0
# FBE
/(vendor|system/vendor)/bin/init.qti.qseecomd.sh u:object_r:init-qti-fbe-sh_exec:s0
/(vendor|system/vendor)/bin/init\.qti\.can\.sh u:object_r:qti_init_shell_exec:s0
##################################
# same process HAL libs
/vendor/lib(64)?/hw/gralloc\.sm6150\.so u:object_r:same_process_hal_file:s0
/vendor/lib(64)?/hw/vulkan\.sm6150\.so u:object_r:same_process_hal_file:s0
#FPC
/sys/devices/platform/soc/soc:fpc1020(/.*?) u:object_r:sysfs_fps_attr:s0
/sys/devices/platform/soc/200f000.qcom,spmi/spmi-0/spmi0-03/200f000.qcom,spmi:qcom,pmi632@3:qcom,leds@d000/modalias u:object_r:sysfs_fps_attr:s0
/(vendor|system/vendor)/bin/hw/android\.hardware\.biometrics\.fingerprint@2\.1-service-fpc u:object_r:hal_fingerprint_fpc_exec:s0
# data files
/data/vendor/secure_element(/.*)? u:object_r:secure_element_vendor_data_file:s0

32
qva/vendor/msmsteppe/fingerprintd.te vendored Normal file
View File

@@ -0,0 +1,32 @@
# Copyright (c) 2018, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
allow hal_fingerprint input_device:dir r_dir_perms;
allow hal_fingerprint sysfs_fps_attr:file rw_file_perms;
allow hal_fingerprint uhid_device:chr_file rw_file_perms;
r_dir_file(hal_fingerprint, firmware_file);
r_dir_file(hal_fingerprint, sysfs_leds);

100
qva/vendor/msmsteppe/genfs_contexts vendored Executable file
View File

@@ -0,0 +1,100 @@
# Copyright (c) 2018, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
###################################
#pmic sysfs_nodes
genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-00/c440000.qcom,spmi:qcom,pm6150@0:qcom,qpnp-smb5/power_supply/battery u:object_r:sysfs_battery_supply:s0
genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-00/c440000.qcom,spmi:qcom,pm6150@0:qcom,qpnp-smb5/power_supply/dc u:object_r:sysfs_battery_supply:s0
genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-00/c440000.qcom,spmi:qcom,pm6150@0:qcom,qpnp-smb5/power_supply/main u:object_r:sysfs_battery_supply:s0
genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-00/c440000.qcom,spmi:qcom,pm6150@0:qcom,qpnp-smb5/power_supply/pc_port u:object_r:sysfs_usb_supply:s0
genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-00/c440000.qcom,spmi:qcom,pm6150@0:qcom,qpnp-smb5/power_supply/usb u:object_r:sysfs_usb_supply:s0
genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-00/c440000.qcom,spmi:qcom,pm6150@0:qcom,usb-pdphy@1700/usbpd/usbpd0 u:object_r:sysfs_usbpd_device:s0
genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-00/c440000.qcom,spmi:qcom,pm6150@0:qpnp,qg/power_supply/bms u:object_r:sysfs_battery_supply:s0
genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-00/c440000.qcom,spmi:qcom,pm6150@0:qcom,pm6150_rtc/rtc u:object_r:sysfs_rtc:s0
genfscon sysfs /devices/platform/soc/88c000.i2c/i2c-2/2-0008/88c000.i2c:qcom,smb1355@8:qcom,smb1355-charger@1000/power_supply/parallel u:object_r:sysfs_battery_supply:s0
genfscon sysfs /devices/platform/soc/88c000.i2c/i2c-2/2-000c/88c000.i2c:qcom,smb1355@c:qcom,smb1355-charger@1000/power_supply/parallel u:object_r:sysfs_battery_supply:s0
genfscon sysfs /devices/platform/soc/88c000.i2c/i2c-2/2-0010/88c000.i2c:qcom,smb1390@10:qcom,charge_pump/power_supply/charge_pump u:object_r:sysfs_battery_supply:s0
genfscon sysfs /class/qcom-battery u:object_r:sysfs_battery_supply:s0
genfscon sysfs /class/charge_pump u:object_r:sysfs_battery_supply:s0
genfscon sysfs /devices/platform/soc/a8c000.i2c/i2c-2/2-000c/a8c000.i2c:qcom,smb1355@c:qcom,smb1355-charger@1000/power_supply/parallel u:object_r:sysfs_battery_supply:s0
genfscon sysfs /devices/platform/soc/a8c000.i2c/i2c-2/2-0008/a8c000.i2c:qcom,smb1355@8:qcom,smb1355-charger@1000/power_supply/parallel u:object_r:sysfs_battery_supply:s0
genfscon sysfs /devices/platform/soc/a8c000.i2c/i2c-2/2-0010/a8c000.i2c:qcom,smb1390@10:qcom,charge_pump/power_supply/charge_pump_master u:object_r:sysfs_battery_supply:s0
genfscon sysfs /devices/platform/soc/88c000.i2c/i2c-2/2-0010/88c000.i2c:qcom,smb1390@10:qcom,charge_pump/power_supply/charge_pump_master u:object_r:sysfs_battery_supply:s0
genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-01/c440000.qcom,spmi:qcom,pm6150@1:qcom,vibrator@5300/leds/vibrator u:object_r:sysfs_leds:s0
genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-05/c440000.qcom,spmi:qcom,pm6150l@5:qcom,leds@d000/leds/red u:object_r:sysfs_graphics:s0
genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-05/c440000.qcom,spmi:qcom,pm6150l@5:qcom,leds@d000/leds/green u:object_r:sysfs_graphics:s0
genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-05/c440000.qcom,spmi:qcom,pm6150l@5:qcom,leds@d000/leds/blue u:object_r:sysfs_graphics:s0
genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-05/c440000.qcom,spmi:qcom,pm6150l@5:qcom,leds@d300/leds u:object_r:sysfs_leds:s0
genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-05/c440000.qcom,spmi:qcom,pm6150l@5:qcom,wled@d800/leds u:object_r:sysfs_leds:s0
genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-05/c440000.qcom,spmi:qcom,pm6150l@5:qcom,wled@d800/backlight u:object_r:sysfs_leds:s0
# subsys SSR entries
genfscon sysfs /devices/platform/soc/62400000.qcom,lpass/subsys0/name u:object_r:sysfs_ssr:s0
genfscon sysfs /devices/platform/soc/4080000.qcom,mss/subsys1/name u:object_r:sysfs_ssr:s0
genfscon sysfs /devices/platform/soc/8300000.qcom,turing/subsys2/name u:object_r:sysfs_ssr:s0
genfscon sysfs /devices/platform/soc/aae0000.qcom,venus/subsys3/name u:object_r:sysfs_ssr:s0
genfscon sysfs /devices/platform/soc/soc:qcom,ipa_fws/subsys4/name u:object_r:sysfs_ssr:s0
genfscon sysfs /devices/platform/soc/soc:qcom,kgsl-hyp/subsys5/name u:object_r:sysfs_ssr:s0
#diffrent target using same apps combo
genfscon sysfs /devices/platform/soc/8300000.qcom,turing/subsys1/name u:object_r:sysfs_ssr:s0
genfscon sysfs /devices/platform/soc/4080000.qcom,mss/subsys2/name u:object_r:sysfs_ssr:s0
genfscon sysfs /devices/platform/soc/9800000.qcom,npu/subsys4/name u:object_r:sysfs_ssr:s0
genfscon sysfs /devices/platform/soc/soc:qcom,ipa_fws/subsys5/name u:object_r:sysfs_ssr:s0
genfscon sysfs /devices/platform/soc/soc:qcom,kgsl-hyp/subsys6/name u:object_r:sysfs_ssr:s0
#entry for usb controller
genfscon sysfs /devices/platform/soc/a600000.ssusb/a600000.dwc3/udc/a600000.dwc3 u:object_r:sysfs_usb_controller:s0
#qdss sysfs-node
genfscon sysfs /devices/platform/soc/6047000.tmc/coresight-tmc-etf u:object_r:sysfs_qdss_dev:s0
genfscon sysfs /devices/platform/soc/6048000.tmc/coresight-tmc-etr u:object_r:sysfs_qdss_dev:s0
genfscon sysfs /devices/platform/soc/6002000.stm/coresight-stm u:object_r:sysfs_qdss_dev:s0
genfscon sysfs /devices/platform/soc/91866f0.hwevent/coresight-hwevent u:object_r:sysfs_qdss_dev:s0
genfscon sysfs /devices/platform/soc/6b0e000.csr/coresight-swao-csr u:object_r:sysfs_qdss_dev:s0
genfscon sysfs /devices/platform/soc/soc:qcom,cpu-cpu-llcc-bw/devfreq u:object_r:sysfs_devfreq:s0
genfscon sysfs /devices/platform/soc/soc:qcom,cpu-llcc-ddr-bw/devfreq u:object_r:sysfs_devfreq:s0
genfscon sysfs /devices/platform/soc/soc:qcom,cpu0-cpu-l3-lat/devfreq u:object_r:sysfs_devfreq:s0
genfscon sysfs /devices/platform/soc/soc:qcom,cpu6-cpu-l3-lat/devfreq u:object_r:sysfs_devfreq:s0
genfscon sysfs /devices/platform/soc/soc:qcom,cpu0-cpu-llcc-lat/devfreq u:object_r:sysfs_devfreq:s0
genfscon sysfs /devices/platform/soc/soc:qcom,cpu6-cpu-llcc-lat/devfreq u:object_r:sysfs_devfreq:s0
genfscon sysfs /devices/platform/soc/soc:qcom,cpu0-llcc-ddr-lat/devfreq u:object_r:sysfs_devfreq:s0
genfscon sysfs /devices/platform/soc/soc:qcom,cpu6-llcc-ddr-lat/devfreq u:object_r:sysfs_devfreq:s0
genfscon sysfs /devices/platform/soc/soc:qcom,cpu0-cpu-ddr-latfloor/devfreq u:object_r:sysfs_devfreq:s0
genfscon sysfs /devices/platform/soc/soc:qcom,cpu6-cpu-ddr-latfloor/devfreq u:object_r:sysfs_devfreq:s0
genfscon sysfs /devices/platform/soc/soc:qcom,cdsp-cdsp-l3-lat/devfreq u:object_r:sysfs_devfreq:s0
genfscon sysfs /devices/platform/soc/soc:qcom,npu-npu-ddr-bw/devfreq u:object_r:sysfs_devfreq:s0
#fps sysfs-node
genfscon sysfs /devices/platform/soc/ae00000.qcom,mdss_mdp/drm/card0/sde-crtc-0/measured_fps u:object_r:sysfs_graphics:s0
genfscon sysfs /devices/platform/soc/ae00000.qcom,mdss_mdp/drm/card0/sde-crtc-1/measured_fps u:object_r:sysfs_graphics:s0
genfscon sysfs /devices/platform/soc/ae00000.qcom,mdss_mdp/drm/card0/sde-crtc-2/measured_fps u:object_r:sysfs_graphics:s0
genfscon sysfs /devices/platform/soc/ae00000.qcom,mdss_mdp/drm/card0/sde-crtc-0/fps_periodicity_ms u:object_r:sysfs_graphics:s0
genfscon sysfs /devices/platform/soc/ae00000.qcom,mdss_mdp/drm/card0/sde-crtc-1/fps_periodicity_ms u:object_r:sysfs_graphics:s0
genfscon sysfs /devices/platform/soc/ae00000.qcom,mdss_mdp/drm/card0/sde-crtc-2/fps_periodicity_ms u:object_r:sysfs_graphics:s0
#subsys nodes
genfscon sysfs /devices/platform/soc/soc:bt_qca6174/extldo u:object_r:sysfs_bluetooth_writable:s0
genfscon sysfs /devices/platform/soc/soc:bt_qca6174/rfkill/rfkill0/state u:object_r:sysfs_bluetooth_writable:s0

View File

@@ -0,0 +1,35 @@
# Copyright (c) 2018, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
type hal_fingerprint_fpc, domain;
hal_server_domain(hal_fingerprint_fpc, hal_fingerprint)
type hal_fingerprint_fpc_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hal_fingerprint_fpc)
allow hal_fingerprint_fpc input_device:chr_file r_file_perms;
allow hal_fingerprint_fpc tee_device:chr_file rw_file_perms;

View File

@@ -0,0 +1,30 @@
#Copyright (c) 2018, The Linux Foundation. All rights reserved.
#
#Redistribution and use in source and binary forms, with or without
#modification, are permitted provided that the following conditions are
#met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
#THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
#WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
#MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
#ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
#BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
#CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
#SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
#BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
#WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
#OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
#IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#Allow access to the secure element HAL service
allow hal_secure_element_default secure_element_vendor_data_file:dir rw_dir_perms;
allow hal_secure_element_default secure_element_vendor_data_file:file create_file_perms;

28
qva/vendor/msmsteppe/hal_sensors.te vendored Normal file
View File

@@ -0,0 +1,28 @@
# Copyright (c) 2018, The Linux Foundation. All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
allow hal_sensors hal_fingerprint_fpc:unix_stream_socket { connectto };

32
qva/vendor/msmsteppe/hwservice_contexts vendored Normal file
View File

@@ -0,0 +1,32 @@
# Copyright (c) 2018, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
com.fingerprints.extension::IFingerprintEngineering u:object_r:hal_fingerprint_hwservice:s0
com.fingerprints.extension::IFingerprintAuthenticator u:object_r:hal_fingerprint_hwservice:s0
com.fingerprints.extension::IFingerprintNavigation u:object_r:hal_fingerprint_hwservice:s0
com.fingerprints.extension::IFingerprintSensorTest u:object_r:hal_fingerprint_hwservice:s0
com.fingerprints.extension::IFingerprintCalibration u:object_r:hal_fingerprint_hwservice:s0

37
qva/vendor/msmsteppe/init-qti-fbe-sh.te vendored Normal file
View File

@@ -0,0 +1,37 @@
# Copyright (c) 2018, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
type init-qti-fbe-sh, domain;
type init-qti-fbe-sh_exec, exec_type, file_type, vendor_file_type;
init_daemon_domain(init-qti-fbe-sh)
allow init-qti-fbe-sh vendor_shell_exec:file rx_file_perms;
# execute toybox/toolbox
allow init-qti-fbe-sh vendor_toolbox_exec:file rx_file_perms;
get_prop(init-qti-fbe-sh, vendor_tee_listener_prop)

34
qva/vendor/msmsteppe/init_shell.te vendored Normal file
View File

@@ -0,0 +1,34 @@
# Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# media_sm6150_version_prop - to choose target version specific media_codecs.xml
# media_sdmmagpie_version_prop - to choose target version specific media_codecs.xml
allow qti_init_shell {
vendor_media_sm6150_version_prop
vendor_media_sdmmagpie_version_prop
vendor_chre_enabled_prop
}:property_service set;

29
qva/vendor/msmsteppe/mediacodec.te vendored Normal file
View File

@@ -0,0 +1,29 @@
# Copyright (c) 2018, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
get_prop(mediacodec, vendor_media_sm6150_version_prop)
get_prop(mediacodec, vendor_media_sdmmagpie_version_prop)

29
qva/vendor/msmsteppe/mediaserver.te vendored Normal file
View File

@@ -0,0 +1,29 @@
# Copyright (c) 2018, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
get_prop(mediaserver, vendor_media_sm6150_version_prop)
get_prop(mediaserver, vendor_media_sdmmagpie_version_prop)

31
qva/vendor/msmsteppe/property.te vendored Normal file
View File

@@ -0,0 +1,31 @@
# Copyright (c) 2018, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#properites for init.qcom.sh script
type vendor_media_sm6150_version_prop, property_type;
type vendor_media_sdmmagpie_version_prop, property_type;
type vendor_chre_enabled_prop, property_type;

30
qva/vendor/msmsteppe/property_contexts vendored Normal file
View File

@@ -0,0 +1,30 @@
# Copyright (c) 2018, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
vendor.media.sm6150.version u:object_r:vendor_media_sm6150_version_prop:s0
vendor.media.sdmmagpie.version u:object_r:vendor_media_sdmmagpie_version_prop:s0
vendor.chre.enabled u:object_r:vendor_chre_enabled_prop:s0

32
qva/vendor/msmsteppe/recovery.te vendored Normal file
View File

@@ -0,0 +1,32 @@
# Copyright (c) 2018, The Linux Foundation. All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
recovery_only(`
domain_auto_trans(recovery, qrtr_exec, qrtr)
domain_auto_trans(recovery, rfs_access_exec, rfs_access)
domain_auto_trans(recovery, rmt_storage_exec, rmt_storage)
')

View File

@@ -0,0 +1,37 @@
# Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Allow update_engine and update_engine_sideload (recovery) read/write on the
# device-specific partitions it should update.
allow update_engine_common {
custom_ab_block_device
xbl_block_device
uefi_block_device
ssd_block_device
modem_block_device
}:blk_file rw_file_perms;

30
qva/vendor/msmsteppe/wfdservice.te vendored Normal file
View File

@@ -0,0 +1,30 @@
# Copyright (c) 2018, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#Allow access to read property file
get_prop(wfdservice,vendor_media_sdmmagpie_version_prop)

28
qva/vendor/trinket/file.te vendored Normal file
View File

@@ -0,0 +1,28 @@
# Copyright (c) 2018, The Linux Foundation. All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
type sysfs_fps_attr, fs_type, sysfs_type;

168
qva/vendor/trinket/file_contexts vendored Normal file
View File

@@ -0,0 +1,168 @@
# Copyright (c) 2016-2019, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
###################################
# Dev block nodes
#Primary storage device nodes
/dev/block/mmcblk0rpmb u:object_r:rpmb_device:s0
/dev/block/mmcblk0 u:object_r:root_block_device:s0
# UFS Devices
/dev/block/platform/soc/4804000.ufshc/by-name/system u:object_r:system_block_device:s0
/dev/block/platform/soc/4804000.ufshc/by-name/metadata u:object_r:metadata_block_device:s0
/dev/block/platform/soc/4804000.ufshc/by-name/userdata u:object_r:userdata_block_device:s0
/dev/block/platform/soc/4804000.ufshc/by-name/boot u:object_r:boot_block_device:s0
/dev/block/platform/soc/4804000.ufshc/by-name/logdump u:object_r:logdump_partition:s0
/dev/block/platform/soc/4804000.ufshc/by-name/fsc u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/4804000.ufshc/by-name/fsg u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/4804000.ufshc/by-name/modemst1 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/4804000.ufshc/by-name/modemst2 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/4804000.ufshc/by-name/ssd u:object_r:ssd_block_device:s0
/dev/block/platform/soc/4804000.ufshc/by-name/misc u:object_r:misc_block_device:s0
/dev/block/platform/soc/4804000.ufshc/by-name/rpm u:object_r:rpmb_device:s0
/dev/block/platform/soc/4804000.ufshc/by-name/msadp u:object_r:mba_debug_dev:s0
/dev/block/platform/soc/4804000.ufshc/by-name/recovery u:object_r:recovery_block_device:s0
/dev/block/platform/soc/4804000.ufshc/by-name/cache u:object_r:cache_block_device:s0
/dev/block/platform/soc/4804000.ufshc/by-name/frp u:object_r:frp_block_device:s0
/dev/block/platform/soc/4804000.ufshc/by-name/mdtp u:object_r:mdtp_device:s0
/dev/block/platform/soc/4804000.ufshc/by-name/dip u:object_r:dip_device:s0
#rawdump partition
/dev/block/platform/soc/4804000.ufshc/by-name/rawdump u:object_r:rawdump_block_device:s0
# A/B partitions.
/dev/block/platform/soc/4804000.ufshc/by-name/abl_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/4804000.ufshc/by-name/aop_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/4804000.ufshc/by-name/apdp_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/4804000.ufshc/by-name/bluetooth_[ab] u:object_r:modem_block_device:s0
/dev/block/platform/soc/4804000.ufshc/by-name/boot_[ab] u:object_r:boot_block_device:s0
/dev/block/platform/soc/4804000.ufshc/by-name/cmnlib_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/4804000.ufshc/by-name/cmnlib64_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/4804000.ufshc/by-name/devcfg_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/4804000.ufshc/by-name/dsp_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/4804000.ufshc/by-name/dtbo_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/4804000.ufshc/by-name/hyp_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/4804000.ufshc/by-name/keymaster_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/4804000.ufshc/by-name/mdtp_[ab] u:object_r:mdtp_device:s0
/dev/block/platform/soc/4804000.ufshc/by-name/mdtpsecapp_[ab] u:object_r:mdtp_device:s0
/dev/block/platform/soc/4804000.ufshc/by-name/modem_[ab] u:object_r:modem_block_device:s0
/dev/block/platform/soc/4804000.ufshc/by-name/msadp_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/4804000.ufshc/by-name/persist u:object_r:persist_block_device:s0
/dev/block/platform/soc/4804000.ufshc/by-name/pmic_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/4804000.ufshc/by-name/qupfw_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/4804000.ufshc/by-name/rpm_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/4804000.ufshc/by-name/system_[ab] u:object_r:system_block_device:s0
/dev/block/platform/soc/4804000.ufshc/by-name/tz_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/4804000.ufshc/by-name/vbmeta_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/4804000.ufshc/by-name/vendor_[ab] u:object_r:system_block_device:s0
/dev/block/platform/soc/4804000.ufshc/by-name/xbl_[ab] u:object_r:xbl_block_device:s0
/dev/block/platform/soc/4804000.ufshc/by-name/xbl_config_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/4804000.ufshc/by-name/imagefv_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/4804000.ufshc/by-name/uefisecapp_[ab] u:object_r:uefi_block_device:s0
# Block device holding the GPT, where the A/B attributes are stored.
/dev/block/platform/soc/4804000.ufshc/sd[ade] u:object_r:gpt_block_device:s0
# Block devices for the drive that holds the xbl_a and xbl_b partitions.
/dev/block/platform/soc/4804000.ufshc/sd[bc] u:object_r:xbl_block_device:s0
##################################
# non-hlos mount points
/firmware u:object_r:firmware_file:s0
/bt_firmware u:object_r:bt_firmware_file:s0
#for eMMC
/dev/block/platform/soc/4744000.sdhci/by-name/abl_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/4744000.sdhci/by-name/apdp_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/4744000.sdhci/by-name/boot_[ab] u:object_r:boot_block_device:s0
/dev/block/platform/soc/4744000.sdhci/by-name/cmnlib_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/4744000.sdhci/by-name/cmnlib64_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/4744000.sdhci/by-name/devcfg_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/4744000.sdhci/by-name/hyp_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/4744000.sdhci/by-name/keymaster_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/4744000.sdhci/by-name/modem_[ab] u:object_r:modem_block_device:s0
/dev/block/platform/soc/4744000.sdhci/by-name/bluetooth_[ab] u:object_r:modem_block_device:s0
/dev/block/platform/soc/4744000.sdhci/by-name/msadp_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/4744000.sdhci/by-name/pmic_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/4744000.sdhci/by-name/rpm_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/4744000.sdhci/by-name/system_[ab] u:object_r:system_block_device:s0
/dev/block/platform/soc/4744000.sdhci/by-name/tz_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/4744000.sdhci/by-name/vendor_[ab] u:object_r:system_block_device:s0
/dev/block/platform/soc/4744000.sdhci/by-name/xbl_[ab] u:object_r:xbl_block_device:s0
/dev/block/platform/soc/4744000.sdhci/by-name/aop_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/4744000.sdhci/by-name/vbmeta_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/4744000.sdhci/by-name/dtbo_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/4744000.sdhci/by-name/dsp_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/4744000.sdhci/by-name/mdtp_[ab] u:object_r:mdtp_device:s0
/dev/block/platform/soc/4744000.sdhci/by-name/mdtpsecapp_[ab] u:object_r:mdtp_device:s0
/dev/block/platform/soc/4744000.sdhci/by-name/qupfw_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/4744000.sdhci/by-name/xbl_config_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/4744000.sdhci/by-name/storsec_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/4744000.sdhci/by-name/imagefv_[ab] u:object_r:custom_ab_block_device:s0
/dev/block/platform/soc/4744000.sdhci/by-name/uefisecapp_[ab] u:object_r:uefi_block_device:s0
#non A/B
/dev/block/platform/soc/4744000.sdhci/by-name/system u:object_r:system_block_device:s0
/dev/block/platform/soc/4744000.ufshc/by-name/metadata u:object_r:metadata_block_device:s0
/dev/block/platform/soc/4744000.sdhci/by-name/userdata u:object_r:userdata_block_device:s0
/dev/block/platform/soc/4744000.sdhci/by-name/boot u:object_r:boot_block_device:s0
/dev/block/platform/soc/4744000.sdhci/by-name/logdump u:object_r:logdump_partition:s0
/dev/block/platform/soc/4744000.sdhci/by-name/fsc u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/4744000.sdhci/by-name/fsg u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/4744000.sdhci/by-name/modemst1 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/4744000.sdhci/by-name/modemst2 u:object_r:modem_efs_partition_device:s0
/dev/block/platform/soc/4744000.sdhci/by-name/ssd u:object_r:ssd_block_device:s0
/dev/block/platform/soc/4744000.sdhci/by-name/misc u:object_r:misc_block_device:s0
/dev/block/platform/soc/4744000.sdhci/by-name/rpm u:object_r:rpmb_device:s0
/dev/block/platform/soc/4744000.sdhci/by-name/msadp u:object_r:mba_debug_dev:s0
/dev/block/platform/soc/4744000.sdhci/by-name/recovery u:object_r:recovery_block_device:s0
/dev/block/platform/soc/4744000.sdhci/by-name/cache u:object_r:cache_block_device:s0
/dev/block/platform/soc/4744000.sdhci/by-name/frp u:object_r:frp_block_device:s0
/dev/block/platform/soc/4744000.sdhci/by-name/mdtp u:object_r:mdtp_device:s0
/dev/block/platform/soc/4744000.sdhci/by-name/dip u:object_r:dip_device:s0
/dev/block/platform/soc/4744000.sdhci/by-name/storsec u:object_r:boot_block_device:s0
/dev/block/platform/soc/4744000.sdhci/by-name/persist u:object_r:persist_block_device:s0
# Camera
/sys/devices/platform/soc/5ca0000.qcom,jpeg/video4linux/video[0-33]/name(/.*)? u:object_r:sysfs_jpeg:s0
/sys/devices/platform/soc/5c00000.qcom,msm-cam/video4linux/video[0-33]/name(/.*)? u:object_r:sysfs_jpeg:s0
#rawdump partition
/dev/block/platform/soc/4744000.sdhci/by-name/rawdump u:object_r:rawdump_block_device:s0
# FBE
/(vendor|system/vendor)/bin/init.qti.qseecomd.sh u:object_r:init-qti-fbe-sh_exec:s0
/(vendor|system/vendor)/bin/init\.qti\.can\.sh u:object_r:qti_init_shell_exec:s0
##################################
# same process HAL libs
/vendor/lib(64)?/hw/gralloc\.trinket\.so u:object_r:same_process_hal_file:s0
/vendor/lib(64)?/hw/vulkan\.trinket\.so u:object_r:same_process_hal_file:s0
#FPC
/sys/devices/platform/soc/soc:fpc1020(/.*?) u:object_r:sysfs_fps_attr:s0
/sys/devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-03/c440000.qcom,spmi:qcom,pmi632@3:qcom,leds@d000/leds/modalias u:object_r:sysfs_fps_attr:s0
/(vendor|system/vendor)/bin/hw/android\.hardware\.biometrics\.fingerprint@2\.1-service-fpc u:object_r:hal_fingerprint_fpc_exec:s0

32
qva/vendor/trinket/fingerprintd.te vendored Normal file
View File

@@ -0,0 +1,32 @@
# Copyright (c) 2018, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
allow hal_fingerprint input_device:dir r_dir_perms;
allow hal_fingerprint sysfs_fps_attr:file rw_file_perms;
allow hal_fingerprint uhid_device:chr_file rw_file_perms;
r_dir_file(hal_fingerprint, firmware_file);
r_dir_file(hal_fingerprint, sysfs_leds);

67
qva/vendor/trinket/genfs_contexts vendored Normal file
View File

@@ -0,0 +1,67 @@
# Copyright (c) 2018, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
###################################
#pmic sysfs_nodes
genfscon sysfs /devices/platform/soc/1c40000.qcom,spmi/spmi-0/spmi0-00/1c40000.qcom,spmi:qcom,pm6125@0:qcom,pm6125_rtc/rtc u:object_r:sysfs_rtc:s0
genfscon sysfs /devices/platform/soc/1c40000.qcom,spmi/spmi-0/spmi0-02/1c40000.qcom,spmi:qcom,pmi632@2:qcom,qpnp-smb5/power_supply/battery u:object_r:sysfs_battery_supply:s0
genfscon sysfs /devices/platform/soc/1c40000.qcom,spmi/spmi-0/spmi0-02/1c40000.qcom,spmi:qcom,pmi632@2:qcom,qpnp-smb5/power_supply/pc_port u:object_r:sysfs_usb_supply:s0
genfscon sysfs /devices/platform/soc/1c40000.qcom,spmi/spmi-0/spmi0-02/1c40000.qcom,spmi:qcom,pmi632@2:qcom,qpnp-smb5/power_supply/usb u:object_r:sysfs_usb_supply:s0
genfscon sysfs /devices/platform/soc/1c40000.qcom,spmi/spmi-0/spmi0-02/1c40000.qcom,spmi:qcom,pmi632@2:qcom,qpnp-smb5/power_supply/main u:object_r:sysfs_battery_supply:s0
genfscon sysfs /devices/platform/soc/1c40000.qcom,spmi/spmi-0/spmi0-02/1c40000.qcom,spmi:qcom,pmi632@2:qpnp,qg/power_supply/bms u:object_r:sysfs_battery_supply:s0
genfscon sysfs /devices/platform/soc/4a84000.i2c/i2c-0/0-0008/4a84000.i2c:qcom,smb1355@8:qcom,smb1355-charger@1000/power_supply/parallel u:object_r:sysfs_battery_supply:s0
genfscon sysfs /devices/platform/soc/4a84000.i2c/i2c-0/0-000c/4a84000.i2c:qcom,smb1355@c:qcom,smb1355-charger@1000/power_supply/parallel u:object_r:sysfs_battery_supply:s0
genfscon sysfs /class/qcom-battery u:object_r:sysfs_battery_supply:s0
genfscon sysfs /devices/platform/soc/1c40000.qcom,spmi/spmi-0/spmi0-03/1c40000.qcom,spmi:qcom,pmi632@3:qcom,leds@d000/leds u:object_r:sysfs_graphics:s0
genfscon sysfs /devices/platform/soc/1c40000.qcom,spmi/spmi-0/spmi0-03/1c40000.qcom,spmi:qcom,pmi632@3:qcom,leds@d300/leds u:object_r:sysfs_leds:s0
genfscon sysfs /devices/platform/soc/1c40000.qcom,spmi/spmi-0/spmi0-03/1c40000.qcom,spmi:qcom,pmi632@3:qcom,vibrator@5700/leds/vibrator u:object_r:sysfs_leds:s0
genfscon sysfs /devices/platform/soc/6080000.qcom,mss/subsys0/name u:object_r:sysfs_ssr:s0
genfscon sysfs /devices/platform/soc/ab00000.qcom,lpass/subsys1/name u:object_r:sysfs_ssr:s0
genfscon sysfs /devices/platform/soc/b300000.qcom,turing/subsys2/name u:object_r:sysfs_ssr:s0
genfscon sysfs /devices/platform/soc/soc:qcom,ipa_fws/subsys3/name u:object_r:sysfs_ssr:s0
genfscon sysfs /devices/platform/soc/5ae0000.qcom,venus/subsys4/name u:object_r:sysfs_ssr:s0
genfscon sysfs /devices/platform/soc/soc:qcom,kgsl-hyp/subsys5/name u:object_r:sysfs_ssr:s0
#qdss sysfs-node
genfscon sysfs /devices/platform/soc/8047000.tmc/coresight-tmc-etf u:object_r:sysfs_qdss_dev:s0
genfscon sysfs /devices/platform/soc/8048000.tmc/coresight-tmc-etr u:object_r:sysfs_qdss_dev:s0
genfscon sysfs /devices/platform/soc/8002000.stm/coresight-stm u:object_r:sysfs_qdss_dev:s0
genfscon sysfs /devices/platform/soc/4506604.hwevent/coresight-hwevent u:object_r:sysfs_qdss_dev:s0
genfscon sysfs /devices/platform/soc/soc:qcom,cpu0-cpu-ddr-lat/devfreq u:object_r:sysfs_devfreq:s0
genfscon sysfs /devices/platform/soc/soc:qcom,cpu4-cpu-ddr-latfloor/devfreq u:object_r:sysfs_devfreq:s0
genfscon sysfs /devices/platform/soc/soc:qcom,cpu0-cpu-ddr-latfloor/devfreq u:object_r:sysfs_devfreq:s0
genfscon sysfs /devices/platform/soc/soc:qcom,cpu-cpu-ddr-bw/devfreq u:object_r:sysfs_devfreq:s0
genfscon sysfs /devices/platform/soc/5900000.qcom,kgsl-3d0/kgsl/kgsl-3d0/devfreq u:object_r:sysfs_devfreq:s0
genfscon sysfs /devices/platform/soc/5900000.qcom,kgsl-3d0/devfreq u:object_r:sysfs_devfreq:s0
genfscon sysfs /devices/platform/soc/soc:qcom,gpubw/devfreq u:object_r:sysfs_devfreq:s0
genfscon sysfs /devices/platform/soc/soc:qcom,kgsl-busmon/devfreq u:object_r:sysfs_devfreq:s0
genfscon sysfs /devices/platform/soc/soc:qcom,cpu4-cpu-ddr-lat/devfreq u:object_r:sysfs_devfreq:s0
#fps sysfs-node
genfscon sysfs /devices/platform/soc/5e00000.qcom,mdss_mdp/drm/card0/sde-crtc-1/measured_fps u:object_r:sysfs_graphics:s0
genfscon sysfs /devices/platform/soc/5e00000.qcom,mdss_mdp/drm/card0/sde-crtc-0/measured_fps u:object_r:sysfs_graphics:s0
genfscon sysfs /devices/platform/soc/5e00000.qcom,mdss_mdp/drm/card0/sde-crtc-1/fps_periodicity_ms u:object_r:sysfs_graphics:s0
genfscon sysfs /devices/platform/soc/5e00000.qcom,mdss_mdp/drm/card0/sde-crtc-0/fps_periodicity_ms u:object_r:sysfs_graphics:s0

View File

@@ -0,0 +1,35 @@
# Copyright (c) 2018, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
type hal_fingerprint_fpc, domain;
hal_server_domain(hal_fingerprint_fpc, hal_fingerprint)
type hal_fingerprint_fpc_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hal_fingerprint_fpc)
allow hal_fingerprint_fpc input_device:chr_file r_file_perms;
allow hal_fingerprint_fpc tee_device:chr_file rw_file_perms;

28
qva/vendor/trinket/hal_sensors.te vendored Normal file
View File

@@ -0,0 +1,28 @@
# Copyright (c) 2018, The Linux Foundation. All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
allow hal_sensors hal_fingerprint_fpc:unix_stream_socket { connectto };

32
qva/vendor/trinket/hwservice_contexts vendored Normal file
View File

@@ -0,0 +1,32 @@
# Copyright (c) 2018, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
com.fingerprints.extension::IFingerprintEngineering u:object_r:hal_fingerprint_hwservice:s0
com.fingerprints.extension::IFingerprintAuthenticator u:object_r:hal_fingerprint_hwservice:s0
com.fingerprints.extension::IFingerprintNavigation u:object_r:hal_fingerprint_hwservice:s0
com.fingerprints.extension::IFingerprintSensorTest u:object_r:hal_fingerprint_hwservice:s0
com.fingerprints.extension::IFingerprintCalibration u:object_r:hal_fingerprint_hwservice:s0

37
qva/vendor/trinket/init-qti-fbe-sh.te vendored Normal file
View File

@@ -0,0 +1,37 @@
# Copyright (c) 2018, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
type init-qti-fbe-sh, domain;
type init-qti-fbe-sh_exec, exec_type, file_type, vendor_file_type;
init_daemon_domain(init-qti-fbe-sh)
allow init-qti-fbe-sh vendor_shell_exec:file rx_file_perms;
# execute toybox/toolbox
allow init-qti-fbe-sh vendor_toolbox_exec:file rx_file_perms;
get_prop(init-qti-fbe-sh, vendor_tee_listener_prop)

30
qva/vendor/trinket/init_shell.te vendored Normal file
View File

@@ -0,0 +1,30 @@
# Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# media_trinket_version_prop - to choose target version specific media_codecs.xml
allow qti_init_shell {
vendor_media_trinket_version_prop
}:property_service set;

28
qva/vendor/trinket/mediacodec.te vendored Normal file
View File

@@ -0,0 +1,28 @@
# Copyright (c) 2018, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
get_prop(mediacodec, vendor_media_trinket_version_prop)

28
qva/vendor/trinket/mediaserver.te vendored Normal file
View File

@@ -0,0 +1,28 @@
# Copyright (c) 2018, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
get_prop(mediaserver, vendor_media_trinket_version_prop)

29
qva/vendor/trinket/property.te vendored Normal file
View File

@@ -0,0 +1,29 @@
# Copyright (c) 2018, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#properites for init.qcom.sh script
type vendor_media_trinket_version_prop, property_type;

28
qva/vendor/trinket/property_contexts vendored Normal file
View File

@@ -0,0 +1,28 @@
# Copyright (c) 2018, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
vendor.media.trinket.version u:object_r:vendor_media_trinket_version_prop:s0

View File

@@ -0,0 +1,36 @@
# Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Allow update_engine and update_engine_sideload (recovery) read/write on the
# device-specific partitions it should update.
allow update_engine_common {
custom_ab_block_device
xbl_block_device
uefi_block_device
ssd_block_device
modem_block_device
}:blk_file rw_file_perms;

30
qva/vendor/trinket/wfdservice.te vendored Normal file
View File

@@ -0,0 +1,30 @@
# Copyright (c) 2018, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#Allow access to read property file
get_prop(wfdservice,vendor_media_trinket_version_prop)