diff --git a/BoardConfig.mk b/BoardConfig.mk index b465cb5..5c5dcb5 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -16,6 +16,8 @@ # inherit from common matisse include device/samsung/matisse-common/BoardConfigCommon.mk +DEVICE_PATH := device/samsung/matissewifi + # Assert TARGET_OTA_ASSERT_DEVICE := matissewifi @@ -23,7 +25,10 @@ TARGET_OTA_ASSERT_DEVICE := matissewifi TARGET_KERNEL_CONFIG := lineage_matissewifi_defconfig # HIDL -DEVICE_MANIFEST_FILE += device/samsung/matissewifi/manifest.xml +DEVICE_MANIFEST_FILE += $(DEVICE_PATH)/manifest.xml + +# SELinux +include $(DEVICE_PATH)/sepolicy/sepolicy.mk # inherit from the proprietary version -include vendor/samsung/matissewifi/BoardConfigVendor.mk diff --git a/sepolicy/common/file_contexts b/sepolicy/common/file_contexts new file mode 100644 index 0000000..0b3e5cf --- /dev/null +++ b/sepolicy/common/file_contexts @@ -0,0 +1 @@ +/(vendor|system/vendor)/bin/hw/android\.hardware\.ir@1\.0-service\.samsung u:object_r:hal_ir_default_exec:s0 diff --git a/sepolicy/common/hal_ir_default.te b/sepolicy/common/hal_ir_default.te new file mode 100644 index 0000000..0c41eee --- /dev/null +++ b/sepolicy/common/hal_ir_default.te @@ -0,0 +1,2 @@ +allow hal_ir_default sysfs_sec_ir:dir search; +allow hal_ir_default sysfs_sec_ir:file w_file_perms; diff --git a/sepolicy/sepolicy.mk b/sepolicy/sepolicy.mk new file mode 100644 index 0000000..d61c0e4 --- /dev/null +++ b/sepolicy/sepolicy.mk @@ -0,0 +1,19 @@ +# +# Copyright (C) 2018 The LineageOS Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Board specific SELinux policy variable definitions +BOARD_SEPOLICY_DIRS += \ + device/samsung/matissewifi/sepolicy/common