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

Search This thread

discodave83

Member
Jan 1, 2014
23
0
when i try to repack boot.img i get this-
he following saved configurations were found in your system
-------
aokp-x10
b5512-backup1
cm12
example
vinay
-------

Type the name of the configuration file you want to use and press [Enter] to contiue
cm12
bootimg-configs/cm12: line 2: androidboot.console=ttyHSL0: command not found
==================================
mkbootimg not found on your system
I will compile it for you
please ensure you have gcc installed
Press [Enter] to continue
In file included from rsa.c:28:0:
rsa.h:31:22: fatal error: inttypes.h: No such file or directory
#include <inttypes.h>
^
compilation terminated.
In file included from sha.c:28:0:
sha.h:31:22: fatal error: inttypes.h: No such file or directory
#include <inttypes.h>
^
compilation terminated.
gcc: error: rsa.o: No such file or directory
gcc: error: sha.o: No such file or directory
./edit-kernel/bootimg/build: line 59: ./mkbootimg.Linux.i686: No such file or directory
mv: cannot stat ‘boot.img’: No such file or directory
Find compiled boot.img inside output folder

i am using linux mint i8 tryed install mkboot but not working any idears?
 

Miracle.mirak

New member
Aug 7, 2015
1
0
hello
I am so pleased by how you all try to help each other iam new to this but
i really want to edit my kernel
i tried to use the tool on windows but cygwin got me complicated and i had missing files in the kitchen so i decided to use ubuntu instead but what iam facing now is that i cant even access the tool,after i use the terminal and cd to its location when i hit ./menu i get this messege : bash: ./menu: Permission denied
please help me i really need it
thank you
mirak
 

someone755

Senior Member
Sep 27, 2011
2,048
1,380
Ljubljana
i don't understand why you answer my post...
So weird.

The first four words of my post are literally "just out of curiosity", after which I pose a question regarding your intents. I follow that up with advice as it seemed like you are trying to modify your boot image in strange and undesirable ways.

No need to be a Richard you know.
 

juyel92

Senior Member
Jan 18, 2017
788
598
Assam
When I split the boot.img, I found PARTS and RAMDISK. Inside the ramdisk i found init.rc , but i didn't found anything like initlogo.rle or logo.rle . Can somebody help me out. :(
I am using Asus Zenfone 5 device.
 

bencetari

Senior Member
Feb 3, 2015
65
14
hello
I am so pleased by how you all try to help each other iam new to this but
i really want to edit my kernel
i tried to use the tool on windows but cygwin got me complicated and i had missing files in the kitchen so i decided to use ubuntu instead but what iam facing now is that i cant even access the tool,after i use the terminal and cd to its location when i hit ./menu i get this messege : bash: ./menu: Permission denied
please help me i really need it
thank you
mirak

Chown help, use chown to take ownership of the executable then chmod +X menu or .menu
 

Gantori

Member
Apr 11, 2022
14
0
I have pulled what I believe to be the vendor/manufacturer logo with the following pull

adb -s 192.168.1.120:5555 pull ./dev/block/logo

1650439360202.png


however the ~8MB file logo on my PC does NOT appear to be a .ppm nor .rle I have tried the above kernel-tools but the rle2png.bat hangs after creating a rather 64MB+ large logo.raw file.

I have also tried several converters online, also gimp, photoshop all failed to load.
Perhaps /dev/block/logo is some mounted filesystem? not a bitmap?

Let me know if you can help in anyway I would like to replace this "TranSpeed" logo image before the android bootanimation on a chinese TV box

Thank you.
 

Gantori

Member
Apr 11, 2022
14
0
adb -s 192.168.1.120:5555 root
adb -s 192.168.1.120:5555 pull ./dev/block/logo logo

After doing over WiFi the above commands, on a chinese (rooted) TV box, I am able to obtain a "logo" file on the PC, about 8MB in size.
However, running kitchen tools (rle2png logo) hangs and can produce larger than 500MB .RAW file I had toI break with Ctrl-C, the batch file rle2png.bat never got to step#2

I have tried several online tools to convert RLE to some bitmap format but they all fail.
I am not doubting if the pulled "logo" file is actually a .RLE format

Please provide any suggestions on how I can convert to file to some viewable format.
Thank you.

1651326095259.png
 

Top Liked Posts

  • There are no posts matching your filters.
  • 180
    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 :p )

    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 !!!!

    [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)
    16
    Some of the posts in this thread are complete PIGS ARSE.

    I don't have time for a full reply at the moment, but I've been around XDA long enough to know that kitchens are helpful and do promote learning and development.

    Back in the WM days of XDA, only a handful of devs (Tofclock, Helmi, Buzz etc...) were capable of building ROMs rom scratch using hex editors, playing with XIP files and dlls.

    WM5/6 Kitchens were being used when some of you were still at school smoking behind the bike sheds. Without them, XDA would almost certainly have never been as popular in the WM days, and the number of "great" ROMs would have been far less.

    When the first kitchen was released to us, this started a whole new wave of ROM creation. Sure, it made thigns easier, but a lot of people learned a LOT about WM development at the same time. I know I did.

    They're a learning tool if used in that manner. Fair enough they can be abused by some who "cook" something and call themselves a dev, but there are others who will use it and learn from it. I know I learned a LOT about WM drivers, registry etc, by using a kitchen.

    I don't give a flying f*ck if some of you can code a complete kernel in notepad. The size of your e-peen means nothing to me.

    XDA is about learning as much as anything, and if a kitchen helps people learn SOMETHING about kernels then I think that has to be a good thing.
    12
    Some of the posts in this thread are complete PIGS ARSE.

    I don't have time for a full reply at the moment, but I've been around XDA long enough to know that kitchens are helpful and do promote learning and development.

    Back in the WM days of XDA, only a handful of devs (Tofclock, Helmi, Buzz etc...) were capable of building ROMs rom scratch using hex editors, playing with XIP files and dlls.

    WM5/6 Kitchens were being used when some of you were still at school smoking behind the bike sheds. Without them, XDA would almost certainly have never been as popular in the WM days, and the number of "great" ROMs would have been far less.

    When the first kitchen was released to us, this started a whole new wave of ROM creation. Sure, it made thigns easier, but a lot of people learned a LOT about WM development at the same time. I know I did.

    They're a learning tool if used in that manner. Fair enough they can be abused by some who "cook" something and call themselves a dev, but there are others who will use it and learn from it. I know I learned a LOT about WM drivers, registry etc, by using a kitchen.

    I don't give a flying f*ck if some of you can code a complete kernel in notepad. The size of your e-peen means nothing to me.

    XDA is about learning as much as anything, and if a kitchen helps people learn SOMETHING about kernels then I think that has to be a good thing.

    I have to agree. While we will never be rid of the winzip rom makers tools like this help give people a place to start and to decide if they want to dig deeper into it. How can I say this you ask, it is because I am one of them. When I first started on XDA I knew next to nothing about development but with some of the great kitchens that were available I started to learn. Then When I needed to make deeper changes I had to dig in more and learn.

    Now on Android. I started out learning by unzipping roms and looking inside, Then came apktool and learning to theme to fix issues that others made in themes, then I moved up to a kitchen. Now I have taken the dive and to working on Source code. Which includes making my PC dual boot a Linux distro (which alo of people are not able.willing to do). None of which would have happened had I not started with tools just like this one.

    Now I see people going off at the mouth at each other. Some of you seem to think you are a coding wiz. Well let me tell you what. Your attitude is just the kind that we dont need. Personally I dont care what your title says. Get over yourselves and get back to what XDA is all about. Sharing and learning. If your not part of the solution then you are part of the problem. I would rather the tool be used by 100 people if it even helps 1 on the path to learning even more.
    8
    What I see when I see threads like this:

    Someone tries to make a helpful tool to generate interest in kernel development.

    A bunch of higher ups railroad them until they go away.

    No one learns anything and no one gets interested in kernel development.

    How come the people who say this isn't real development never reach out and try to teach people or generate interest? Frankly, if putting out a kitchen gets even one aspiring dev (aspiring dev is NOT a real dev, but one who is aspiring to be a real dev) interested enough to learn the "right way"...then the tool served it's purpose. If it's such a sin to post tools like this to get people interested in development, then why not write up some tutorials and show them how it's done? It's like saying "You can't shoot that gun, your worthless for even trying and you're what's wrong with the world because you can't shoot that gun"...and then give them zero pointers on learning how to shoot the gun.

    Part of the solution? Nah, that's being part of the problem. How are people supposed to get interested in real development when they know they'll be sharing a title with people who do nothing but tell other people they're doing it wrong? Additionally, how are they supposed to learn how to do it right when the people who know how to do it not only don't help, but squash every attempt of someone else to help?

    smh
    7
    for windows needs cygwin buddy

    and you need perl, python, cpio, gzip (or gunzip) installed inside cygwin :)