5,600,053 Members 45,321 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
championswimmer
Old
(Last edited by championswimmer; 2nd December 2012 at 07:30 AM.) Reason: version
#1  
championswimmer's Avatar
Recognized Developer - OP
Thanks Meter 7246
Posts: 4,823
Join Date: Oct 2011
Location: Delhi College of Engineering (Delhi Technological University)

 
DONATE TO ME
Angry [KITCHEN]Android Kernel Kitchen 0.3.1 (Linux / Windows)

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)
If you like my work, you can donate or buy some of my apps on Play Store

CONTRIBUTIONS :
AOKP | TWRPXperia | Kernel Kitchen| TWRP Xperia (Legacy) | Xperia X10

My sources on github
List of donators

Phones
Xperia :: tipo . X10 . J . S . V . SP . ZR . Z . Z1 . Z Ultra . Tablet Z
The Following 157 Users Say Thank You to championswimmer For This Useful Post: [ Click to Expand ]
 
Tof37
Old
#2  
Tof37's Avatar
Senior Member
Thanks Meter 2561
Posts: 601
Join Date: Oct 2009
Location: Tours

 
DONATE TO ME
Great work !!! Will try it asap ... Seems to be very very useful !
If you like my work, and want to help me click here to donate

Semc Debrand Engine Contributor

Member of Team XSonX10
---------------------------------------------------------
My contributions on XDA

Achotjan's remplacement Stock- Light Version

X10s Rom

Fast java sources decompiler
The Following User Says Thank You to Tof37 For This Useful Post: [ Click to Expand ]
 
FeraVolt
Old
#3  
FeraVolt's Avatar
Senior Member
Thanks Meter 12497
Posts: 1,672
Join Date: Dec 2011

 
DONATE TO ME
how about locked bootloaders conversion tool ?)
***FeraLab***
The Following 2 Users Say Thank You to FeraVolt For This Useful Post: [ Click to Expand ]
 
championswimmer
Old
#4  
championswimmer's Avatar
Recognized Developer - OP
Thanks Meter 7246
Posts: 4,823
Join Date: Oct 2011
Location: Delhi College of Engineering (Delhi Technological University)

 
DONATE TO ME
^^
that is in the works

(it will come when i finish my work on boot.img portion of the kitchen)
If you like my work, you can donate or buy some of my apps on Play Store

CONTRIBUTIONS :
AOKP | TWRPXperia | Kernel Kitchen| TWRP Xperia (Legacy) | Xperia X10

My sources on github
List of donators

Phones
Xperia :: tipo . X10 . J . S . V . SP . ZR . Z . Z1 . Z Ultra . Tablet Z
The Following 6 Users Say Thank You to championswimmer For This Useful Post: [ Click to Expand ]
 
Toledo_JAB
Old
#5  
Toledo_JAB's Avatar
Forum Moderator
Thanks Meter 1684
Posts: 2,401
Join Date: Jan 2011
Location: Toledo, Ohio
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

Quote:
Originally Posted by kyphur View Post
Let me be very clear on this:
IF YOU DON'T CARE ABOUT UNDERSTANDING THE JOURNEY,
THEN YOU PROBABLY SHOULDN'T BE HERE IN THE FIRST PLACE.

The Following User Says Thank You to Toledo_JAB For This Useful Post: [ Click to Expand ]
 
wo88les
Old
#6  
wo88les's Avatar
Senior Member
Thanks Meter 382
Posts: 822
Join Date: Nov 2010
Quote:
Originally Posted by ToledoJab View Post
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
 
championswimmer
Old
#7  
championswimmer's Avatar
Recognized Developer - OP
Thanks Meter 7246
Posts: 4,823
Join Date: Oct 2011
Location: Delhi College of Engineering (Delhi Technological University)

 
DONATE TO ME
for windows needs cygwin buddy

and you need perl, python, cpio, gzip (or gunzip) installed inside cygwin
If you like my work, you can donate or buy some of my apps on Play Store

CONTRIBUTIONS :
AOKP | TWRPXperia | Kernel Kitchen| TWRP Xperia (Legacy) | Xperia X10

My sources on github
List of donators

Phones
Xperia :: tipo . X10 . J . S . V . SP . ZR . Z . Z1 . Z Ultra . Tablet Z
The Following 6 Users Say Thank You to championswimmer For This Useful Post: [ Click to Expand ]
 
wo88les
Old
#8  
wo88les's Avatar
Senior Member
Thanks Meter 382
Posts: 822
Join Date: Nov 2010
cyg win is installing now its BIG! i selected to install everything
 
Toledo_JAB
Old
#9  
Toledo_JAB's Avatar
Forum Moderator
Thanks Meter 1684
Posts: 2,401
Join Date: Jan 2011
Location: Toledo, Ohio
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

Quote:
Originally Posted by kyphur View Post
Let me be very clear on this:
IF YOU DON'T CARE ABOUT UNDERSTANDING THE JOURNEY,
THEN YOU PROBABLY SHOULDN'T BE HERE IN THE FIRST PLACE.

 
championswimmer
Old
#10  
championswimmer's Avatar
Recognized Developer - OP
Thanks Meter 7246
Posts: 4,823
Join Date: Oct 2011
Location: Delhi College of Engineering (Delhi Technological University)

 
DONATE TO ME
for dual boot tuto

see this
http://forum.xda-developers.com/show...php?p=24887566

and the following 10-15 posts

Sent from my X10S using xda premium
If you like my work, you can donate or buy some of my apps on Play Store

CONTRIBUTIONS :
AOKP | TWRPXperia | Kernel Kitchen| TWRP Xperia (Legacy) | Xperia X10

My sources on github
List of donators

Phones
Xperia :: tipo . X10 . J . S . V . SP . ZR . Z . Z1 . Z Ultra . Tablet Z

The Following 3 Users Say Thank You to championswimmer For This Useful Post: [ Click to Expand ]
Tags
boot logo edit, champioswimmer, kernel, kernel kitchen, png rle
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes