diff --git a/manifest.xml b/manifest.xml index 4da5205..f73d2a0 100644 --- a/manifest.xml +++ b/manifest.xml @@ -131,6 +131,15 @@ default + + android.hardware.light + hwbinder + 2.0 + + ILight + default + + android.hardware.media.omx hwbinder diff --git a/msm8974.mk b/msm8974.mk index 7098c00..e69d9fd 100644 --- a/msm8974.mk +++ b/msm8974.mk @@ -115,6 +115,10 @@ PRODUCT_COPY_FILES += \ PRODUCT_PACKAGES += \ android.hardware.keymaster@3.0-impl +# Lights +PRODUCT_PACKAGES += \ + android.hardware.light@2.0-service.samsung + # LiveDisplay PRODUCT_PACKAGES += \ vendor.lineage.livedisplay@2.0-service.samsung-qcom diff --git a/sepolicy/common/file_contexts b/sepolicy/common/file_contexts index 1af5ab9..bd067c0 100644 --- a/sepolicy/common/file_contexts +++ b/sepolicy/common/file_contexts @@ -21,6 +21,7 @@ # executeables /system/vendor/bin/macloader u:object_r:macloader_exec:s0 /(vendor|system/vendor)/bin/hw/android\.hardware\.ir@1\.0-service\.samsung u:object_r:hal_ir_default_exec:s0 +/(vendor|system/vendor)/bin/hw/android\.hardware\.light@2\.0-service\.samsung u:object_r:hal_light_default_exec:s0 /(vendor|system/vendor)/bin/hw/android\.hardware\.sensors@1\.0-service.samsung8974 u:object_r:hal_sensors_default_exec:s0 /(vendor|system/vendor)/bin/hw/vendor\.lineage\.livedisplay@2\.0-service\.samsung-qcom u:object_r:hal_lineage_livedisplay_sysfs_exec:s0 /(vendor|system/vendor)/bin/hw/vendor\.lineage\.touch@1\.0-service\.samsung u:object_r:hal_lineage_touch_default_exec:s0 diff --git a/sepolicy/common/hal_light_default.te b/sepolicy/common/hal_light_default.te new file mode 100644 index 0000000..49b6a95 --- /dev/null +++ b/sepolicy/common/hal_light_default.te @@ -0,0 +1,9 @@ +allow hal_light_default { + sysfs_sec_led + sysfs_sec_touchkey +}:dir search; + +allow hal_light_default { + sysfs_sec_led + sysfs_sec_touchkey +}:file rw_file_perms; diff --git a/sepolicy/common/system_server.te b/sepolicy/common/system_server.te index b8a9ca0..0feb7b1 100644 --- a/sepolicy/common/system_server.te +++ b/sepolicy/common/system_server.te @@ -7,8 +7,3 @@ allow system_server { efs_file qti_debugfs }:file r_file_perms; - -allow system_server { - sysfs_sec_led - sysfs_sec_touchkey -}:file w_file_perms;