[7 FEB 2013][KERNEL 2.6.32][CM10]New kernel for use with extended battery

Search This thread

de-wolff

Member
Jan 23, 2008
29
41
Zwijndrecht
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_kernel_cmhtcleo/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
Make it usable for CM10.1

The source code of this kernel is available at:
https://github.com/de-wolff/android_kernel_cmhtcleo in the branche jellybean.
 

Attachments

  • HTCLEO-Kernel_2.6.32_de_wolff_jellybean_20130207_15_41.zip
    4.8 MB · Views: 374
Last edited:

de-wolff

Member
Jan 23, 2008
29
41
Zwijndrecht
Progress update

I use this kernel now for about 40 hours.
I did a fast discharge two times, and charged it again two times.
Now it is 13 hours running on the battery, and it says it has still 90% power available. In the past, it was running in 18 hours to 15% and stayed at that level for several days.

Until now, I did not find anything not working
wifi ok,
3G data ok,
phone ok,
sms ok,
sound (spotify) ok,
 
Last edited:
  • Like
Reactions: oversun

de-wolff

Member
Jan 23, 2008
29
41
Zwijndrecht
Yes, I confirm that kernel is under GPL

Approve what. Kernel is under GPL so I can take anything anytime ;)

Sent from my EndeavorU using Tapatalk 2

In the first post is a link to the total kernel sources, that I placed on github.
If you like, you can do anything you like with it.

However, I there is a good change, I will make more modifications to this kernel in the future, so if you are interested in a particular feature, read the comment with the commits.
 
  • Like
Reactions: Daekin and marcimix

twoxx

Senior Member
Jun 3, 2012
311
135
Kernel for jelley bean 4.2

your kernel is great.

but mobiel data connection is a little bit unstable and not so fast.

this rom has the most stable and fastest mobile-Connection, look here: http://xdaforums.com/showthread.php?t=2098722

can you adjust your kernel in order to improve mobile data stability and mobile data speed like the in the rom above?

would you mind if you create a kernel for jelly bean 4.2.?

all the other rom cookers for jb 4.2 have the problem that wifi-connection is not working.

thats because of a problem with the jb 4.1.2 - kernels.

here on xda no one created a kernel that is working 100% with jb 4.2.

can you do that?
 
Last edited:

de-wolff

Member
Jan 23, 2008
29
41
Zwijndrecht
your kernel is great.

but mobiel data connection is a little bit unstable and not so fast.

this rom has the most stable and fastest mobile-Connection, look here: http://xdaforums.com/showthread.php?t=2098722 ...

all the other rom cookers for jb 4.2 have the problem that wifi-connection is not working.
thats because of a problem with the jb 4.1.2 - kernels. ...

can you do that?

Thanks for your feedback.
I will look what is the difference between my kernel, and their kernel, to fix the mobile connection.
My goal (at this moment) is to get a working jb 4.2 kernel for myself, however i do not have much experience with android kernels (i have with other linux kernels), and i also don't have much spare time, to spent on this project, so it will take some time.
 
  • Like
Reactions: mandrakur

twoxx

Senior Member
Jun 3, 2012
311
135
AW: [7 FEB 2013][KERNEL 2.6.32]New kernel for use with extended battery

Thanks for your feedback.
I will look what is the difference between my kernel, and their kernel, to fix the mobile connection.
My goal (at this moment) is to get a working jb 4.2 kernel for myself, however i do not have much experience with android kernels (i have with other linux kernels), and i also don't have much spare time, to spent on this project, so it will take some time.



Sent from my PIXELDROID HD2 using xda app-developers app



And for your new 4.2-kernel this is the 4.2-rom that needs a new kernel especially made for 4.2.-roms....:
http://xdaforums.com/showthread.php?p=36656612

You are doing a great job. Thank you man!

For information:

The rom that i mentioned is a little bit laggy when you are starting apps, activating menus and so on..... But compared to all the other roms here on xda it definitely hast the fastest and most stable mobile data connection.

But i dont know the reason why.... It is using tytungs kernel...... But the combination of the rom with tytungs kernel might be the reason...
 
Last edited:

Rick_1995

Inactive Recognized Developer
Sep 3, 2009
1,118
3,017
Santa Clara
Just saying,

You should use tytung's repository directly, We mostly use the kernel repo to send patches to tytung so everything is in one central place instead of distributed repositories with each having something different.
 

jejemorg

Member
Sep 6, 2007
9
0
Good job :)

Thanks for your work.
Seems to work well with Pixel Droid version.
Can you tell me if your kernel will increase battery in the case of a standard battery.
Thank you.
 

de-wolff

Member
Jan 23, 2008
29
41
Zwijndrecht
@jejemorg:
When using this kernel with a standard battery, and use the installer saying it is a normal battery, the battery behaviour is not modified at all.
If you use a normal battery, and say in the installer, you have a 2300 mAh battery, you will observe your battery will is never more then ~ 50% full, and you will not be able to charge it full, so it will not increase the battery live of a normal battery.
However, during my experiments, I noticed another way to really get the battery capicity of a fully charged battery, without knowing it before. In the future, I want to do more investigations with this, and I also expect that it is possible to use the maximum capicity of each battery this way, which could be slightly more then the standard capicity for standard batteries. Maybe, I will work on this in the future, but at this moment, I first try to get a full 4.2 android version compiled, to do more investigations to the wifi problem.
 

jejemorg

Member
Sep 6, 2007
9
0
Re: [7 FEB 2013][KERNEL 2.6.32]New kernel for use with extended battery

Thank you for your explaination, waiting for your next work :)

Sent from my Transformer using xda app-developers app
 

de-wolff

Member
Jan 23, 2008
29
41
Zwijndrecht
@yunhover: Sorry, it will only work for jellybean (CM10.0 + CM10.1) roms. The CyanMobile eXperience 2.3.8 is CM7. I will put that information in the first post. If there are enough people who want to use a different extended battery for CM7 or CM9, I am willling to backport this change to kernels, which are appropiate for that.
@nqkoidrug: For 1600mAh you can use the 1700mAh selection. As long as the difference is not to big (max ~ 300mAh), it should work. After a few charge discharge cycles, it should be accurate.
 
Last edited:

Traace

Senior Member
Mar 13, 2010
443
117
Thx that u still develop for the great HD2.

Will buy the LEICKE Akku 2300mAh in a few days, i luv the Dorimanx Kenel. u think its possible to port ur settings into it? Based on Tytung ICS so it should be not so difficult. i would do it on my own but im not an developer.
I stay on 2.3.x till 4.x.x gets the performance and less drain that i want :)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 19
    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_kernel_cmhtcleo/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
    Make it usable for CM10.1

    The source code of this kernel is available at:
    https://github.com/de-wolff/android_kernel_cmhtcleo in the branche jellybean.
    2
    Yes, I confirm that kernel is under GPL

    Approve what. Kernel is under GPL so I can take anything anytime ;)

    Sent from my EndeavorU using Tapatalk 2

    In the first post is a link to the total kernel sources, that I placed on github.
    If you like, you can do anything you like with it.

    However, I there is a good change, I will make more modifications to this kernel in the future, so if you are interested in a particular feature, read the comment with the commits.
    2
    @jejemorg:
    When using this kernel with a standard battery, and use the installer saying it is a normal battery, the battery behaviour is not modified at all.
    If you use a normal battery, and say in the installer, you have a 2300 mAh battery, you will observe your battery will is never more then ~ 50% full, and you will not be able to charge it full, so it will not increase the battery live of a normal battery.
    However, during my experiments, I noticed another way to really get the battery capicity of a fully charged battery, without knowing it before. In the future, I want to do more investigations with this, and I also expect that it is possible to use the maximum capicity of each battery this way, which could be slightly more then the standard capicity for standard batteries. Maybe, I will work on this in the future, but at this moment, I first try to get a full 4.2 android version compiled, to do more investigations to the wifi problem.
    1
    Progress update

    I use this kernel now for about 40 hours.
    I did a fast discharge two times, and charged it again two times.
    Now it is 13 hours running on the battery, and it says it has still 90% power available. In the past, it was running in 18 hours to 15% and stayed at that level for several days.

    Until now, I did not find anything not working
    wifi ok,
    3G data ok,
    phone ok,
    sms ok,
    sound (spotify) ok,
    1
    your kernel is great.

    but mobiel data connection is a little bit unstable and not so fast.

    this rom has the most stable and fastest mobile-Connection, look here: http://xdaforums.com/showthread.php?t=2098722 ...

    all the other rom cookers for jb 4.2 have the problem that wifi-connection is not working.
    thats because of a problem with the jb 4.1.2 - kernels. ...

    can you do that?

    Thanks for your feedback.
    I will look what is the difference between my kernel, and their kernel, to fix the mobile connection.
    My goal (at this moment) is to get a working jb 4.2 kernel for myself, however i do not have much experience with android kernels (i have with other linux kernels), and i also don't have much spare time, to spent on this project, so it will take some time.