gta4xl-common: Switch to health AIDL HAL
Change-Id: Icbb7194943388679abd25b2dbd105424c34496a1
diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk
index 773f22d..d0cb3b8 100644
--- a/BoardConfigCommon.mk
+++ b/BoardConfigCommon.mk
@@ -130,7 +130,6 @@
TARGET_SOC := exynos9611
## Properties
-TARGET_PRODUCT_PROP += $(COMMON_PATH)/product.prop
TARGET_VENDOR_PROP += $(COMMON_PATH)/vendor.prop
## Recovery
diff --git a/common.mk b/common.mk
index d7ed223..ba31b5b 100644
--- a/common.mk
+++ b/common.mk
@@ -67,6 +67,10 @@
android.hardware.camera.provider@2.5-service_64 \
libsensorndkbridge
+# Charger
+PRODUCT_PACKAGES += \
+ charger_res_images_vendor
+
# ConfigStore
PRODUCT_PACKAGES += \
disable_configstore
@@ -114,8 +118,8 @@
# Health
PRODUCT_PACKAGES += \
- android.hardware.health@2.1-impl:64 \
- android.hardware.health@2.1-service
+ android.hardware.health-service.samsung \
+ android.hardware.health-service.samsung-recovery
# HIDL
PRODUCT_PACKAGES += \
diff --git a/configs/init/init.exynos9611.rc b/configs/init/init.exynos9611.rc
index 4edc324..a13933b 100644
--- a/configs/init/init.exynos9611.rc
+++ b/configs/init/init.exynos9611.rc
@@ -862,18 +862,6 @@
oneshot
seclabel u:r:watchdogd:s0
-on property:ro.bootmode=charger
- wait /dev/block/platform/13520000.ufs/by-name/sec_efs
- mount ext4 /dev/block/platform/13520000.ufs/by-name/sec_efs /efs nosuid nodev noatime noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic
- chown radio system /efs
- chmod 0771 /efs
- chown radio system /efs/usb_hw_param
- chmod 771 /efs/usb_hw_param
- chown system system /efs/usb_hw_param/usb_hw_param.log
- chmod 0660 /efs/usb_hw_param/usb_hw_param.log
- mkdir /efs/lpm 0775 system system
- class_start sec-charger
-
# sensorhub fw
on post-fs
chmod 0770 /spu/sensorhub
diff --git a/configs/init/init.samsung.rc b/configs/init/init.samsung.rc
index a4afc15..279ee47 100644
--- a/configs/init/init.samsung.rc
+++ b/configs/init/init.samsung.rc
@@ -935,40 +935,6 @@
chown system radio /sys/class/sensors/hidden_hole/hh_is_exist_efs
chown system radio /sys/class/sensors/hidden_hole/hh_ext_prox_th
-on charger
- chmod 0664 /sys/class/power_supply/battery/batt_temp_table
- chown system radio /sys/class/power_supply/battery/batt_temp_table
- chmod 0664 /sys/class/power_supply/battery/batt_capacity_max
- chown system radio /sys/class/power_supply/battery/batt_capacity_max
- chmod 0664 /sys/class/power_supply/battery/battery_cycle
- chown system radio /sys/class/power_supply/battery/battery_cycle
- chmod 0664 /sys/class/power_supply/battery/batt_after_manufactured
- chown system radio /sys/class/power_supply/battery/batt_after_manufactured
- chown system radio /sys/class/power_supply/battery/cisd_fullcaprep_max
- chmod 0660 /sys/class/power_supply/battery/cisd_fullcaprep_max
- chown system radio /sys/class/power_supply/battery/cisd_data
- chmod 0660 /sys/class/power_supply/battery/cisd_data
- chown system system /efs/FactoryApp/cisd_fullcaprep_max
- chmod 0640 /efs/FactoryApp/cisd_fullcaprep_max
- chown system radio /sys/class/power_supply/battery/cisd_data_efs_path
- chmod 0660 /sys/class/power_supply/battery/cisd_data_efs_path
- chown system system /efs/FactoryApp/cisd_data
- chmod 0640 /efs/FactoryApp/cisd_data
- chown system system /efs/FactoryApp/cisd_tx_data
- chmod 0640 /efs/FactoryApp/cisd_tx_data
- chown system system /efs/FactoryApp/cisd_event_data
- chmod 0640 /efs/FactoryApp/cisd_event_data
- chown radio system /efs
- chmod 0771 /efs
- mkdir /efs/Battery 0775 radio system
- chown radio system /efs/Battery
- chmod 0775 /efs/Battery
- chown radio system /efs/Battery/batt_capacity_max
- chmod 0664 /efs/Battery/batt_capacity_max
- copy /system/vendor/firmware/battery_data.dat /efs/Battery/battery_data.dat
- chmod 0400 /efs/Battery/battery_data.dat
- write /sys/class/power_supply/battery/batt_update_data "/efs/Battery/battery_data.dat"
-
# BATTERY
on property:sys.boot_completed=1
write /sys/class/power_supply/battery/boot_completed "1"
@@ -982,10 +948,3 @@
chmod 0644 /sys/kernel/gpu/gpu_governor
chmod 0644 /sys/kernel/gpu/gpu_max_clock
chmod 0644 /sys/kernel/gpu/gpu_min_clock
-
-# Charger
-service charger /system/bin/charger
- class sec-charger
- user root
- group system radio input
- critical
diff --git a/product.prop b/product.prop
deleted file mode 100644
index b921539..0000000
--- a/product.prop
+++ /dev/null
@@ -1,2 +0,0 @@
-## Charger
-ro.charger.enable_suspend=true
diff --git a/sepolicy/vendor/charger.te b/sepolicy/vendor/charger.te
deleted file mode 100644
index ea55463..0000000
--- a/sepolicy/vendor/charger.te
+++ /dev/null
@@ -1,3 +0,0 @@
-allow charger device:dir r_file_perms;
-allow charger sysfs_battery:file r_file_perms;
-allow charger sysfs_battery_writable:file r_file_perms;
diff --git a/sepolicy/vendor/charger_vendor.te b/sepolicy/vendor/charger_vendor.te
new file mode 100644
index 0000000..e8bae85
--- /dev/null
+++ b/sepolicy/vendor/charger_vendor.te
@@ -0,0 +1,3 @@
+allow charger_vendor device:dir r_file_perms;
+allow charger_vendor sysfs_battery:file r_file_perms;
+allow charger_vendor sysfs_battery_writable:file r_file_perms;