From 3990846fac27c112d038fb67eacd414c8e5dadb2 Mon Sep 17 00:00:00 2001 From: Francescodario Cuzzocrea Date: Thu, 24 Dec 2020 16:18:14 +0100 Subject: [PATCH] a7xelte: build fastcharge hidl Change-Id: Iec1a7faec24f0d5b4b1d2f1ef52b781368c5bd51 --- BoardConfig.mk | 3 +++ device.mk | 4 ++++ sepolicy/file_contexts | 2 ++ sepolicy/hal_lineage_fastcharge_default.te | 6 ++++++ sepolicy/property.te | 3 +++ sepolicy/property_contexts | 3 +++ 6 files changed, 21 insertions(+) create mode 100644 sepolicy/file_contexts create mode 100644 sepolicy/hal_lineage_fastcharge_default.te create mode 100644 sepolicy/property.te create mode 100644 sepolicy/property_contexts diff --git a/BoardConfig.mk b/BoardConfig.mk index 1baf12e..cd2ce2d 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -57,6 +57,9 @@ TARGET_KERNEL_CONFIG := lineageos_a7xelte_defconfig # Manifest DEVICE_MANIFEST_FILE := $(LOCAL_PATH)/manifest.xml +# SELinux +BOARD_SEPOLICY_DIRS += device/samsung/a5xelte/sepolicy + # Shim TARGET_LD_SHIM_LIBS += \ /system/lib/libcamera_client.so|/vendor/lib/libcamera_client_shim.so \ diff --git a/device.mk b/device.mk index 15c45b6..bd9511c 100644 --- a/device.mk +++ b/device.mk @@ -47,6 +47,10 @@ PRODUCT_PACKAGES += \ libbauthtzcommon_shim \ android.hardware.biometrics.fingerprint@2.1-service.samsung +# FastCharge +PRODUCT_PACKAGES += \ + vendor.lineage.fastcharge@1.0-service.samsung + # Camera PRODUCT_PACKAGES += \ camera.universal7580 \ diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts new file mode 100644 index 0000000..6e37626 --- /dev/null +++ b/sepolicy/file_contexts @@ -0,0 +1,2 @@ +/(vendor|system/vendor)/bin/hw/vendor\.lineage\.fastcharge@[0-9]\.[0-9]-service\.samsung u:object_r:hal_lineage_fastcharge_default_exec:s0 + diff --git a/sepolicy/hal_lineage_fastcharge_default.te b/sepolicy/hal_lineage_fastcharge_default.te new file mode 100644 index 0000000..301d478 --- /dev/null +++ b/sepolicy/hal_lineage_fastcharge_default.te @@ -0,0 +1,6 @@ +# hal_lineage_fastcharge_default + +set_prop(hal_lineage_fastcharge, vendor_fastcharge_prop) + +allow hal_lineage_fastcharge_default sysfs:dir search; +allow hal_lineage_fastcharge_default sysfs:file rw_file_perms; diff --git a/sepolicy/property.te b/sepolicy/property.te new file mode 100644 index 0000000..c526f66 --- /dev/null +++ b/sepolicy/property.te @@ -0,0 +1,3 @@ +# Fastcharge HAL +type vendor_fastcharge_prop, property_type; + diff --git a/sepolicy/property_contexts b/sepolicy/property_contexts new file mode 100644 index 0000000..abf1ef2 --- /dev/null +++ b/sepolicy/property_contexts @@ -0,0 +1,3 @@ +### fastcharge +persist.vendor.sec.fastchg_enabled u:object_r:vendor_fastcharge_prop:s0 + -- 2.20.1