universal7885: Build fastcharge hidl

* https://review.lineageos.org/c/LineageOS/android_hardware_samsung/+/305684

Change-Id: Iec1a7faec24f0d5b4b1d2f1ef52b781368c5bd51
Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
This commit is contained in:
Francescodario Cuzzocrea 2020-12-24 16:18:14 +01:00 committed by roynatech2544
commit c5a166f294
8 changed files with 22 additions and 0 deletions

View file

@ -2,6 +2,9 @@ on init
# Disable vendor overlay
mount none /vendor/lost+found /vendor/overlay bind
# Fastcharge
chown system radio /sys/class/sec/switch/afc_disable
# ZRAM parameters
write /proc/sys/vm/page-cluster 0
write /proc/sys/vm/swappiness 100

View file

@ -1,2 +1,3 @@
type sysfs_battery, sysfs_type, fs_type;
type sysfs_sec_tsp, fs_type, sysfs_type;
type sysfs_sec_switch, fs_type, sysfs_type;

View file

@ -4,6 +4,7 @@
# HALs
/system/bin/hw/lineage\.touch@1\.0-service\.samsung u:object_r:hal_touch_samsung_exec:s0
/system/bin/hw/android\.hardware\.power@1\.0-service\.exynos u:object_r:hal_power_default_exec:s0
/system/bin/hw/lineage\.fastcharge@1\.0-service\.samsung u:object_r:hal_fastcharge_samsung_exec:s0
# Vendor overlay
/(product|system/product)/vendor_overlay/[0-9]+/etc(/.*)? u:object_r:vendor_configs_file:s0

View file

@ -1,3 +1,4 @@
genfscon sysfs /devices/virtual/sec/tsp u:object_r:sysfs_sec_tsp:s0
genfscon sysfs /devices/virtual/sec/switch u:object_r:sysfs_sec_switch:s0
genfscon sysfs /devices/platform/13840000.i2c/i2c-10/10-003d/s2mu004-charger/power_supply/s2mu004-charger u:object_r:sysfs_battery:s0
genfscon sysfs /devices/platform/13830000.i2c/i2c-9/9-003b/power_supply/s2mu004-fuelgauge u:object_r:sysfs_battery:s0

View file

@ -0,0 +1,10 @@
type hal_fastcharge_samsung, domain, coredomain;
hal_server_domain(hal_fastcharge_samsung, hal_lineage_fastcharge)
type hal_fastcharge_samsung_exec, exec_type, system_file_type, file_type;
init_daemon_domain(hal_fastcharge_samsung)
allow hal_fastcharge_samsung sysfs_sec_switch:dir search;
allow hal_fastcharge_samsung sysfs_sec_switch:file rw_file_perms;
set_prop(hal_fastcharge_samsung, sec_fastcharge_prop)

View file

@ -0,0 +1 @@
type sec_fastcharge_prop, property_type;

View file

@ -0,0 +1 @@
persist.vendor.sec.fastchg_enabled u:object_r:sec_fastcharge_prop:s0

View file

@ -17,6 +17,10 @@ PRODUCT_PACKAGES += \
TARGET_SCREEN_HEIGHT := 2340
TARGET_SCREEN_WIDTH := 1080
# FastCharge
PRODUCT_PACKAGES += \
lineage.fastcharge@1.0-service.samsung
# Init
PRODUCT_PACKAGES += \
init.universal7904.rc \