diff --git a/common.mk b/common.mk index cd678dd..fe30c4a 100644 --- a/common.mk +++ b/common.mk @@ -78,10 +78,6 @@ PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \ android.hardware.camera.provider-service_32.samsung \ -# Charger -PRODUCT_PACKAGES += \ - vendor.lineage.fastcharge@1.0-service.samsung \ - # CNE PRODUCT_PACKAGES += \ CneApp.libvndfwk_detect_jni.qti_vendor_symlink \ @@ -151,6 +147,9 @@ $(call soong_config_set,lineage_health,charging_control_charging_path,/sys/class $(call soong_config_set,lineage_health,charging_control_charging_enabled,0) $(call soong_config_set,lineage_health,charging_control_charging_disabled,1) $(call soong_config_set,lineage_health,charging_control_supports_bypass,false) +$(call soong_config_set,lineage_health,fast_charge_node,/sys/class/sec/switch/afc_disable) +$(call soong_config_set,lineage_health,fast_charge_value_none,1) +$(call soong_config_set,lineage_health,fast_charge_value_fast_charge,0) PRODUCT_PACKAGES += \ android.hardware.health-service.samsung \ diff --git a/init/init.qcom.rc b/init/init.qcom.rc index ffa1137..32fb0df 100755 --- a/init/init.qcom.rc +++ b/init/init.qcom.rc @@ -65,6 +65,10 @@ on early-init write /proc/sys/kernel/sched_energy_aware 0 on init + + # AFC permissions for fast charge + chown system radio /sys/class/sec/switch/afc_disable + # Brightness Permission chown system system /sys/class/backlight/panel0-backlight/brightness chmod 0664 /sys/class/backlight/panel0-backlight/brightness diff --git a/sepolicy/vendor/file_contexts b/sepolicy/vendor/file_contexts index d93ccb8..472a894 100644 --- a/sepolicy/vendor/file_contexts +++ b/sepolicy/vendor/file_contexts @@ -187,7 +187,6 @@ /(vendor|system/vendor)/bin/hw/android\.hardware\.vibrator\-service\.samsung u:object_r:hal_vibrator_default_exec:s0 /(vendor|system/vendor)/bin/hw/macloader u:object_r:macloader_exec:s0 /(vendor|system/vendor)/bin/hw/sehradiomanager u:object_r:sehradiomanager_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\.sm6150 u:object_r:hal_lineage_livedisplay_sysfs_exec:s0 /(vendor|system/vendor)/bin/hw/vendor\.lineage\.touch-service\.samsung_sm6150 u:object_r:hal_lineage_touch_default_exec:s0 /(vendor|system/vendor)/bin/factory\.ssc u:object_r:factory_ssc_exec:s0 diff --git a/sepolicy/vendor/hal_lineage_fastcharge_default.te b/sepolicy/vendor/hal_lineage_fastcharge_default.te deleted file mode 100644 index b6ae19a..0000000 --- a/sepolicy/vendor/hal_lineage_fastcharge_default.te +++ /dev/null @@ -1,6 +0,0 @@ -set_prop(hal_lineage_fastcharge, vendor_fastcharge_prop) - -allow hal_lineage_fastcharge_default sysfs_sec_switch:file rw_file_perms; -allow hal_lineage_fastcharge_default sysfs_sec_switch:dir r_dir_perms; -allow hal_lineage_fastcharge_default sysfs_sec_switch_writable:file rw_file_perms; -allow hal_lineage_fastcharge_default sysfs_sec_switch_writable:dir r_dir_perms; diff --git a/sepolicy/vendor/hal_lineage_health_default.te b/sepolicy/vendor/hal_lineage_health_default.te index 06079b3..f3e1865 100644 --- a/sepolicy/vendor/hal_lineage_health_default.te +++ b/sepolicy/vendor/hal_lineage_health_default.te @@ -1,3 +1,8 @@ +allow hal_lineage_health_default sysfs_sec_switch:file rw_file_perms; +allow hal_lineage_health_default sysfs_sec_switch:dir r_dir_perms; +allow hal_lineage_health_default sysfs_sec_switch_writable:file rw_file_perms; +allow hal_lineage_health_default sysfs_sec_switch_writable:dir r_dir_perms; + allow hal_lineage_touch_default sysfs_sec_touchscreen:dir search; allow hal_lineage_touch_default sysfs_sec_touchscreen:file r_file_perms; allow hal_lineage_touch_default sysfs_touchscreen_writable:file rw_file_perms; diff --git a/sepolicy/vendor/property.te b/sepolicy/vendor/property.te index 08642f8..b4d7505 100644 --- a/sepolicy/vendor/property.te +++ b/sepolicy/vendor/property.te @@ -1,3 +1,2 @@ -vendor_internal_prop(vendor_fastcharge_prop) vendor_internal_prop(vendor_power_prop) vendor_internal_prop(vendor_qseecomd_prop) diff --git a/sepolicy/vendor/property_contexts b/sepolicy/vendor/property_contexts index e058f34..ed1e0e5 100644 --- a/sepolicy/vendor/property_contexts +++ b/sepolicy/vendor/property_contexts @@ -9,9 +9,6 @@ vendor.bluetooth_nv_ver u:object_r:vendor_bluetooth_pro # CNE persist.vendor.cne u:object_r:vendor_cnd_prop:s0 -# Fastcharge -persist.vendor.sec.fastchg_enabled u:object_r:vendor_fastcharge_prop:s0 - # Fingerprint vendor.finger.down u:object_r:vendor_fingerprint_prop:s0