a7xelte: build fastcharge hidl lineage-18.1
authorFrancescodario Cuzzocrea <bosconovic@gmail.com>
Thu, 24 Dec 2020 15:18:14 +0000 (16:18 +0100)
committerDanny Wood <danwood76@gmail.com>
Fri, 5 Aug 2022 09:58:53 +0000 (11:58 +0200)
Change-Id: Iec1a7faec24f0d5b4b1d2f1ef52b781368c5bd51

BoardConfig.mk
device.mk
sepolicy/file_contexts [new file with mode: 0644]
sepolicy/hal_lineage_fastcharge_default.te [new file with mode: 0644]
sepolicy/property.te [new file with mode: 0644]
sepolicy/property_contexts [new file with mode: 0644]

index 1baf12eae10e60274c7893cc70f9f99a6129cf37..cd2ce2d6eb08839ba471f1129727e381a2ebd856 100644 (file)
@@ -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 \
index 15c45b6c02507d27f46609e0ae6b877b2776ba3c..bd9511ca2cf42169e581eaa73428f2081fafab98 100644 (file)
--- 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 (file)
index 0000000..6e37626
--- /dev/null
@@ -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 (file)
index 0000000..301d478
--- /dev/null
@@ -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 (file)
index 0000000..c526f66
--- /dev/null
@@ -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 (file)
index 0000000..abf1ef2
--- /dev/null
@@ -0,0 +1,3 @@
+### fastcharge
+persist.vendor.sec.fastchg_enabled     u:object_r:vendor_fastcharge_prop:s0
+