[Honor 6, 6 Plus General] beeshyams:
Device : H60 L04 (4.4.2) -Rooted Stock Version B374

Nobody likes battery dying on them or having a battery die faster than it’s expected life time. On the other hand extending battery life is good incentive if you don’t plan to change your cell before the battery lives it’s lifespan

This thread shows you one way to do that

Leaving your cell phone plugged in while charging overnight, or for extended periods is something we end up doing fairly often.

While the battery doesn’t suffer electrical damage due to this, it surely gets deteriorated as the battery is maintained at a high temperature internally harming it, much like leaving it on your car dashboard on a hot summer day.

(Because chargers do a good job of limiting the charging current as the charge increases but the voltage reaches 4.2 V or beyond, while the optimum voltage level should be 4V at the higher end for longer battery life)

It is therefore much safer to have the battery stop charging much before it reaches 100% charge.

These threads will give you a better insight into:

a)Why it is better to charge more frequently instead of discharging fully and charging to 100%

b)Deterioration of battery at charging beyond 90% and keeping it for extended duration in that stage

http://xdaforums.com/showthread.php?p=9777867#post9777867

http://batteryuniversity.com/learn/article/charging_lithium_ion_batteries

http://batteryuniversity.com/learn/article/how_to_prolong_lithium_based_batteries

There is NO app on Play Store which can do this and this involves some kernel level tinkering and AFAIK only Nexus 5 has a kernel mod to do this. This thread shows you a way to do it using a macro using the excellent app “MacroDroid “,developed by [MENTION=1486719]UndeadCretin[/MENTION] (http://xdaforums.com/showthread.php?t=1694335).

The free version of MacroDroid suffices for this purpose but I strongly recommend it for those who like to personalize their phones and do things in a smart way. Honestly, it is extremely versatile and you can do a lot with it. And with minimal learning curve

This macro enables you to safely leave the charger plugged in for any duration and the charging gets automatically terminated or limited once the predetermined level is reached, even though it is connected and powered on !!!.NO manual intervention

Pre requisites

1.MacroDroid

2.Terminal Emulator (from Play Store)

3.Rooted phone running stock ROM

4.Root Explorer (prefer SD maid as it enables you copy the path of file which saves typing effort)

Procedure

1.

Mount system R/W

Type su on the terminal emulator and enter this

mount -o remount,rw -t yaffs2 /dev/block/platform/ff1fe000.dwmmc0//system /system

OR

busybox mount -o remount,rw /system

2.

Enable SElinux Permissive

( DO This if you have a problem in mounting per step 1. It is lost on booting, so you are back to enforcing after boot and this doesn't interfere with macro running)

Type su followed by setenforce 0. This will make SElinux permissive

Status can be verified by typing getenforce, which will return Permissive

3.Create a folder in your internal SD card by any name, say “for_testing”

Next, Navigate to the folder in this path .

/sys/devices/amba.0/fdf0a000.i2c/i2c-0/0-006b

You will see a file “enable_charger”. Set permissions 777 for this and copy this file to your internal SD folder (“for_testing).

Important: Don’t connect charger during this step

4.

Create a macro in macrodroid

Trigger : Battery >=90% (or any level you choose)

Action:

1. Launch Shortcut Term Shortcut (this opens a window for the terminal emulator app where you can enter the following sh command

su –c “cp /storage/emulated/legacy/for_testing/enable_charger /sys/devices/amba.0/fdf0a000.i2c/i2c-0/0-006b”

Quotes are a MUST

2. Wait 10 seconds

3. Kill application – in the drop down menu choose Terminal Emulator

Constraints : None (leave it blank)

5.Remember to enable MacroDroid in Protected Apps and also enable it in accessibility settings

You are done !!!

How this works – when the charger is connected, the file enable_charger has the value 1 in it and when disconnected it has 0. Our aim is to disconnect charger on reaching desired charge (here 90%). The macro does exactly that by copying the file from your internal SD which has a value 0 and overwriting the same file in system having value 1. You can physically see that the charging LED switches off and charge doesn’t go beyond 90 %

:o:o:)

Note:

1.You own what you do with your cell, not me, so please don’t expect me to help you from sticky situations or bricked phone

2.If something doesn’t work (it should , this is tested on my cell), please recheck terminal command syntax or ask someone who knows ( not me) or Google it

3.If you find that it works for other Honor 6 models please post here so that others can benefit