diff options
author | theimpulson <aayushgupta219@gmail.com> | 2020-03-30 10:12:45 +0000 |
---|---|---|
committer | theimpulson <aayushgupta219@gmail.com> | 2020-03-30 14:39:46 +0000 |
commit | bd85ca1dc11bb6a357e36cbfcc6d49b0de34bbf1 (patch) | |
tree | f94bbd6da4e15ce76dac94c12a7c099de5c31a79 /common | |
parent | 9a42ed51d2e66e186b14c53a934f75cdea39509a (diff) | |
download | android_device_lineage_sepolicy-bd85ca1dc11bb6a357e36cbfcc6d49b0de34bbf1.tar.gz android_device_lineage_sepolicy-bd85ca1dc11bb6a357e36cbfcc6d49b0de34bbf1.tar.bz2 android_device_lineage_sepolicy-bd85ca1dc11bb6a357e36cbfcc6d49b0de34bbf1.zip |
lineage: Introduce a new flag to exclude fuseblk sepolicy
Some QCOM and Almost all MTK devices ship fuseblk sepolicy on vendor partition.
When using a prebuilt vendor.img, this causes conflicts with our fuseblk sepolicy,
which prevents the device from booting.
To remedy this, allow excluding fuseblk sepolicy at build time.
Signed-off-by: theimpulson <aayushgupta219@gmail.com>
Change-Id: I938a14ada3bb9b6ffa20bb27c15adae3e493b98c
Diffstat (limited to 'common')
-rw-r--r-- | common/private/genfs_contexts | 2 | ||||
-rw-r--r-- | common/sepolicy.mk | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/common/private/genfs_contexts b/common/private/genfs_contexts index 64e51f0..c629305 100644 --- a/common/private/genfs_contexts +++ b/common/private/genfs_contexts @@ -1,3 +1,5 @@ +ifelse(board_excludes_fuseblk_sepolicy, `true', , genfscon fuseblk / u:object_r:vfat:s0 +) genfscon sysfs /devices/virtual/timed_output/vibrator u:object_r:sysfs_vibrator:s0 diff --git a/common/sepolicy.mk b/common/sepolicy.mk index 61d55fe..d50f870 100644 --- a/common/sepolicy.mk +++ b/common/sepolicy.mk @@ -9,6 +9,12 @@ TARGET_USES_PREBUILT_VENDOR_SEPOLICY ?= true endif endif +ifeq ($(TARGET_USES_PREBUILT_VENDOR_SEPOLICY), true) +ifeq ($(TARGET_HAS_FUSEBLK_SEPOLICY_ON_VENDOR),true) +BOARD_SEPOLICY_M4DEFS += board_excludes_fuseblk_sepolicy=true +endif +endif + BOARD_PLAT_PUBLIC_SEPOLICY_DIR += \ device/lineage/sepolicy/common/public |