Hi all,
I created a kernel for use with unknown extended batteries.
I only used a kernel with this modifications for about 24 hours, so it is still alpha.
I used it myself only on the JellyTime HD2 V.2 DataOnExt version, but the kernel is much like the latest tytung version, and you should be able to use it with any ROM that uses the tytung kernel
It is based on the
https://github.com/cmhtcleo/android_...tree/jellybean, and I changed the code, so I was able to force a battery capacity by an external parameter.
The current ZIP file uses an aroma installer, which will ask you for the battery capacity, possible values are normal, 1700, 2000, 2300 and 2600 mAh. It modifies the kernel commandline.
This will only work when you use a cLK bootloader (this is a issue of the used installer script, not of the kernel)
When you are not using the cLK bootloader, you can still use this kernel, but you have to change a kernel parameter after each boot (It should be possible from rc files) using a script that says (as root):
Code:
echo 2300 > /sys/module/ds2746_param/parameters/full_charge
After you installed this kernel, using a value for battery different from 'normal' please do the following steps:
Initialize the battery from recovery.
Discharge the battery until below 5% (I used a program fast discharge, from the market)
Charge the battery.
Turn off your phone, remove battery and reinsert battery
Turn on your phone, and start using it.
Now your reading should be more or less ok.
After 3 charge/discharge cycles, it should be optimal calibrated.
when you want to report any issue, please give the following information:
What kernel did you use previous?
From a terminal (or adb shell), logged in as root, give the result of the following commands:
Code:
cat /proc/cmdline
cat /sys/module/ds2746_param/parameters/full_charge
cat /sys/devices/platform/htc_battery/power_supply/battery/batt_attr_ext
known problems:
*modifies only kernel commandline options using cLK.
*Installer has only fixed values
*I do not expect that you can use this installer to use on SD based bootloader (The kernel however will work)
*???
todo:
Adapt the installer script to be able to use it with other bootloaders
The source code of this kernel is available at:
https://github.com/de-wolff/android_kernel_cmhtcleo in the branche jellybean.