From 19bf67a8e7f08ad3a2b515ce3ccf22a54a9196fb Mon Sep 17 00:00:00 2001 From: Lalit Kansara Date: Fri, 28 Nov 2014 20:01:45 +0530 Subject: [PATCH] Setting fake battery capacity moved from one script to another On encrypted device init.qcom.class_core.sh script is unable to write fake_batt_capacity to /sys/class/power_supply/battery/capacity file due to unknown reason. Moving this logic to init.class_main.sh script is working fine Change-Id: I4c7cc7893314302f4749628d57343be1903e7e1c --- rootdir/etc/init.class_main.sh | 12 ++++++++++++ rootdir/etc/init.qcom.class_core.sh | 12 ------------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/rootdir/etc/init.class_main.sh b/rootdir/etc/init.class_main.sh index 55c7bbd3..1fdb9dcb 100644 --- a/rootdir/etc/init.class_main.sh +++ b/rootdir/etc/init.class_main.sh @@ -83,3 +83,15 @@ case "$baseband" in ;; esac esac + +# +# Allow persistent faking of bms +# User needs to set fake bms charge in persist.bms.fake_batt_capacity +# +fake_batt_capacity=`getprop persist.bms.fake_batt_capacity` +case "$fake_batt_capacity" in + "") ;; #Do nothing here + * ) + echo "$fake_batt_capacity" > /sys/class/power_supply/battery/capacity + ;; +esac diff --git a/rootdir/etc/init.qcom.class_core.sh b/rootdir/etc/init.qcom.class_core.sh index 501b27d4..bc89e865 100755 --- a/rootdir/etc/init.qcom.class_core.sh +++ b/rootdir/etc/init.qcom.class_core.sh @@ -197,18 +197,6 @@ case "$target" in ;; esac -# -# Allow persistent faking of bms -# User needs to set fake bms charge in persist.bms.fake_batt_capacity -# -fake_batt_capacity=`getprop persist.bms.fake_batt_capacity` -case "$fake_batt_capacity" in - "") ;; #Do nothing here - * ) - echo "$fake_batt_capacity" > /sys/class/power_supply/battery/capacity - ;; -esac - case "$target" in "msm7630_surf" | "msm7630_1x" | "msm7630_fusion") insmod /system/lib/modules/ss_mfcinit.ko