yashsingh1/xdaforums huggingface dataset:
[Android] championswimmer:
this kitchen cannot change the source of kernel

for overclock you need to compile kernel from source.

this kitchen is only for packaging/extracting of kernel binaries
[Android] Nos_20:
Change Recovery.

By learning how to use the Kernel kitchen, would I be able to change the recovery on my device from CWM to TWRP?

Sorry for the noob questions but I know very little about this but am willing to learn. Is there a starters guide for changing the recovery available to help?

Thanks for any input guys!
[Android] Anthrax:
Does this work with 2012 xperias????

coz i m getting error while extrating kernel.elf file......

the kernel and ram directories are created but are empty....... :(
[Android] championswimmer:
you sure it is an elf file ???
[Android] Anthrax:
yes it was an elf file.......

but was extracted using ftfextractor in windows.......

SOLVED:

In Ubuntu i directy used stock ftf file to get kernel.sin file and the extract contents from it......... :)
[Android] ciscogee:
I like the fact that you shared how you got the problem solved
[Android] Anthrax:
That's what xda is all about..... :D
[Android] colonel_lp:
After just getting a Sony Lt25i Im eager to try this tool, but:

I'm on OS X and have searched around to try and get around 7-zip (7z) not being available for mac.. as far as I can see everything else works.. Tried installing P7zip and changing script references from 7z to 7za, but 7za cant extract the files. Am I just banging my head against a brick wall?

Any ideas?

EDIT: No worries.. Extracting on an old windows laptop and doing the rest via mac,, :)
[Android] GEKTHEBOSS:
R: [KITCHEN]Android Kernel Kitchen 0.3.1 (Linux / Windows)

Pyton is needed for work with xperia 2012 boot.img and ramdisk on wxp?
[Android] Alroid:
Hi, I extrected an kenel.elf and now that i want to repack it, kitchen asked me th CMDline.txt but there is not such file in extracted Dir.

Thanks alot
[Android] championswimmer:
if it was not there then do not provide it
[Android] Alroid:
and how can I repack it? is this kind of protection by developer? I just want to change Boot logo.thanks
[Android] arif41:
I've got error "jar not installed" and that make me want to ask .

Where's java required ? On cygwin or windows ?

Sent from my Xperia Mini
[Android] Toledo_JAB:
Read here for requirements

https://github.com/championswimmer/kernel-tools#android-kernel-kitchen

From Jaramie's LT28at

2012Xperia SOFT-BRICK Recovery Thread
[Android] championswimmer:
a lot of developers have used this and are using this as I write this and I am thankful to all for the support

I want to mention that I have been having really little time to keep this maintained (because of decreasing motivation because I work with AOSP/AOKP/CM building these days, manually decompiling/compilng kernel is seldom needed)

I just wished if more of you guys from the community could help in keeping this maintained

(especially Xperia devs ;) )

like for example the elf packaging commands need to be updated for each family of devices and for each firmware revision as the kernel/ramdisk addresses changes

similarly the mkbootimg sources are also being updated every now and then...

and there are always corner cases where some thing or the other might not work with the kitchen and that functionality has to be updated/upgraded/added

If more eyes and hands were at work, maintaining this would be easier...

so thanks in advance to anyone who might contribute.

(you just have to fork and make changes and send pull requests on github, if you had the question in mind "How can I help ?")
[Android] capsule46:
i'm just new into this. is it can be used to unpack recovery.img?

I got this message when i use it " Android magic not found"

But i successfully separate kernel and ramdisk when i used dsixda kitchen
[Android] abcdjdj:
open up your terminal and type this - sudo apt-get install imagemagick

It will ask you for your password. Enter it ( nothing will appear on the screen when you type) and wait until it downloads.:D

Hey championswimmer, any chance for that tutorial on replacing CWM in the ramdisk? Thanks for your tool.
[Android] psxpetey:
Is there a way to ad 2011 device like Xperia play I want to make a kernel.sin
[Android] championswimmer:
provision is already there.
[Android] psxpetey:
Why does it say 2010 devices only?
[Android] championswimmer:
btw why do you need kernel.sin ?

make boot.img instead :o
[Android] psxpetey:
Bootloader unlock allowed no s1 tool unlock I cant use boot.img cause no fastboot acess
[Android] riskey95:
can you make kitchen which can extract ramdisk that compressed with lzma format.??
[Android] championswimmer:
DIY
[Android] LaShto34:
I finally managed to extract and repack kernels that have ramdisks compressed with lzma format. I'm sorry for the real developer for modifying his work, but I really needed that. So, everybody should understand that all credits has to go to the original developer. I only opened some files, and changed the "gzip -c" or "gunzip -c" to "lzma -dc".
[Android] LaShto34:
Deleted
[Android] Des-franco:
Thanks for your awesome job :good:
[Android] GEKTHEBOSS:
Can i unpack/repack an kernel.elf?
[Android] championswimmer:
yes
[Android] atrix4g18:
This helped me so much.

For whatever reason the manual method to make the boot.img (mkbootimg) wouldn't work, but this worked perfectly.
[Android] Agoraphobia:
Where can i find the tutorial on how to use this Kitchen? TIA
[Android] championswimmer:
the readme on the github link
[Android] Luiggidj:
Thanks for your job! !!!

Enviado desde mi GT-I9100 usando Tapatalk 2
[Android] Agoraphobia:
Oww my bad .. I have not noticed the "DOWNLOAD AND USAGE", thanks :)

I install cygwin successfully but i have an empty field which 7z binary.. what will i do?

sorry for my bad english
[Android] championswimmer:
get p7zip or whatever 7zip software is available on cygwin (can't rattle the name of my head, but there is a GNU alternative of 7z)
[Android] Agoraphobia:
ok i'll look for it later thanks man :)

i have one question i've download the Source code of LGE - PECAN (p350)

and doesn't know how to compile the kernel ... :(

i'm so noob
[Android] atrix4g18:
http://xdaforums.com/showthread.php?t=2152819

Have fun.
[Android] Agoraphobia:
thanks bud. but the requirements of the OS is Ubuntu :(

is there any Tutorial that requires windows?
[Android] Toledo_JAB:
If you are trying to compile an android/linux kernel, you need to be using some form of linux. Ubuntu is probably the most windows like linux distribution available.

You could try using cygwin or a virtual machine install of ubuntu inside a working windows or boot ubuntu from a sub stick.

If you try with VM thru Windows it will be slower than just straight linux.

I use a dual booting ubuntu/WinXP for android stuff. You may find some steps may need Windows and some need linux

Champ has suggested not to use the wubi version of dual boot, as it gets slower with age.

From my Xperia LT28at ION :D
[Android] atrix4g18:
Oh, I haven't found such a tutorial.

Installing Ubuntu with WUBI is very simple and you can uninstall in Windows.
[Android] Toledo_JAB:
This Champs guide for compiling the x10 kernel.

I know it's for the wrong phone but it gives good information. In one of his posts he talks about dual booting.

It's what I used to successfully compile my first kernel. And if I can do it, you will be able also ;)

The corrected link >>>HERE<<<

From my Xperia LT28at ION :D
[Android] Agoraphobia:
Ahh i see ok thanks for the tip bro :)

Ok thanks! but ToledoJab and Champ said don't use WUBI on windows..

I think you've posted a wrong thread hehe
[Android] DirtyDroidX:
This is great for quickly unpacking kernels and efficient. Thanks for taking the time for this.

:good:
[Android] Toledo_JAB:
Sorry you were right.

I have corrected the other post and......

This should be the correct link

And I personally have never used wubi.

I have enough disk space to have a dedicated ubuntu android build partition.

I used a live ubuntu usb memory stick to see if I like it.

Now when my PC boots up it goes to a GRUB screen that allows me to select windows, windows recovery partion or ubuntu to start from.

It also has a default selection that is triggered by a count down timer (8 seconds for me)

Some users cannot change the partitions of the hard drive, like its not their PC or whatever.

If you don't or can't use dual boot then wubi is your only option. And you can always change later.

What ever way you go doesn't matter just start going, LINUX knowledge is ANDROID power ;)

Have fun
[Android] Agoraphobia:
Ok i will try if my PC supports USB Booting ..

Thank you very much for guiding me :)
[Android] Rushing:
well some of it worked for me thanks
[Android] roshan2989:
is this kitchen for x10 kernel or other devices...?im using Galaxy S19000...
[Android] atrix4g18:
All devices.

I used the unpack and repack kernel function for my Atrix 4G.
[Android] niaboc79:
Hi,

I Need some help ;)

I tried 2 things,

first extract boot.img

Error is no android magic number, any solution?

So I have started from kernel.elf

I can extract all but no cmdline.txt to rebuild...

Working with JB kernel of Xperia S.

Thanks
[Android] niaboc79:
Can I use cmdline.txt found in proc folder of phone using same kernel?

Envoyé depuis mon C6603 avec Tapatalk
[Android] jjwrongjj:
OS: windows 8 64bit

Installed 7zip

PATH to .bash_profile

PATH=/cygdrive/c/Program\ Files\ \(x86\)/7-Zip:${PATH}

but got error

:rolleyes:
[Android] CNexus:
Yeah, you didn't do the path right. You need to install 7zip through cygwin, not windows.
[Android] khojim:
is this tools support to unpack and repack kernel compressed with lzo and lz4 like nAa kernel for xperia phones? if yes, how to do that? and if no, can someone help me? thank you.
[Android] someone755:
[MENTION=4645794]CNexus[/MENTION]

Well how do I do that? I can't do apt-get in cygwin... ;-; Been fooling around with this for the last 30 hours...
[Android] CNexus:
When you're installing cygwin, it lets you choose what tools to install...tyipe in p7zip and make sure that that's selected as one of the packages/tools it's installing
[Android] someone755:
I already did that, but it still says that nor 7zip or python are installed...

God, I hate this Cygwin thing...
[Android] CNexus:
That's why you ditch Windows :D

Anyway, is the "unzip" command available? That should work the same way.

unzip archiveHere.zip -d outputDirectory
[Android] someone755:
Okay, nevermind that, I extracted the things with the normal CMD. :P

Not all MS software is bad ;)

Now my only question is why Python won't work... I selected it and installed it, what could be the cause?

Maybe another complete reinstall of Cygwin is in order?
[Android] CNexus:
Lol maybe. I don't know man, I've never had issues when installing tools through Cygwin
[Android] someone755:
I often do.

So I always have to install the thing again if I forget something...

I think I'll rather wait for that Linux ISO to download... -.-'
[Android] rahulks:
7z binaries in cygwin

You can install 7z binaries in cygwin with windows installation too..

just install 7z in windows and type the command in cygwin
[Android] muskanme:
Help

Sir,

I am an end user and using Karbonn Titanium S5. I would like to highly request you kindly to develop a kernel that supports OTG means enable the user to use Pen Drive and/or other flash drives.

Please inform me with further notification/update on my email ID i.e.

akramul25@yahoo.com
[Android] rktcool:
If you are not a big fan of Cygwin, you should consider running a light linux distro such as lubuntu or kubuntu on a virtual box...

:)
[Android] ehussam:
xperia z kernel compiling

thanks for this wonderful tool

i have been stuck for over 3 days with my xperia z kernel extraction

i downloaded the stock ftf file, extracted kernel.sin and converted it using flashtools to get kernel.elf

i used your tool to get ramdisk and zimage, now i want to compile them to get boot.img

NO LUCK AT ALL!!! its asking for configuration file, for base address...etc

i wasnt able to get it during the extraction process at all

anyone, help, what am i missing???

im a noob here, but i have the will and brains to get to it
[Android] Rapier-:
Hi, I have some problem here.

When I extract boot.img I got messages like this:

And I got this:

ramdisk-contents folder is empty.

After I edit the ramdisk I build and flash boot.img into my phone but after pressing the power button nothing happened more than 1 vibration. I even tried extract and build boot.img without edit, it's the same so I guess the problem come from extracting boot.img since it's the only place that show error. What should I do?
[Android] LioN-HearT:
hello guys!! sorry for a noobish like question but can I put a custom/newest version of busybox on a kernel that I'd like to put?
[Android] CNexus:
Busybox goes into the system partition, it's not part of the kernel.

Sent from my S3 on Sense 5 (you jelly?)
[Android] Rapier-:
Weird. Then would you mind taking a look at my problem?

http://xdaforums.com/showthread.php?t=2369806

Here, Busybox ervert to the old one evry reboot. Does it has something to do with autoroot? I'm trying to remove it. But failed at recreate boot.img as I state above post.
[Android] CNexus:
Use my tools here and do it manually. I never trust "kitchens" for this reason.

http://xdaforums.com/showthread.php?t=2319018

Put all of those (the scripts from the latest zip) into your ~/bin folder.

Sent from my buttered S3
[Android] badhon_raj:
Is it possible to create kernel.elf instead of boot.img with your tool?

I'm stuck with this. tried through kitchen and mkelf.py

Couldn't succeed to boot my XP. :(
[Android] CNexus:
Kernel.elf? For what device? I know of an elftool that may be able to help you

Sent from my buttered S3
[Android] badhon_raj:
xperia P.

it looks like finally I've managed to brick my phone.

no sign of life! no charging LED no fastboot :crying:

What do I do now?
[Android] CNexus:
Pull out the battery and put it back in.

Also, flashing the wrong kernel will not brick your device unless you flash it to the wrong partition.

Try booting into recovery.
[Android] badhon_raj:
ok got it. phone was actually turned on. for that I couldn't go into recovery mode/flash mode.

power button + volume up for 5 second made it forced shut down. now it is back for flashing again. :D

I became seriously afraid.

that elftool you were talking about, will that work with xperia P?

can you please tell me what actually makes a hard brick? so that I can be careful next time. :p

thank you for your help. :)
[Android] CNexus:
A hard brick happens when you overwrite your bootloader...even if you flash another devices files, as long as it's not to your bootloader, you will be able to recover.

Give me a sec so I can find it.

Sent from my buttered S3
[Android] badhon_raj:
forgive my noobness :p, which files/area are bootloader? and how can I overwrite them?

I thought kernel.elf and boot.img are same, they contains the files for bootloader.
[Android] CNexus:
No, they contain the files for the boot PARTITION not for the bootloader. The bootloader is what starts up even before the kernel is loaded from the boot partition.
[Android] badhon_raj:
how do I overwrite bootloader?
[Android] CNexus:
You write junk to the bootloader partition.

Sent from my buttered S3
[Android] badhon_raj:
:p

You have been very helpful for me. :)

Anyway, is this the elftool you were talking talking about?

http://xdaforums.com/showthread.php?t=2146022

I can't run it on ubuntu 32 bit.

it shows bash: ./elftool: cannot execute binary file

Is it for 64bit only?
[Android] CNexus:
Yup, that's it

Sent from my buttered S3
[Android] BlackBXR:
add support xperia j please :D
[Android] Sami Kabir:
Can this program/tool help me in unpacking a stock kernel.. the problem is that the kernel is a "kernel.bin.md5" file not a "boot.img" file... its because my phone supports kernels only in ".bin" extension not ".img"

(hope you understood what I meant)
[Android] ^I'm_With_Stupid:
This tool is great, but for some weird reason in Ubuntu x64 I can't extract boot.img because terminal keeps giving me this error: It also happens when I try to extract boot.img manually.

./edit-kernel/bootimg/unpack: line 33: $BOOT_CONFIG_NAME.cfg: ambiguous redirect
./edit-kernel/bootimg/unpack: line 34: $BOOT_CONFIG_NAME.cfg: ambiguous redirect
cp: target ‘play’ is not a directory
Page size: 131072 (0x00020000)
Kernel size: 3394316 (0x0033cb0c)
Ramdisk size: 4107987 (0x003eaed3)
Second size: 0 (0x00000000)
Board name:
Command line:
Writing boot.img-kernel ... complete.
Writing boot.img-ramdisk.gz ... complete.

gzip: ../boot.img-ramdisk.gz: not in gzip format
cpio: premature end of archive
Find zImage, initrd.img, xperia play.cfg and ramdisk-contents inside 'bootimg-contents' in output folder

edit: never mind, found a relevant thread
[Android] clustrion:
I am using MMX A110

Mod Edit: no need to quote entire OP.

I am new for that XDA but not for Development. Can you please tell me what are the changes will be for MMX A110. Please provide me if there is any tutorial for that.
[Android] crzykiller:
I get this error when trying to repack a boot.img

./edit-kernel/bootimg/build: line 37: .: bootimg-configs/: is a directory

usage: mkbootimg

--kernel <filename>

--ramdisk <filename>

[ --second <2ndbootloader-filename> ]

[ --cmdline <kernel-commandline> ]

[ --board <boardname> ]

[ --base <address> ]

[ --pagesize <pagesize> ]

[ --ramdiskaddr <address> ]

-o|--output <filename>

mv: cannot stat `boot.img': No such file or directory

Find compiled boot.img inside output folder

i cant find the Boot.img file anywhere... everything else works with the toold but that :(
[Android] kenkitt:
Great Work

:good: Just what I was looking for
[Android] NewBieSS:
I just extracted my kernel, all things ok but sys folder is empty :eek:
[Android] someone755:
[MENTION=4855984]crzykiller[/MENTION]: Check whether you put your original image in the specified directory.

Next time, read what the error says and try decipher it, people aren't just gonna pop up and help you figure out (or rather tell you) the obvious.
[Android] lozohcum:
It doesn't work for J/Miro/Tipo kernels. Still have to repack them manually
[Android] gavster26:
linux problem

[MENTION=4308696]championswimmer[/MENTION] hi i am trying to run this on ubuntu 12.04 64bit but when i enter an option the tool just flashes straight back to the first screen can someone tell me whats wrong.
[Android] someone755:
[MENTION=895049]Lozo[/MENTION]chum: Yeah, Sony kernels are weird, especially since most have the recovery stored in the FOTAkernel partition. (Some don't, those that do are not compatible with this. Some that don't also aren't.) :P
[Android] championswimmer:
if you can fix it you are always welcome to make a pull request on github. it's open source for some reason :- contributions
[Android] lozohcum:
I don't rly know how to send updates to someone's repo but I can write you PM how to repack kernels for J/Miro/Tipo and give links for proper tools
[Android] someone755:
Well it's probably not that big of a deal to have it fixed, but I'm too lazy and actually prefer messing about with the terminal commands :P

Just make a new menu in the kitchen for Sony kernels and have them repacked. But the issue will arise with repacking the kernel, since every Sony phone has different commands for different Android versions.

So you'd need letama's kernel unpack tools and mkelf.py, and that's about it. Oh, and cpio, of course, for the ramdisk pack and unpack...
[Android] championswimmer:
i have made a menu for that purpose

the 2011 devices and 2012 devices need different commands and the script takes care of them.

also it can save the parameters from boot.img when spliting it so it can reuse them while rebuildin it
[Android] gavster26:
Hi does anyone know what my problem is please i posted 1 page back :(

Edit: all fixed :)
[Android] tOrNadO™:
Hi.. I am trying to port a Touchwiz ROM to my Sony Xperia S.. Used CM based 4.1 ROM as Base and SGS3's Omega ROM as Port.. Replaced all the files that i needed to.. Now i am having troubles decompiling the kernels of both.. I happened to see boot.img only in CM ROM of Sony.. But there is no boot.img for Touchwiz ROM.. Atleast i tried to decompile boot.img of CM ROM using this kitchen which resulted in not finding any of the files necessary.. Pls see the SS attached.. Tried both methods.. Same thing occurs.. Can anybody help me with this?? :confused:
[Android] someone755:
The Xperia devices have weird kernels, mainly because we store recoveries in our ramdisk, rather than on a dedicated partition.

See this thread for taking apart Sony kernels: http://xdaforums.com/showthread.php?t=2418893
[Android] icoolguy1995:
In your kitchen Xperia E dual is not listed !
[Android] someone755:
Then either add it yourself or un- and re-pack the kernel manually.
[Android] icoolguy1995:
How to add?

I tried repacking kernel myself and ended up with blank screen
[Android] someone755:
Try looking here, it might help: http://xdaforums.com/showthread.php?t=2418893

Though I'm not sure about how your phone handles the kernel and ramdisk...
[Android] gregbradley:
Any chance of an update or tutorial to use this on Xperia Z1 14.2.A.0.290 in order to get ro.secure=0
[Android] championswimmer:
bootbundles, dtb images, whoa whoa whoa..... i just got scared looking at the Snapdragon 800 kernels.

need time to wrap my head around this :D
[Android] gregbradley:
I know, but I use this a lot.. What device do you have currently.. Would be nice to see you back at the Z1 forum
[Android] k2spy04:
:good:
[Android] championswimmer:
what my signature says ;)

have them all right now.

and since college is off, and I am at home till 15th jan, i have ALL those devices right under my nose

point is, while i may have some scripts that can edit snapdragon800 kernel from a build tree (aosp/cm/aokp), but editing stock kernel's gonna be dicey :P

__EDIT__

ok you are on a mobile

her you go
[Android] gregbradley:
That's a very nice collection
[Android] afigienas:
would be great if author create package for windows. the whole one not source code. We dont use linux and linux is not for desktop users. so it's normal that half of us don't even try this tool because of linux hassle.
[Android] zelendel:
This is very wrong. Anyone that deals in android development uses linux. Linux is a perfect Desktop OS.
[Android] Zeljko1234:
It's hard to say that is perfect desktop OS, nothing is really perfect. For Android development it's enough to install Linux in free VirtualBox. Of course, compiling will be much slower but could be done. It's much more convenient for Windows users than dual boot. Also if something goes wrong in VB, will not affect main system and it's easy to recovery.

I have both, Linux laptop and Windows desktop with several VBs.
[Android] zelendel:
OK maybe perfect was the wrong wording. I used to a windows user as well but after needing to be in Linux mostly for android my windows is now used for games and that's about it.

Bat cave One
[Android] championswimmer:
Well all said and done, this tool does support running on Windows for a lot of functions. (Yes I admit, all functions are not available on windows), but then again, something as simple as

gcc source.c -o program
program --kernel=zimage --ramdisk=initrd.img --output=boot.img

is not so easy to implement on Windows
[Android] __duke__:
Hello,

first of all. Thank you for this great tool!

I'am having troubles booting an created boot.img with fastboot on my tipo dual.

Therefore I now just try to extract an tft to zImage and ramdisk.cpio.gz

2 -> 1

and then repack them to an boot.img

1 -> 3 -> aokp-x10

but when i try to boot i got:

C:\Users\User\Desktop>fastboot boot boot.img

downloading 'boot.img'...

(bootloader) USB download speed was 1274368kB/s

OKAY [ 0.287s]

booting...

FAILED (remote: Wrong range:0x20008000-0x203d3ae7. Ok:0x00200000 - 0x03dfff)

finished. total time: 0.287s

any ideas on that?

thanks in advance
[Android] someone755:
Doesn't the Tipo use the same kernel mechanics as some older phones? Mkelf.py and all that...?