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
Fully menu driven interface (like dsixda kitchen)
Extract zImage and ramdisk from boot.img file
Create boot.img from zImage and ramdisk
Extract zImage and ramdisk from any ftf file that contains kernel.sin (Xperia 2010, 2011, 2012)
Create flashable ftf from zImage and ramdisk (Xperia 2010 only)
Create kernel.sin from zImage and Ramdisk and also split kernel.sin into zimage and ramdisk
Extract zImage, ramdisk and its contents from kernel.elf (Xperia 2012)
Create kernel.elf from ramdisk, zImage (and RPM) - for Xperia 2012
Create compressed ramdisk binary from ramdisk folder
Extract ramdisk files from ramdisk binary
Convert png image to rle format (used in android boot splash images)
Convert rle boot splash to png file (so that you can edit it)
Proposed upcoming features
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 !!!!
[SIZE=+1]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[/SIZE]
A NOTE OF ADVICE
[SIZE=+1]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
[/SIZE]
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)
Great work !!! Will try it asap ... Seems to be very very useful !
how about locked bootloaders conversion tool ?)
^^
that is in the works
(it will come when i finish my work on boot.img portion of the kitchen)
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
ToledoJab said:
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
Click to expand...
Click to collapse
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
for windows needs cygwin buddy
and you need perl, python, cpio, gzip (or gunzip) installed inside cygwin
cyg win is installing now its BIG! i selected to install everything
Dual boot Linux for 'Kernel Kitchen'
wo88les said:
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
Click to expand...
Click to collapse
REQUIREMENTS
This tool is primarily meant for linux users (preferably Uubuntu).
But it works perfectly well on windows+cygwin too
Click to expand...
Click to collapse
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
for dual boot tuto
see this
http://forum.xda-developers.com/showthread.php?p=24887566
and the following 10-15 posts
Sent from my X10S using xda premium
Today I had a little look at ubuntu and your guide and was able to view the various settings. I didn't change anything as I'm totally stumped where to start hehe but I'll continue through your guide again when I'm home.
Again. Great work champ and thank you
Sent from my X10S v8.2 using XDA Premium
added boot.img support in kernel
thus for us, it means we can tinker with locked bootloader kernels too now
championswimmer said:
added boot.img support in kernel
thus for us, it means we can tinker with locked bootloader kernels too now
Click to expand...
Click to collapse
That sounds really neat. Thats really impressive. So, is it possible to tinker with the kernel.sin file in an update package and get a working ftf file from it, kernel cooker? Hmm? And if so, how?
TAL333 said:
That sounds really neat. Thats really impressive. So, is it possible to tinker with the kernel.sin file in an update package and get a working ftf file from it, kernel cooker? Hmm? And if so, how?
Click to expand...
Click to collapse
thats easy
take a kernel.ftf file which was meant for unlocked bootloader.
open it wit zip/rar/7zip/bzip software (yes ftf = zip )
replace the kernel.sin inside it with the one you have.
while flashing, the version might not show correct but once flashed, you'll find your kernel running fine
Sent from my X10S using xda premium
championswimmer said:
thats easy
take a kernel.ftf file which was meant for unlocked bootloader.
open it wit zip/rar/7zip/bzip software (yes ftf = zip )
replace the kernel.sin inside it with the one you have.
while flashing, the version might not show correct but once flashed, you'll find your kernel running fine
Sent from my X10S using xda premium
Click to expand...
Click to collapse
I got impatient waiting so I tried a bundle creation through Flashtool. Since my phone isn't bricked I figure that works too. And quicker too. Not to stray off topic but since I will probably be using CM9 soon I think its time you posted an easy way to enable on screen buttons in CM9 for newbs like me on your ultimate repository of Champy goodness. Please. And make it dumbproof. Please......
tal333
updated to 0.1.1
waiting for some bug reports
(i know there must be something or other wrong here or there, i can't be PERFECT afterall )
want to get all bugs fixed before adding more features
I just remembered about your kitchen sorry champ, do you think this will fix my WiFi compiling? Cheers so far I have 25hrs of battery with my kernel but it's not really an honest result considering there is no WiFi at all
Sent from my X10S v8.2 using XDA Premium
nice tool
I have this problem S
Press [Enter] key to create ftf...
Please mention for which device you are packing kernel
For X10, enter 1
For X8, Mini or MiniPro enter 2
Type either 1 or 2 and press enter
2
read 00489B43 bytes
...................................... cp: can not stat `on 'loader_unlocked_7x27 . no ': No such file or directory
----------------ENTER KERNEL BRANDING DETAILS------------
Thanks ................
Wow Friend Very nice work......................
its really need for all android DEV
finally i build my own kernel using ezy/great tools
test this tool soon .........
BTW : its ezy for new user or not ??????
I see this has been asked several times. Yet they all seem related to a small package of APKs or the answer is "unzip someone else's and replace what you need".
I have successfully compiled android for nexus 7 and I am able to use fastboot to flash the device. What I would like to be able to do is create an update.zip that can be flashed.
The situation is we have a few hundred Nexus 7s we need to flash and want to simplify the process as much as possible. If could package an update.zip and flash it via fastboot that would be handy as well. Our current setup is to distribute a zip of the out dir from the android build and use a quick script to automate fastboot flashing.
Even if it doesn't really help our situation. How does one go from a compiled android os with the *.img files to an update.zip that can flash the entire device.
halsafar said:
I see this has been asked several times. Yet they all seem related to a small package of APKs or the answer is "unzip someone else's and replace what you need".
I have successfully compiled android for nexus 7 and I am able to use fastboot to flash the device. What I would like to be able to do is create an update.zip that can be flashed.
The situation is we have a few hundred Nexus 7s we need to flash and want to simplify the process as much as possible. If could package an update.zip and flash it via fastboot that would be handy as well. Our current setup is to distribute a zip of the out dir from the android build and use a quick script to automate fastboot flashing.
Even if it doesn't really help our situation. How does one go from a compiled android os with the *.img files to an update.zip that can flash the entire device.
Click to expand...
Click to collapse
Did you build from source? If so just type this command:
Code:
make otapackage
Sent from my HTC PH39100 using Tapatalk 2
Thanks! I tried autocomplete on the source Makefile to see all the possible targets. Well it appears there are so many autocomplete chokes and never returns.
Thanks again.
Good evening,
I've written a module for my smartphone and I need to compose a rom to install on my device...
I followed some tutorials, so now I know how to build an android kernel, obtaining a zImage.
Now, a friend told me that I must make a backup with clockworkmod (done!) and download on my pc, than I can recover the boot.img from there and split them in ramdisk and kernel.
Now I can compile my new kernel and merge it (the obtained zImage?) with the ramdisk to have a new rom to flash on my device... is true?
But I don't know how I can split the boot.img (maybe with dsixda kitchen?) and how to create the new rom. I tryied som weeks ago with a .zip rom and the dsixda kitchen and I split and recomposed a rom, but files contained in the .zip files was different from files that I downloaded by my device...
Someone can explain me the correct way to do this process? Thank you!
Paolo.dev said:
Good evening,
I've written a module for my smartphone and I need to compose a rom to install on my device...
I followed some tutorials, so now I know how to build an android kernel, obtaining a zImage.
Now, a friend told me that I must make a backup with clockworkmod (done!) and download on my pc, than I can recover the boot.img from there and split them in ramdisk and kernel.
Now I can compile my new kernel and merge it (the obtained zImage?) with the ramdisk to have a new rom to flash on my device... is true?
But I don't know how I can split the boot.img (maybe with dsixda kitchen?) and how to create the new rom. I tryied som weeks ago with a .zip rom and the dsixda kitchen and I split and recomposed a rom, but files contained in the .zip files was different from files that I downloaded by my device...
Someone can explain me the correct way to do this process? Thank you!
Click to expand...
Click to collapse
So many u can use
1. http://forum.xda-developers.com/showthread.php?t=1619473
2. http://forum.xda-developers.com/showthread.php?t=2036528
3. http://forum.xda-developers.com/showthread.php?t=1877807
and many more if u search