sdm845-common: Use MIUI poweroff charging animation

* It's cool, and more importantly... it actually works!
   Oh look, it even displays battery level. Wow. :-P

Change-Id: I6351e2eac6df89aa1b6b98e4e6b2815fa5c37794
This commit is contained in:
Bruno Martins
2018-02-07 00:41:09 +00:00
parent 6226957b72
commit ea5882dda2
5 changed files with 19 additions and 0 deletions

View File

@@ -7,3 +7,14 @@ LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := etc/init.qcom.rc
LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/init
include $(BUILD_PREBUILT)
# Offmode charging
include $(CLEAR_VARS)
LOCAL_MODULE := chargeonlymode
LOCAL_MODULE_OWNER := xiaomi
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT_SBIN)
LOCAL_UNSTRIPPED_PATH := $(TARGET_ROOT_OUT_SBIN_UNSTRIPPED)
LOCAL_SRC_FILES := sbin/chargeonlymode
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := EXECUTABLES
include $(BUILD_PREBUILT)

View File

@@ -1,4 +1,5 @@
on init
mount none /sbin/chargeonlymode /sbin/charger bind
mount none /system/lib64/hw/power.qcom.so /vendor/lib64/hw/power.qcom.so bind
mount none /system/lib/hw/power.qcom.so /vendor/lib/hw/power.qcom.so bind
mount none /system/lib/modules/wlan.ko /vendor/lib/modules/qca_cld3_wlan.ko bind

BIN
rootdir/sbin/chargeonlymode Executable file

Binary file not shown.

View File

@@ -62,6 +62,10 @@ PRODUCT_PACKAGES += \
PRODUCT_PACKAGES += \
netutils-wrapper-1.0
# Offmode charging
PRODUCT_PACKAGES += \
chargeonlymode
# Power
PRODUCT_PACKAGES += \
power.qcom

View File

@@ -1,2 +1,5 @@
# Allow init to mount wlan kernel module
allow init vendor_file:file mounton;
# Allow init to mount offmode charging daemon
allow init rootfs:file mounton;