1. Download our Official Android App: Forums for Android!

Root [HOW TO] Build kernel (zImage) into boot.img

Discussion in 'Android Devices' started by Rxpert83, Jan 30, 2014.

  1. Rxpert83

    Rxpert83 Dr. Feelgood
    Thread Starter
    Rank:
     #12
    Points:
    1,953
    Posts:
    17,922
    Joined:
    Aug 30, 2011

    Aug 30, 2011
    17,922
    13,145
    1,953
    Male
    Graduate Student
    MN
    Hey Everyone!

    I've gotten a few PM's from members trying to follow this guide and are S-ON about how to fastboot flash a kernel when it isn't packaged into a boot.img for you.


    A good example of this is the arc reactor kernel:
    [Kernel][JB][SENSE] Arc-Reactor [3.4.40][S2W][linaro] [-O3][WIP] - xda-developers

    [​IMG]

    When you download and extract the kernel you'll notice there is no boot.img! However, the kernel is located inside of /kernel. The zImage is the output of the compiler when you build a kernel from source.

    In order to flash that zImage, you'll need to incorporate it into the boot.img along with the proper ramdisk.


    Step One: Download your files
    Get the Android Image Kitchen:
    [DEV][TOOL] Android Image Kitchen - Unpack/Repack Kernel/Recovery + ramdisk [Win32] - xda-developers

    Arc Reactor Kernel (MikMik):
    [Kernel][JB][SENSE] Arc-Reactor [3.4.40][S2W][linaro] [-O3][WIP] - theMikMik
    Dev-Host:
    Dev-Host - The Ultimate Free File Hosting / File Sharing Service

    Stock boot.img for your ROM


    Step 2: Extract the 2 zip files
    Its also a good idea to place them somewhere convenient (I just do the desktop)

    Step 3: Move the stock boot.img into the folder for the Android Image Kitchen
    [​IMG]

    Step 4: Drag the boot.img onto unpackimg.bat
    This unpackages the boot.img into the split_img and ramdisk folders.
    [​IMG]

    Step 5:Inside of the split_img folder, youll see boot.img-zImage...remove or delete it from the folder.
    [​IMG]

    Step 6: Place your zImage containing the arc reactor kernel (or whatever kernel you're using) into the folder. You may need to rename it to boot.img-zImage

    Step 7: Go back one level to the android kitchen image folder, and click on the repackimg.bat file. This will rebuild your boot.img while incorporating the new zImage. Your boot image will be named image-new.img
    [​IMG]

    You can now fastboot flash this using the command
    Code (Text):
    1. fastboot flash boot image-new.img
    just like before!
     

    Attached Files:


    Advertisement

  2. ocnbrze

    ocnbrze DON'T PANIC!!!!!!!!!
    Rank:
    None
    Points:
    1,923
    Posts:
    23,595
    Joined:
    May 13, 2010

    May 13, 2010
    23,595
    14,436
    1,923
    Male
    being a flashaholic sponsor, helping others gettin
    los angeles
    Thanx rxpert.

    So this is for s-on folks?
     
  3. Rxpert83

    Rxpert83 Dr. Feelgood
    Thread Starter
    Rank:
     #12
    Points:
    1,953
    Posts:
    17,922
    Joined:
    Aug 30, 2011

    Aug 30, 2011
    17,922
    13,145
    1,953
    Male
    Graduate Student
    MN
    That particular example is, as the updater script from the kernels zip file can't decompile and recompile the boot.IMG on an s-on device. If the user is s-off they can flash that kernel as is.

    Other than that, can be applicable to anyone wanting to decompile/recompile a boot.IMG to change things in the ramdisk or as the last step to compiling a kernel from source (compiling a kernel from source gives you the zImage, not the boot.img)
     
    ocnbrze likes this.
  4. ocnbrze

    ocnbrze DON'T PANIC!!!!!!!!!
    Rank:
    None
    Points:
    1,923
    Posts:
    23,595
    Joined:
    May 13, 2010

    May 13, 2010
    23,595
    14,436
    1,923
    Male
    being a flashaholic sponsor, helping others gettin
    los angeles
    ahhhh got it.....pretty cool
     
  5. Rush

    Rush {<>}~{<>}
    Rank:
    None
    Points:
    1,143
    Posts:
    18,742
    Joined:
    Jan 31, 2011

    Jan 31, 2011
    18,742
    3,171
    1,143
    Male
    Entrepreneur / Business Owner - Freelance Writer
    Loganville, GA
    Pretty cool, Rx. ;)

    Now ...can you tell me why my Evo 4g lte just won't get s-off?

    Anyway, I hope this tutorial will suffice many concerned questions.
     
  6. Rxpert83

    Rxpert83 Dr. Feelgood
    Thread Starter
    Rank:
     #12
    Points:
    1,953
    Posts:
    17,922
    Joined:
    Aug 30, 2011

    Aug 30, 2011
    17,922
    13,145
    1,953
    Male
    Graduate Student
    MN
    That I can't answer. I havent been on the LTEvo in nearly a year and aren't aware of the nuances of s-off.

    I just made a thread about a brand new S-OFF method. Perhaps that will work
     
    Rush and ocnbrze like this.
  7. Rush

    Rush {<>}~{<>}
    Rank:
    None
    Points:
    1,143
    Posts:
    18,742
    Joined:
    Jan 31, 2011

    Jan 31, 2011
    18,742
    3,171
    1,143
    Male
    Entrepreneur / Business Owner - Freelance Writer
    Loganville, GA
    I'm 85% certain that the problem with this phone not being able to get s-off is software-related.

    Yeah, as for that new method of getting s-off &#8212; I'll try it out on Monday evening.

    Thanks again. ;)
     

Share This Page

Loading...