a5xelte: 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:39 +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 6c53075b06c0510552427e436f44be794ff4d206..1f159da1d1f4b61558856ea2675b1e528d3ff25c 100644 (file)
@@ -57,6 +57,9 @@ TARGET_KERNEL_CONFIG := lineageos_a5xelte_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 144534ec9c1ba55ee5bc9e91f696d7bc2a44ca21..37806bc41c1bee1961e50985183750efccad5452 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
+