Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[KITCHEN]Android Kernel Kitchen 0.3.1 (Linux / Windows)

OP championswimmer

17th May 2012, 11:17 PM   |  #1  
INTRODUCTION
So we all know dsixda's XDA ROM Kitchen
Then how about a kitchen for Kernels ??

What started out just as my personal directory where I kept all my kernel and ramdisk tinkering scripts, has now turned into a project (which is far from finished right now )

This does NOT enable you to compile the kernel binary (aka zImage).
This enables you to edit ramdisk and change bootsplash images and helps kernel developers to deploy their compiled kernel in a usable form.

FEATURES
As of now what we can do with the Kernel Kitchen is
  1. Fully menu driven interface (like dsixda kitchen)
  2. Extract zImage and ramdisk from boot.img file
  3. Create boot.img from zImage and ramdisk
  4. Extract zImage and ramdisk from any ftf file that contains kernel.sin (Xperia 2010, 2011, 2012)
  5. Create flashable ftf from zImage and ramdisk (Xperia 2010 only)
  6. Create kernel.sin from zImage and Ramdisk and also split kernel.sin into zimage and ramdisk
  7. Extract zImage, ramdisk and its contents from kernel.elf (Xperia 2012)
  8. Create kernel.elf from ramdisk, zImage (and RPM) - for Xperia 2012
  9. Create compressed ramdisk binary from ramdisk folder
  10. Extract ramdisk files from ramdisk binary
  11. Convert png image to rle format (used in android boot splash images)
  12. Convert rle boot splash to png file (so that you can edit it)
Proposed upcoming features
  1. Automatic script to change boot splash in a kernel with your favourite png file
STYLE CODE :
bold are supported only in linux
italics are supported in linux and windows+cygwin
underline are supported in windows native (without cygwin)
(if more than one style is used, it supports all respective platforms)

WARNING !!!!

Please be well informed that whenever you distribute/redistribute a kernel zImage or the whole boot.img that contains the zImage or the kernel in any form in which it contains the compiled zImage, you MUST provide the option to view it's sources or else it'll be a major violation of GPL (General Public License) which governs the Linux kernel.

If you are using a compiled kernel made available by some other dev, then you are SUPPOSED TO mention it clearly and provide a link back to the original location from where you got the kernel (original thread) and also the sources of that kernel

If anyone uses this tool to unpack/repack a kernel and redistribute it publicly on xda (or any other website) then it's his responsibility to maintain proper credits and acknowledgement of works of original developers and also it's his/her responsibility to comply with the GPL


A NOTE OF ADVICE

I would like to mention here that this kitchen was made with two purposes in mind.

1. For someone who already knows how to do all this complicated ****, but wants a tool of convenience to do it automatically

2. For people who do not know much about custom kernels but want to make minor changes to ramdisk (making it insecure, or changing the bootlogo) for their PERSONAL use.

This tool is NOT meant to be used to repackage works of other developers and pass them on as your work.
In any case, if you want to redistribute a kernel created using my tool, then I suggest you to read the WARNING above once again all over, and also properly read the GPL v2 (link here) and specifically section 3 of GPL

3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:

a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.


REQUIREMENTS
This tool is primarily meant for linux users (preferably Uubuntu).
But it works perfectly well on windows+cygwin too

Some portions of the kitchen have support for native windows (without even cygwin)

Rest all requirements are mentioned in the readme

WHAT ARE ITS USES ?

1.
The primary purpose (for which this project started out in the first place) is to provide a easy kernel deployment tool for wannabe kernel devs.
A lot of us can compile a kernel from source but that is just the zImage and cannot be used as such on the phone. We need to package it with a ramdisk ad deploy it thorough a proper method (flashtool for Xperia, ODIN for samsund, and fastboot for other phones)

2.
You canedit ramdisk properties (by editing default.prop)
Changing ro.secure=1 to ro.secure=0 makes your ramdisk insecure and enables easy root access
3.
The most immediate and popular use that i can see right now is changing the boot logo to your liking
the boot logo is called logo.rle or initlogo.rle and is placed in the root of ramdisk folder.
When you split kernel, you can find the rle file which you can convert into png, do necessary editing and convert back into rle and pack up the ramdisk and create a new kernel

4.
Other than that, you can change the recovery system
for eg. you can include Doom's Touch recovery system inside your favourite kernel
or you can include the xRecovery inside CM7 kernel so that you can flash amend zips.
Changing the recovery is ofcourse a little more complicated for average users, and i'll write a short tuto for that soon enough
DOWNLOAD AND USAGE
The sources can be found on www.github.com/championswimmer/kernel-tools


For linux (and cygwin) users I recommend the install git and run this command to get a copy of my repository
Code:
 git clone  https://github.com/championswimmer/kernel-tools.git
Or in general, all linux and windows users can just get a zipball of my repo here
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
All usage information can be found on this elaborate readme

In short all you have to do is cd to the appropriate folder and run this

Code:
./menu
or you can just double-click menu and click "run in terminal"

CREDITS
None of this was possible without the helps and works of DoomLord, Azuzu, bin4ry, FXP, defer, blagus, nobodyAtall, the_laser, Androxyde


These works are directly included in my project
DoomLord's kernel.sin and ftf creator (windows version)


These works are used in their modified/repackaged form
DoomLord's png and rle interconversion tool (windows version)
DoomLord's perl script to split kerel.sin

And big thanks to nobodyAtall for pointing me the appropriate linux binaries (or i would have kept pouring wine over windows exe files)

Huge thanks to Atarii and this thread of his for all info needed to manipulate kernel.elf files on Xperia 2012 line

Thanks to ImageMagick developers for the awesome tool

SOURCES USED
1. to565 and from565 source code (part of Android Open Source Project)

2. mkbootimg and mkbootfs standalone sources (part of AOSP)

3. abootimg sources (by Gilles Grandou)
Last edited by championswimmer; 2nd December 2012 at 08:30 AM. Reason: version
The Following 166 Users Say Thank You to championswimmer For This Useful Post: [ View ]
17th May 2012, 11:33 PM   |  #2  
Tof37's Avatar
Senior Member
Flag Tours
Thanks Meter: 2,684
 
612 posts
Join Date:Joined: Oct 2009
Donate to Me
More
Thumbs up
Great work !!! Will try it asap ... Seems to be very very useful !
The Following User Says Thank You to Tof37 For This Useful Post: [ View ]
17th May 2012, 11:48 PM   |  #3  
FeraVolt's Avatar
Senior Member
Thanks Meter: 13,194
 
1,768 posts
Join Date:Joined: Dec 2011
Donate to Me
More
how about locked bootloaders conversion tool ?)
The Following 2 Users Say Thank You to FeraVolt For This Useful Post: [ View ]
18th May 2012, 09:13 AM   |  #5  
Toledo_JAB's Avatar
Forum Moderator
Flag Toledo, Ohio
Thanks Meter: 2,352
 
2,746 posts
Join Date:Joined: Jan 2011
More
nice work going on here champ. downloading kCernel-thgo from github now. i cant wait to try your kernel tools. thanks for your work. :D
The Following User Says Thank You to Toledo_JAB For This Useful Post: [ View ]
18th May 2012, 05:45 PM   |  #6  
wo88les's Avatar
Senior Member
Thanks Meter: 382
 
822 posts
Join Date:Joined: Nov 2010
More
Quote:
Originally Posted by ToledoJab

nice work going on here champ. downloading kCernel-thgo from github now. i cant wait to try your kernel tools. thanks for your work. :D

doesnt work on windows cant unpack lol

iv read through readme's and it keeps saying the same thing,

i have also tried extracting FTF, i got a Kernel.sin and a loader.sin bit still no idea how to extract out of those.. any ideas lol
18th May 2012, 05:57 PM   |  #7  
for windows needs cygwin buddy

and you need perl, python, cpio, gzip (or gunzip) installed inside cygwin
The Following 7 Users Say Thank You to championswimmer For This Useful Post: [ View ]
18th May 2012, 06:23 PM   |  #8  
wo88les's Avatar
Senior Member
Thanks Meter: 382
 
822 posts
Join Date:Joined: Nov 2010
More
cyg win is installing now its BIG! i selected to install everything
18th May 2012, 09:49 PM   |  #9  
Toledo_JAB's Avatar
Forum Moderator
Flag Toledo, Ohio
Thanks Meter: 2,352
 
2,746 posts
Join Date:Joined: Jan 2011
More
Lightbulb Dual boot Linux for 'Kernel Kitchen'
Quote:
Originally Posted by wo88les

doesnt work on windows cant unpack lol

iv read through readme's and it keeps saying the same thing,

i have also tried extracting FTF, i got a Kernel.sin and a loader.sin bit still no idea how to extract out of those.. any ideas lol

Quote:

REQUIREMENTS
This tool is primarily meant for linux users (preferably Uubuntu).
But it works perfectly well on windows+cygwin too

I have installed UBUNTU on a separate linux partition from windows xp ntfs partition. after ubuntu install i have dual boot UBUNTU/XP.

If anyone would like help SETTING-UP a dual boot machine to use Champ's 'kernel kitchen' please PM (private message) me and i will help. Please use PM to help Champ keep his thread SPAM free :D
Post Reply Subscribe to Thread

Tags
boot logo edit, champioswimmer, kernel, kernel kitchen, png rle
Previous Thread Next Thread