[KERNEL][TWGB][updated 1/16] KGB Kernel: A Kernel for Gingerbread (EH09/EI20/EH03)

Search This thread

comradesven

Senior Member
Jan 24, 2011
156
302

KGB Kernel
A Kernel for Gingerbread

Last updated: 1/16/2012


Standard disclaimer: I did this for myself more than anything. If this kernel causes you to sleep through an appointment or kills your firstborn or whatever, them's the breaks.
By using this kernel you understand that it comes with no warranty whatsoever, and that flashing anything to your phone invalidates the warranty on that as well.


For Fascinate, Mesmerize, and Showcase
and ROMs based on EH09, EI20, and EH03


TKSGB has been renamed to KGB Kernel, because it's a kernel for Gingerbread (for the SCH-I500, and TouchWiz ROMs). I decided that posting a new thread would let me rename the kernel with the Most Imaginative Name Ever®, close the old thread for getting too long, and rewrite the first post all at the same time.


FEATURES
CUSTOM SETTINGS APP
I wrote an app to replace the command-line scripts that controlled some of the settings in the kernel. It will auto-install upon boot and may even work with some features of the other TWGB kernels out there.​

VOODOO
Voodoo Lagfix (with autoconvert) and Voodoo Sound v10. Compatible with Voodoo Control app.​

OVERCLOCKING/UNDERVOLTING
Supported up to to 1.7GHz with Pimp My CPU/Voltage Control.​

TWEAKED CPU GOVERNORS AND I/O SCHEDULERS
ondemand is the default and recommended CPU governor. interactive, smartassv2, and tweaked conservative governors are included. ondemand and interactive are renamed from ondemandX and interactiveX, updating what was already there.
deadline is the default and recommended I/O scheduler. sio, vr, and bfq are included. deadline, sio, and vr have been tweaked for flash memory.​

NO HOTSPOT MONITORING
The Wi-Fi driver is ported from i9000, and has updates that some have said make it more stable than the driver included in the stock kernels. Tethering with Wireless Tether for Root Users and other apps is supported.
Using Verizon's built-in 3G Mobile Hotspot is never recommended.​

THIRD-PARTY BATTERY SUPPORT
Batteries for other Samsung Galaxy S models, off-brand batteries, and third-party extended batteries are all supported. Genuine Samsung i9000 batteries and third-party batteries that live up to the 1500mah ratings can now be had for well under $10.​

USER-ADJUSTABLE TRICKLE CHARGE
Credit for this feature goes to djp952. There are still a couple of reasons why this is considered experimental, but it will definitely get rid of Gingerbread battery drop if you are experiencing it. I extended it so that it can be enabled from userspace, so that one version of the kernel can accommodate people who want to use this feature and people who don't. Turning trickle charge on can be easily done with the included KGB App.​

IN-CALL VOLUME BOOST
User-adjustable in-call volume boost settings can be changed by running the included KGB App.​

IN-CALL MIC GAIN
User-adjustable in-call mic gain settings can be changed by running the included KGB App.​

AOSP-STYLE COLOR TUNING
Voodoo Color hasn't been working right for anybody and was causing greenish blotchy artifacts on videos, so AOSP-style color tuning has been implemented and can be adjusted by running the included KGB App.​

TOUCHKEY BACKLIGHT TIMEOUT
Custom touchkey backlight timeouts is another AOSP feature ported to KGB Kernel, and can be adjusted by running the included KGB App.​

BACKLIGHT NOTIFICATIONS
neldar's BLN v9 is included, and can be enabled with BLN Control app or Blinky.​

ZRAM
At the cost of increased CPU usage, zram effectively gives you more RAM by setting aside a portion of it and compressing what gets stored there.
zram can be enabled by running the included KGB App.​

DOCK AUDIO SUPPORT
Apparently this is working to the satisfaction of those who actually have docks (I don't).​

LED FLASHLIGHT
Didn't work with stock kernels, but works now. Strobe is not supported.​

BOOT ANIMATIONS
Automatically chooses between Samsung-style boot animations and AOSP-style (zip) boot animations.​

CIFS, TUN, UTF8
All built into the kernel, with no need to load any modules​

LOW-LEVEL TWEAKS AND UPDATES
Various autogroups, RCU updates, jhash3, ext4 updates, and memory management updates are included. So are patches for the ARM SoC by ARM and Samsung and a number of other patches to the Linux kernel. In sum these clean up the kernel source code and help interactivity.


OPEN SORES
KGB Kernel source on Github: I don't know C. I kang everything.
Don't you dare think that you have to ask for my permission before using my source however you like. :D

It appears that I have finally gotten the .gitignores correct and the git repo will build a working kernel! Let's not dwell on how shameful it is that my repo didn't even build until two months after my first release. I have updated the xda wiki article on building KGB Kernel. If someone tries it out let me know how it goes!​


THANKS
Unwitting contributors
imoseyon, ccampos784, djp952, existz, jt1134, Tk-Glitch, Efpophis, SirGatez, erasmux, supercurio, renaudallard, zachariasmaladroit, xcaliburinhand, a bunch of people who made it into the mainline Linux tree.

I've tried to credit these people and others as best I can in my git repo's commit messages, but some of these people are on here because I used their code as a model for various things.​
Others
People from IRC/people who helped the community/testers/teamsbrissenmod members, including adrynalyne, imnuts, times_infinity, navenedrob, nemesis2all, nitsuj17, chopperthedog, ACLakey, veteranmina, brickbeats, etc.

Everyone who has ever tried my kernel!​


certifiedicon.png
 
Last edited:

comradesven

Senior Member
Jan 24, 2011
156
302
KGB Kernel doesn't come with CWM. You can use the CWM 2.5 that is supposed to be more compatible with nandroids and the blue CWM 3.0.2.8x here, among others. I'll be working on this in the near future.

DOWNLOADS/CHANGES
FA16 (2012/1/16): ODIN CWM
Changed buildcode naming scheme to match Samsung's
Removed boot logo
Switched from Voodoo Color to AOSP-style color tuning
Reimplemented in-call volume boost, added custom in-call mic gains (thanks Efpophis)
Rewrote touchkey driver to better deal with EM interference and implement AOSP-style touchkey backlight timeout
Extended djp952's trickle charge patch so that it can be enabled from userspace
Wrote KGB App to handle all the functions of the old zram, callboost, and bltimer scripts + adjust color tuning + enable trickle charge
Changed some LMK values around
Kernel: updates to kernel power management and a couple different things including a different implementation of semaphores (specific commits were in Talon)

You may want to use the startup script uninstaller linked below with this one.
1212: ODIN CWM
Revert changes to zram and readahead, somehow caused slowdown
Update Voodoo stages
Autoinstall bash and nano
A couple minor commits to bring us up to date with AOSP's Samsung GB kernel
Changed splash screen​
1202: ODIN CWM
Custom splash screen
Try to use Samsung's deep idle implementation
Updates to all my scripts. They're now better in every way ;)
Updates to zram from Linux 3.2-rc1​
1127: ODIN CWM
Initial release of KGB Kernel after renaming from TKSGB.
Exact changes from EH09 source are visible on my github.
Includes all the updates from EI20 source and elements from EH03 ramdisk.​

OTHER DOWNLOADS
bash and nano: CWM
bash, nano, and libncurses. Should work for all TWGB ROMs.​
Kernel cleaner script: CWM
You only need this if you want to uninstall any startup scripts created by the command-line zram, callboost, and bltimer utilities. For example, you may want to use KGB App but it's yelling at you about startup scripts and you don't know how to remove them manually. Flash this CWM zip to remove 05zram, 91callboost and 99bltimer scripts from /etc/init.d/.​
BLN framework patch for TSM Resurrection 2.0: CWM
Flash this patch on top of TSMR 2.0 and BLN will work like it's supposed to!​
BLN framework patch for SuperClean3 Milestone 1: CWM
Flash this patch on top of SC3M1 and BLN will work like it's supposed to!​
 
Last edited:

comradesven

Senior Member
Jan 24, 2011
156
302
One-off builds that I won't call releases (CWM only, no support on the changes)

FA16 for EI20. http://www.mediafire.com/?vhyu67vceae5kon
FA16 for EH09. http://www.mediafire.com/?oocgag4uj98qb1o
Neither of these has been tested. They should both include all the new features and autoinstall KGB App just like the regular EH03 version. I won't know what's broken and needs fixing until someone tells me and/or I do some testing myself.

1212 with trickle charge. http://mediafire.com/download.php?he19bvkm2p1sm7r

1212 for EH09, no trickle charge. http://mediafire.com/download.php?ljmj5j8r5cplt5d

1202 with trickle charge. http://www.mediafire.com/?b54va9bsgxt0zuq

1202 for EH09, no trickle charge, video and camera hopefully fixed. http://www.mediafire.com/?f8nj58x1st3f267

1127 with trickle charge. http://www.mediafire.com/download.php?c40aak4dsxnkdqa

FAQ and some more content is coming later.
 
Last edited:

comradesven

Senior Member
Jan 24, 2011
156
302
logcat doesn't work on EH03. Fixed with logcat binaries from EH09/EI12, see other download section above

Video playback and possibly camera are broken on EH09. Fixed with one-off builds.
 
Last edited:
  • Like
Reactions: JJ5150

skynet11

Senior Member
Oct 14, 2010
1,935
686
For someone who's "not a dev" you do excellent work :D Thanks for all your efforts.

Has anyone seen John Connor?
 
  • Like
Reactions: comradesven

ssewk2x

Senior Member
Oct 24, 2010
1,382
1,392
Detroit, MI
OnePlus 8T
Google Pixel 8 Pro
<in my best fake russian accent>
Nice job, Comrade! And you could not have picked more appropriate name.
</fake accent>

I've got this running solid as a brick on my wife's phone, OC to 1.3GHz with -50mv across the board. Was never able to OC her phone before without it going nuts, but I had chalked it up to the phone being a refurb. I guess it just needed the proper software after all :)

Let me know if you ever need a hand from someone who knows a little C, ok? I'd be glad to help if I can.
 
  • Like
Reactions: comradesven

wessiide

Senior Member
Jul 16, 2011
237
32
If we are coming from an older version of this kernel do we have to re enable z ram and audio boost to have it function correctly?

Sent from my SCH-I500 using Tapatalk
 

wessiide

Senior Member
Jul 16, 2011
237
32
Also do back light stay on constantly on the latest kernel cuz I have them covered up so I was wondering if they time out now or is that rom related?

Sent from my SCH-I500 using Tapatalk
 

laureanop

Senior Member
Aug 24, 2010
2,163
607
Los Angeles
@comradesven I noticed that available ram increased from 346 to 366. How did you do that?

"the relentless pursuit of the perfect rom"
 

jrowen76

Member
Oct 7, 2008
44
1
Having problems playing videos. On awsome sauce and this kernel installed via cwm....

Sent from my SCH-I500 using xda premium
 

Top Liked Posts

  • There are no posts matching your filters.
  • 37

    KGB Kernel
    A Kernel for Gingerbread

    Last updated: 1/16/2012


    Standard disclaimer: I did this for myself more than anything. If this kernel causes you to sleep through an appointment or kills your firstborn or whatever, them's the breaks.
    By using this kernel you understand that it comes with no warranty whatsoever, and that flashing anything to your phone invalidates the warranty on that as well.


    For Fascinate, Mesmerize, and Showcase
    and ROMs based on EH09, EI20, and EH03


    TKSGB has been renamed to KGB Kernel, because it's a kernel for Gingerbread (for the SCH-I500, and TouchWiz ROMs). I decided that posting a new thread would let me rename the kernel with the Most Imaginative Name Ever®, close the old thread for getting too long, and rewrite the first post all at the same time.


    FEATURES
    CUSTOM SETTINGS APP
    I wrote an app to replace the command-line scripts that controlled some of the settings in the kernel. It will auto-install upon boot and may even work with some features of the other TWGB kernels out there.​

    VOODOO
    Voodoo Lagfix (with autoconvert) and Voodoo Sound v10. Compatible with Voodoo Control app.​

    OVERCLOCKING/UNDERVOLTING
    Supported up to to 1.7GHz with Pimp My CPU/Voltage Control.​

    TWEAKED CPU GOVERNORS AND I/O SCHEDULERS
    ondemand is the default and recommended CPU governor. interactive, smartassv2, and tweaked conservative governors are included. ondemand and interactive are renamed from ondemandX and interactiveX, updating what was already there.
    deadline is the default and recommended I/O scheduler. sio, vr, and bfq are included. deadline, sio, and vr have been tweaked for flash memory.​

    NO HOTSPOT MONITORING
    The Wi-Fi driver is ported from i9000, and has updates that some have said make it more stable than the driver included in the stock kernels. Tethering with Wireless Tether for Root Users and other apps is supported.
    Using Verizon's built-in 3G Mobile Hotspot is never recommended.​

    THIRD-PARTY BATTERY SUPPORT
    Batteries for other Samsung Galaxy S models, off-brand batteries, and third-party extended batteries are all supported. Genuine Samsung i9000 batteries and third-party batteries that live up to the 1500mah ratings can now be had for well under $10.​

    USER-ADJUSTABLE TRICKLE CHARGE
    Credit for this feature goes to djp952. There are still a couple of reasons why this is considered experimental, but it will definitely get rid of Gingerbread battery drop if you are experiencing it. I extended it so that it can be enabled from userspace, so that one version of the kernel can accommodate people who want to use this feature and people who don't. Turning trickle charge on can be easily done with the included KGB App.​

    IN-CALL VOLUME BOOST
    User-adjustable in-call volume boost settings can be changed by running the included KGB App.​

    IN-CALL MIC GAIN
    User-adjustable in-call mic gain settings can be changed by running the included KGB App.​

    AOSP-STYLE COLOR TUNING
    Voodoo Color hasn't been working right for anybody and was causing greenish blotchy artifacts on videos, so AOSP-style color tuning has been implemented and can be adjusted by running the included KGB App.​

    TOUCHKEY BACKLIGHT TIMEOUT
    Custom touchkey backlight timeouts is another AOSP feature ported to KGB Kernel, and can be adjusted by running the included KGB App.​

    BACKLIGHT NOTIFICATIONS
    neldar's BLN v9 is included, and can be enabled with BLN Control app or Blinky.​

    ZRAM
    At the cost of increased CPU usage, zram effectively gives you more RAM by setting aside a portion of it and compressing what gets stored there.
    zram can be enabled by running the included KGB App.​

    DOCK AUDIO SUPPORT
    Apparently this is working to the satisfaction of those who actually have docks (I don't).​

    LED FLASHLIGHT
    Didn't work with stock kernels, but works now. Strobe is not supported.​

    BOOT ANIMATIONS
    Automatically chooses between Samsung-style boot animations and AOSP-style (zip) boot animations.​

    CIFS, TUN, UTF8
    All built into the kernel, with no need to load any modules​

    LOW-LEVEL TWEAKS AND UPDATES
    Various autogroups, RCU updates, jhash3, ext4 updates, and memory management updates are included. So are patches for the ARM SoC by ARM and Samsung and a number of other patches to the Linux kernel. In sum these clean up the kernel source code and help interactivity.


    OPEN SORES
    KGB Kernel source on Github: I don't know C. I kang everything.
    Don't you dare think that you have to ask for my permission before using my source however you like. :D

    It appears that I have finally gotten the .gitignores correct and the git repo will build a working kernel! Let's not dwell on how shameful it is that my repo didn't even build until two months after my first release. I have updated the xda wiki article on building KGB Kernel. If someone tries it out let me know how it goes!​


    THANKS
    Unwitting contributors
    imoseyon, ccampos784, djp952, existz, jt1134, Tk-Glitch, Efpophis, SirGatez, erasmux, supercurio, renaudallard, zachariasmaladroit, xcaliburinhand, a bunch of people who made it into the mainline Linux tree.

    I've tried to credit these people and others as best I can in my git repo's commit messages, but some of these people are on here because I used their code as a model for various things.​
    Others
    People from IRC/people who helped the community/testers/teamsbrissenmod members, including adrynalyne, imnuts, times_infinity, navenedrob, nemesis2all, nitsuj17, chopperthedog, ACLakey, veteranmina, brickbeats, etc.

    Everyone who has ever tried my kernel!​


    certifiedicon.png
    11
    KGB Kernel doesn't come with CWM. You can use the CWM 2.5 that is supposed to be more compatible with nandroids and the blue CWM 3.0.2.8x here, among others. I'll be working on this in the near future.

    DOWNLOADS/CHANGES
    FA16 (2012/1/16): ODIN CWM
    Changed buildcode naming scheme to match Samsung's
    Removed boot logo
    Switched from Voodoo Color to AOSP-style color tuning
    Reimplemented in-call volume boost, added custom in-call mic gains (thanks Efpophis)
    Rewrote touchkey driver to better deal with EM interference and implement AOSP-style touchkey backlight timeout
    Extended djp952's trickle charge patch so that it can be enabled from userspace
    Wrote KGB App to handle all the functions of the old zram, callboost, and bltimer scripts + adjust color tuning + enable trickle charge
    Changed some LMK values around
    Kernel: updates to kernel power management and a couple different things including a different implementation of semaphores (specific commits were in Talon)

    You may want to use the startup script uninstaller linked below with this one.
    1212: ODIN CWM
    Revert changes to zram and readahead, somehow caused slowdown
    Update Voodoo stages
    Autoinstall bash and nano
    A couple minor commits to bring us up to date with AOSP's Samsung GB kernel
    Changed splash screen​
    1202: ODIN CWM
    Custom splash screen
    Try to use Samsung's deep idle implementation
    Updates to all my scripts. They're now better in every way ;)
    Updates to zram from Linux 3.2-rc1​
    1127: ODIN CWM
    Initial release of KGB Kernel after renaming from TKSGB.
    Exact changes from EH09 source are visible on my github.
    Includes all the updates from EI20 source and elements from EH03 ramdisk.​

    OTHER DOWNLOADS
    bash and nano: CWM
    bash, nano, and libncurses. Should work for all TWGB ROMs.​
    Kernel cleaner script: CWM
    You only need this if you want to uninstall any startup scripts created by the command-line zram, callboost, and bltimer utilities. For example, you may want to use KGB App but it's yelling at you about startup scripts and you don't know how to remove them manually. Flash this CWM zip to remove 05zram, 91callboost and 99bltimer scripts from /etc/init.d/.​
    BLN framework patch for TSM Resurrection 2.0: CWM
    Flash this patch on top of TSMR 2.0 and BLN will work like it's supposed to!​
    BLN framework patch for SuperClean3 Milestone 1: CWM
    Flash this patch on top of SC3M1 and BLN will work like it's supposed to!​
    8
    Sorry about the later than promised release. I couldn't bring myself to pull the trigger knowing that X wasn't done or Y wasn't how I wanted it, but at last I finally did.

    The big changes in this release are ditching Voodoo Color for AOSP-style color tuning, trickle charge included in the battery driver with a userspace toggle, and KGB App to tie everything together, along with a few lower-level things. I guess I actually am a dev now.

    Please feel free to send me feedback PMs or e-mails through the menu option in KGB App. I can't guarantee a response to each one but I promise to read them all and incorporate suggestions/fixes as best I can. This goes especially for any EH09/EI20 users, as any testing that I personally do with those older releases is very limited but there seems to be a number of people out there still on some ROM or another that's based on those releases.

    BTW, thanks to ACLakey if you're reading this for your help with beta testing today's release! Please upgrade as I fixed several major bugs!
    7
    One-off builds that I won't call releases (CWM only, no support on the changes)

    FA16 for EI20. http://www.mediafire.com/?vhyu67vceae5kon
    FA16 for EH09. http://www.mediafire.com/?oocgag4uj98qb1o
    Neither of these has been tested. They should both include all the new features and autoinstall KGB App just like the regular EH03 version. I won't know what's broken and needs fixing until someone tells me and/or I do some testing myself.

    1212 with trickle charge. http://mediafire.com/download.php?he19bvkm2p1sm7r

    1212 for EH09, no trickle charge. http://mediafire.com/download.php?ljmj5j8r5cplt5d

    1202 with trickle charge. http://www.mediafire.com/?b54va9bsgxt0zuq

    1202 for EH09, no trickle charge, video and camera hopefully fixed. http://www.mediafire.com/?f8nj58x1st3f267

    1127 with trickle charge. http://www.mediafire.com/download.php?c40aak4dsxnkdqa

    FAQ and some more content is coming later.
    5
    OK, as promised, here's a preview build. Exact changes are in git but it's basically some cleanups + custom touchkey backlight timeouts + changes from EH03 that may have introduced some bugs that aren't readily obvious. Still, this time I think I've managed to do some "real developer work" (defined loosely). Timeouts don't interfere with BLN. Use the new "bltimer" script from a root prompt to set it, the default behavior is to stay on as long as the screen is on just like in stock. Odin tar for EH03. http://www.mediafire.com/download.php?wdsc9ckb04auqvs

    I'm currently trying to puzzle out some more details of the changes between the 3 versions but I'll have EI20 and EH09 preview builds out later.