From 62d8b28aa1b928c5086ad99690ee696ec7b40d27 Mon Sep 17 00:00:00 2001 From: SamarV-121 Date: Thu, 22 Oct 2020 18:29:33 +0530 Subject: [PATCH] universal7885: Add Glove Mode support * Ref: https://github.com/SamarV-121/android_hardware_samsung/commit/e8b16f2cc2e4e5c3e04f335aaf3cea46af5d2d30 Signed-off-by: SamarV-121 --- framework_manifest.xml | 9 +++++++++ sepolicy/private/file.te | 1 + sepolicy/private/file_contexts | 3 +++ sepolicy/private/genfs_contexts | 1 + sepolicy/private/hal_touch_samsung.te | 8 ++++++++ universal7904-common.mk | 4 ++++ 6 files changed, 26 insertions(+) create mode 100644 sepolicy/private/file.te create mode 100644 sepolicy/private/genfs_contexts create mode 100644 sepolicy/private/hal_touch_samsung.te diff --git a/framework_manifest.xml b/framework_manifest.xml index 2a1e18e..5f91901 100644 --- a/framework_manifest.xml +++ b/framework_manifest.xml @@ -1,4 +1,13 @@ + + vendor.lineage.touch + hwbinder + 1.0 + + IGloveMode + default + + vendor.lineage.trust hwbinder diff --git a/sepolicy/private/file.te b/sepolicy/private/file.te new file mode 100644 index 0000000..87e3b9e --- /dev/null +++ b/sepolicy/private/file.te @@ -0,0 +1 @@ +type sysfs_sec_tsp, fs_type, sysfs_type; diff --git a/sepolicy/private/file_contexts b/sepolicy/private/file_contexts index 1618560..845938d 100644 --- a/sepolicy/private/file_contexts +++ b/sepolicy/private/file_contexts @@ -1,5 +1,8 @@ # Block device for ZRAM /dev/block/zram0 u:object_r:swap_block_device:s0 +# HALs +/system/bin/hw/lineage\.touch@1\.0-service\.samsung u:object_r:hal_touch_samsung_exec:s0 + # Vendor overlay /(product|system/product)/vendor_overlay/[0-9]+/etc(/.*)? u:object_r:vendor_configs_file:s0 diff --git a/sepolicy/private/genfs_contexts b/sepolicy/private/genfs_contexts new file mode 100644 index 0000000..7f325dd --- /dev/null +++ b/sepolicy/private/genfs_contexts @@ -0,0 +1 @@ +genfscon sysfs /devices/virtual/sec/tsp u:object_r:sysfs_sec_tsp:s0 diff --git a/sepolicy/private/hal_touch_samsung.te b/sepolicy/private/hal_touch_samsung.te new file mode 100644 index 0000000..91da661 --- /dev/null +++ b/sepolicy/private/hal_touch_samsung.te @@ -0,0 +1,8 @@ +type hal_touch_samsung, domain, coredomain; +hal_server_domain(hal_touch_samsung, hal_lineage_touch) + +type hal_touch_samsung_exec, system_file_type, exec_type, file_type; +init_daemon_domain(hal_touch_samsung) + +allow hal_touch_samsung sysfs_sec_tsp:dir search; +allow hal_touch_samsung sysfs_sec_tsp:file rw_file_perms; diff --git a/universal7904-common.mk b/universal7904-common.mk index cdf4c16..9806105 100644 --- a/universal7904-common.mk +++ b/universal7904-common.mk @@ -69,5 +69,9 @@ PRODUCT_SOONG_NAMESPACES += \ PRODUCT_PACKAGES += \ lineage.trust@1.0-service +# Touch +PRODUCT_PACKAGES += \ + lineage.touch@1.0-service.samsung + # VNDK PRODUCT_EXTRA_VNDK_VERSIONS := 29