From e6a3db5299248c15f32609ce29493f20cf396ceb Mon Sep 17 00:00:00 2001 From: Deokgyu Yang Date: Thu, 12 Aug 2021 01:34:50 +0900 Subject: [PATCH] gts3l-common: fastcharge: Build fastcharge HIDL Signed-off-by: Deokgyu Yang Change-Id: If04667671accb9b415e2ca21e3d8373e5ee5b026 --- 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 0d1445f..e58f3b4 100755 --- a/gts3l.mk +++ b/gts3l.mk @@ -177,6 +177,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 c45a718..9fb81ef 100644 --- a/sepolicy/file.te +++ b/sepolicy/file.te @@ -51,6 +51,7 @@ type sysfs_camera_writable, fs_type, sysfs_type; 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_switch, fs_type, sysfs_type; type sysfs_tsp, fs_type, sysfs_type; type sysfs_wifi, fs_type, sysfs_type; type dsp_file, fs_type, contextmount_type; diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts index 203118b..1188ff4 100644 --- a/sepolicy/file_contexts +++ b/sepolicy/file_contexts @@ -172,6 +172,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\.1-service\.gts3l 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\.samsung-qcom u:object_r:hal_lineage_livedisplay_sysfs_exec:s0 /(vendor|system/vendor)/bin/hw/vendor\.samsung\.hardware\.miscpower@1\.0-service u:object_r:hal_power_default_exec:s0 @@ -196,4 +197,5 @@ /sys/devices/virtual/fingerprint/fingerprint(/.*)? u:object_r:sysfs_fpc:s0 /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/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