From 8faa84e8c6956cf684124d34a438a29f8e6dae0c Mon Sep 17 00:00:00 2001 From: Deokgyu Yang Date: Wed, 23 Feb 2022 23:47:25 +0900 Subject: [PATCH] Revert "Revert "gts3l-common: fastcharge: Build fastcharge HIDL"" Mis-merged from "eleven-havoc" branch This reverts commit e9377b7f80c6b2321c480ef44b03527e05c7e884. --- gts3l.mk | 4 ++++ sepolicy/file.te | 1 + sepolicy/file_contexts | 2 ++ sepolicy/hal_lineage_fastcharge_default.te | 4 ++++ sepolicy/property.te | 1 + sepolicy/property_contexts | 1 + 6 files changed, 13 insertions(+) create mode 100644 sepolicy/hal_lineage_fastcharge_default.te diff --git a/gts3l.mk b/gts3l.mk index fd79c09..6d9250b 100755 --- a/gts3l.mk +++ b/gts3l.mk @@ -183,6 +183,10 @@ PRODUCT_PACKAGES += \ android.hardware.drm@1.0-service \ android.hardware.drm@1.3-service.clearkey +# FastCharge +PRODUCT_PACKAGES += \ + vendor.lineage.fastcharge@1.0-service.samsung + # Fingerprint PRODUCT_PACKAGES += \ android.hardware.biometrics.fingerprint@2.1-service.samsung \ diff --git a/sepolicy/file.te b/sepolicy/file.te index 5d54acb..ce10bff 100644 --- a/sepolicy/file.te +++ b/sepolicy/file.te @@ -54,6 +54,7 @@ type sysfs_fpc, fs_type, sysfs_type; type sysfs_lcd_writable, fs_type, sysfs_type; type sysfs_mdnie_writable, fs_type, sysfs_type; type sysfs_sec_keypad, fs_type, sysfs_type; +type sysfs_sec_switch, fs_type, sysfs_type; type sysfs_tsp, fs_type, sysfs_type; type sysfs_wifi, fs_type, sysfs_type; type sysfs_touchkey, fs_type, sysfs_type; diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts index 79d5f8f..f6f1c4b 100644 --- a/sepolicy/file_contexts +++ b/sepolicy/file_contexts @@ -177,6 +177,7 @@ /(vendor|system/vendor)/bin/hw/android\.hardware\.keymaster@4\.0-service\.samsung u:object_r:hal_keymaster_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\.usb@1\.2-service-qti u:object_r:hal_usb_default_exec:s0 +/(vendor|system/vendor)/bin/hw/vendor\.lineage\.fastcharge@1\.0-service\.samsung u:object_r:hal_lineage_fastcharge_default_exec:s0 /(vendor|system/vendor)/bin/hw/vendor\.lineage\.livedisplay@2\.0-service\.gts3l u:object_r:hal_lineage_livedisplay_sysfs_exec:s0 /(vendor|system/vendor)/bin/hw/vendor\.lineage\.touch@1\.0-service\.gts3l u:object_r:hal_lineage_touch_default_exec:s0 /(vendor|system/vendor)/bin/hw/vendor\.samsung\.hardware\.miscpower@1\.0-service u:object_r:hal_power_default_exec:s0 @@ -204,4 +205,5 @@ /sys/devices/virtual/lcd/panel(/.*)? u:object_r:sysfs_lcd_writable:s0 /sys/devices/virtual/mdnie(/.*)? -- u:object_r:sysfs_mdnie_writable:s0 /sys/devices/virtual/sec/sec_keypad(/.*)? u:object_r:sysfs_sec_keypad:s0 +/sys/devices/virtual/sec/switch(/.*)? u:object_r:sysfs_sec_switch:s0 /sys/devices/virtual/sec/tsp(/.*)? u:object_r:sysfs_tsp:s0 diff --git a/sepolicy/hal_lineage_fastcharge_default.te b/sepolicy/hal_lineage_fastcharge_default.te new file mode 100644 index 0000000..4420271 --- /dev/null +++ b/sepolicy/hal_lineage_fastcharge_default.te @@ -0,0 +1,4 @@ +allow hal_lineage_fastcharge_default sysfs_sec_switch:dir search; +allow hal_lineage_fastcharge_default sysfs_sec_switch:file rw_file_perms; + +set_prop(hal_lineage_fastcharge, sec_fastcharge_prop) \ No newline at end of file diff --git a/sepolicy/property.te b/sepolicy/property.te index 9af4c5f..8458f95 100644 --- a/sepolicy/property.te +++ b/sepolicy/property.te @@ -4,6 +4,7 @@ type ina_status_prop, property_type; type receiver_error_prop, property_type; type sec_camera_prop, property_type, file_type; type sec_cnss_diag_prop, property_type; +type sec_fastcharge_prop, property_type; type tzdaemon_prop, property_type; type vendor_factory_prop, property_type; type vendor_members_prop, property_type; diff --git a/sepolicy/property_contexts b/sepolicy/property_contexts index ae769cc..848a7f8 100644 --- a/sepolicy/property_contexts +++ b/sepolicy/property_contexts @@ -20,6 +20,7 @@ persist.tnr.process.plates u:object_r:sec_camera_prop:s0 persist.vendor.camera. u:object_r:sec_camera_prop:s0 persist.vendor.camera.feature.cac u:object_r:sec_camera_prop:s0 persist.vendor.camera.global.debug u:object_r:sec_camera_prop:s0 +persist.vendor.sec.fastchg_enabled u:object_r:sec_fastcharge_prop:s0 persist.vendor.members. u:object_r:vendor_members_prop:s0 ro.camera.req.fmq.size u:object_r:sec_camera_prop:s0 ro.camera.res.fmq.size u:object_r:sec_camera_prop:s0