From 9b5848a12c1b24d106a6df9b5f6dd13aff50af83 Mon Sep 17 00:00:00 2001 From: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com> Date: Mon, 11 Dec 2023 08:44:02 +0700 Subject: [PATCH] X6833B: Configure offline charging Refs: https://github.com/PQEnablers-Devices/android_device_xiaomi_ruby/commit/436747685defc39a82ec2d96a4b1834e8e007f42 https://github.com/PQEnablers-Devices/android_device_xiaomi_ruby/commit/0951b5b378ae892f8293851c974037dda24b2ec1 Co-authored-by: bengris32 Signed-off-by: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com> --- BoardConfig.mk | 1 + configs/properties/system.prop | 2 ++ rootdir/etc/init/hw/init.mt6789.rc | 19 ++++++++++--------- 3 files changed, 13 insertions(+), 9 deletions(-) create mode 100644 configs/properties/system.prop diff --git a/BoardConfig.mk b/BoardConfig.mk index c1231eb..c0442dd 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -117,6 +117,7 @@ TARGET_BOARD_PLATFORM := mt6789 BOARD_HAS_MTK_HARDWARE := true # Properties +TARGET_SYSTEM_PROP += $(CONFIGS_PATH)/properties/system.prop TARGET_VENDOR_PROP += $(CONFIGS_PATH)/properties/vendor.prop # Recovery diff --git a/configs/properties/system.prop b/configs/properties/system.prop new file mode 100644 index 0000000..37becf3 --- /dev/null +++ b/configs/properties/system.prop @@ -0,0 +1,2 @@ +# Charger +ro.charger.enable_suspend=true diff --git a/rootdir/etc/init/hw/init.mt6789.rc b/rootdir/etc/init/hw/init.mt6789.rc index f1de9f5..be62367 100644 --- a/rootdir/etc/init/hw/init.mt6789.rc +++ b/rootdir/etc/init/hw/init.mt6789.rc @@ -66,11 +66,6 @@ on late-init # mount different fs start on charger - - #MD:delete XLBELHQQS-6425 for cache by xiaoxiang.xiong 20220616 start - #exec /system/bin/e2fsck -f -p /dev/block/by-name/cache - #mount ext4 /dev/block/by-name/cache /cache rw wait - #MD:delete XLBELHQQS-6425 for cache by xiaoxiang.xiong 20220616 end chmod 0660 /dev/spm chown system system /dev/spm start spm_script @@ -98,10 +93,6 @@ on charger start fuelgauged start fuelgauged_nvram - chown system system /sys/class/leds/lcd-backlight/brightness - chown system system /sys/class/leds/red/brightness - chown system system /sys/class/leds/green/brightness - # Stop bootprof write /proc/bootprof "0" @@ -1153,6 +1144,16 @@ service osi /system/bin/osi oneshot #seclabel u:r:osi:s0 +service vendor.charger /system/bin/charger + class charger + user system + group system graphics wakelock input + capabilities SYS_BOOT + file /dev/kmsg w + file /sys/fs/pstore/console-ramoops-0 r + file /sys/fs/pstore/console-ramoops r + file /proc/last_kmsg r + #SPD: add resmonitor and smartpanel bind small core by rui.fu 20230117 start service spd_cpu_set_sh /vendor/bin/init.spd_cpu_set.sh class main