The path in this answer didn't work, guess it is not the true path.
Here is my own post at XDA forum showing a script running using a macro. The path according to what worked for me and steps involved are explained. It shows a macro based implementation allows the path which works for me.
I am thankful for the earlier post that pointed this file.
To summarize:
Path posted earlier lead me to the file but did not allow me to change values. Probably because this is a sysfs file and the path turned out to be
/sys/devices/amba.0/fdf0a000.i2c/i2c-0/0-006b
.
For some reason I could not echo 0 to the file to change it. Only option I could think of was to copy the file when it's not charging into a separate
folder in SD card and paste this into the system at the desired charging level to fool the system into behaving as if it was charged.
To do this, I mounted sys
as rw first making SELINUX permissive and copied the file into SD card. Next was writing a script to copy this into system.
su –c "cp /storage/emulated/legacy/for_testing/enable_charger /sys/devices/amba.0/fdf0a000.i2c/i2c-0/0-006b"
To run the script at appropriate charge automatically I used a macro written using MacroDroid app (far more easy to learn compared to Tasker)
This whole exercise ran smoothly.
I would be happy if someone can:
- suggest a better way
- help with file information pertaining to note 2 , my old device and if at all possible to do