[Mi 3 Android Development] Dona55:
Fix Offline Logo Charging and LED Notification at Offline Charging and Sensor If any

====================================================================================================

FIX LOGO Offline Charging And LED Notification at Offline Charging

You can Unpack the kernel (boot.img) and find at init.qcom.rc

Default:

__________________________________________________________________________________________________

service charger /sbin/chargeonlymode

class charger

__________________________________________________________________________________________________

And Add this script:

seclabel u:r:chargeonlymode:s0

After Add Become:

__________________________________________________________________________________________________

service charger /sbin/chargeonlymode

class charger

seclabel u:r:chargeonlymode:s0

__________________________________________________________________________________________________

And For LED Notification (Off Charging) you can change at bootinfo.txt

Default:

__________________________________________________________________________________________________

cmdline:console=none vmalloc=340M androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x37 ehci-hcd.park=3

__________________________________________________________________________________________________

And Add SELinux=Permissive, Become:

__________________________________________________________________________________________________

cmdline:console=none vmalloc=340M androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x37 ehci-hcd.park=3 androidboot.selinux=permissive no_console_suspend=1

__________________________________________________________________________________________________

and For Sensor Issue

You can add script at init.qcom.rc and init.rc

exec /system/bin/sh /system/bin/set_sensorprop.sh

and

service sensorservice /system/bin/sensorservice

class late_start

user root

group root

disabled

For init.qcom.sh

Replace default script at init.qcom.sh with this on ( only sensor start)

__________________________________________________________________________________________________

start_sensors()

{

if [ -c /dev/msm_dsps -o -c /dev/sensors ]; then

mkdir -p /data/misc/sensors

chmod -h 775 /data/misc/sensors

mkdir -p /persist/misc/sensors

chmod 775 /persist/misc/sensors

mkdir -p /data/system/sensors

chown -h system.system /data/system/sensors

touch /data/system/sensors/settings

chmod -h 775 /data/system/sensors

chmod -h 664 /data/system/sensors/settings

chown -h system /data/system/sensors/settings

touch /persist/misc/sensors/settings

chown -h system /persist/misc/sensors/settings

if [ ! -s /data/system/sensors/settings ]; then

# If the settings file is empty, enable sensors HAL

# Otherwise leave the file with it's current contents

echo 1 > /data/system/sensors/settings

fi

start sensors

if [ ! -s /persist/misc/sensors/settings ]; then

# If the settings file is empty, enable sensors HAL

# Otherwise leave the file with it's current contents

echo 1 > /persist/misc/sensors/settings

fi

start sensors

fi

}

__________________________________________________________________________________________________

Repack Kernel (boot.img) and Test, You Are Done....:):):):):):)

This Work at Mi 4W and Mi4LTE default Kernel and Any Custom Kernel at Custom ROM

My Regard