Idetifying Kernel in Boot.img - Android Q&A, Help & Troubleshooting

I'm new to android development
I was told I needed to swap out the kernel in the boot.img to a recovery.img
I used Android Image Kitchen to unpack both images.
I see 2 folders called ramdisk and split_img
Which one is the kernel?

Related

[Q]Kernal flash via Fastboot HBOOT1.5

I need to either convert a flashable .zip to a boot.img or find out how to flash a .zip kernel from fastboot I kinda softbricked my phone
timinator94 said:
I need to either convert a flashable .zip to a boot.img or find out how to flash a .zip kernel from fastboot I kinda softbricked my phone
Click to expand...
Click to collapse
kernel flashing has essentially three parts on the HTC EVO 3D.
1) the kernel binary, zImage file
2) the ramdisk
3) the kernel modules/system files (custom kernels with etc.d, etc.)
custom and stock kernels are distributing in either one of two packages:
1) boot.img = zImage + ramdisk
2) anykernel = zImage + files to extract current ramdisk and merge with zImage before flashing (dump_image, unpackbootimg, createnewbootimg, etc)
flashing a kernel through fastboot will work to load the kernel and ramdisk but will not allow the system files (modules for wifi and wimax, at minimum) to be loaded. you will have to load these files after you get the device booted.
a flashable .zip for kernels will either containg the actual boot.img as mentioned above in #1 or it will contain the zImage, mentioned above in #2.
if the flashable .zip is distributed as method #2 - anykernel - you can merge a ramdisk manually to create the boot.img. googling the terms, htc boot.img ramdisk should give a few guides on the process.
in my opinion, best method if you have "soft bricked", is to reload the boot/system partitions through a custom recovery.
hope that helps!
joeykrim said:
kernel flashing has essentially three parts on the HTC EVO 3D.
1) the kernel binary, zImage file
2) the ramdisk
3) the kernel modules/system files (custom kernels with etc.d, etc.)
custom and stock kernels are distributing in either one of two packages:
1) boot.img = zImage + ramdisk
2) anykernel = zImage + files to extract current ramdisk and merge with zImage before flashing (dump_image, unpackbootimg, createnewbootimg, etc)
flashing a kernel through fastboot will work to load the kernel and ramdisk but will not allow the system files (modules for wifi and wimax, at minimum) to be loaded. you will have to load these files after you get the device booted.
a flashable .zip for kernels will either containg the actual boot.img as mentioned above in #1 or it will contain the zImage, mentioned above in #2.
if the flashable .zip is distributed as method #2 - anykernel - you can merge a ramdisk manually to create the boot.img. googling the terms, htc boot.img ramdisk should give a few guides on the process.
in my opinion, best method if you have "soft bricked", is to reload the boot/system partitions through a custom recovery.
hope that helps!
Click to expand...
Click to collapse
Its number 2 LOL anyway to flash or convert it to a flashable .img?
timinator94 said:
Its number 2 LOL anyway to flash or convert it to a flashable .img?
Click to expand...
Click to collapse
joeykrim said:
if the flashable .zip is distributed as method #2 - anykernel - you can merge a ramdisk manually to create the boot.img. googling the terms, htc boot.img ramdisk should give a few guides on the process.
hope that helps!
Click to expand...
Click to collapse
yes, there is definitely a way. answered that in my previous post. added a link to a helpful guide from the google search i suggested.
HOWTO: Unpack, Edit, and Re-Pack Boot Images
also googling android boot.img ramdisk can be a helpful search. there are tons of guides out there.
sorry if the details i give are a bit too deep. after reading a guide or two, you might want to revisit my previous post as it gives the specific details to the boot.img structure and which files are needed. let us know if you have any specific questions to the process and which guide is most helpful!
on another note regarding general approach, personally after a bad flash, the simpliest way to recover thru flashing a kernel via fastboot is to flash the stock kernel, not a custom kernel distributed via the anykernel zImage style. once i'm back up and running, then i'd tackle flashing custom kernels, merging/splitting ramdisk with boot.img and zImage, etc.
good luck!
Tried the guide but googles download for the mkbootimg is down any mirrors?

[Q] Rockchip kernel image file - how to build?

I have a working Kernel - http://forum.xda-developers.com/attachment.php?attachmentid=1743802&d=1361298599
but I need prepare a new one - compilation it is no problem, but how to prepare img file for taht?.
I heard that this is a Rockchip kernel image file - so I am a looking for information how to build this kind of kernel?
Procesor is RK3066.
mafamafa said:
I have a working Kernel - http://forum.xda-developers.com/attachment.php?attachmentid=1743802&d=1361298599
but I need prepare a new one - compilation it is no problem, but how to prepare img file for taht?.
I heard that this is a Rockchip kernel image file - so I am a looking for information how to build this kind of kernel?
Procesor is RK3066.
Click to expand...
Click to collapse
If that is a zImage, then you need to pack it into boot.img in order to flash.
There are many boot.img tools out there which can help you. But the thing is you will be needing your device's original boot.img (Which can be extracted from your device depending upon the partition) which contains the Ramdisk in order to be successful.
coolsandie said:
If that is a zImage, then you need to pack it into boot.img in order to flash.
There are many boot.img tools out there which can help you. But the thing is you will be needing your device's original boot.img (Which can be extracted from your device depending upon the partition) which contains the Ramdisk in order to be successful.
Click to expand...
Click to collapse
In fact it is a regular (no gziped) image not a zImage. The file after unpacking from RK3066 format starts with bytes d3 f0 21 (to unpack I'm using rkutils ).
But I don't understand why we need to make boot.img with this file and only after that, upload boot.img to the device. Normally it should be possible just to upload kernel.img to the partition where kernel is stored, no?
After kernel from the link above is uploaded to this partition, the device boots up without problem. But when we compile new kernel and upload it (after converting with rk-tools ) it is not even possible to boot the device.
Any idea what's going on? Is compiling a kernel, then converting to rk3066 format is enough ?
flowher said:
In fact it is a regular (no gziped) image not a zImage. The file after unpacking from RK3066 format starts with bytes d3 f0 21 (to unpack I'm using rkutils ).
But I don't understand why we need to make boot.img with this file and only after that, upload boot.img to the device. Normally it should be possible just to upload kernel.img to the partition where kernel is stored, no?
After kernel from the link above is uploaded to this partition, the device boots up without problem. But when we compile new kernel and upload it (after converting with rk-tools ) it is not even possible to boot the device.
Any idea what's going on? Is compiling a kernel, then converting to rk3066 format is enough ?
Click to expand...
Click to collapse
Ok, I just had a look at your link and yes, it contains the kernel.img file. So it should be the kernel image file which needs to be flashed. What you actually needed to do is, unpack that kernel image using the tools of your choice and you'll get the ramdisk, zImage etc when unpacking. If you have compiled kernel from Sources, then you need to replace the zImage with yours (Found in arch/arm/boot) if your compilation was successful without errors and repack it to form the kernel.img.
But that doesn't mean it should boot compulsorily, it may not boot depending upon various weird reasons. You may have to fix it by yourself. Nearest bet is using your device's config file (Found in /proc/config.gz) and use that to compile your kernel. You can find all infos regarding what I've mentioned in this thread:
http://forum.xda-developers.com/showthread.php?t=1748297

How to Create Boot.img and ramdisk.img from ZImage?

Hi all,I am new to android world.I am trying to create a own kernel image.I have downloaded Kernel source for gt-s6012 and built it. I got zImage by building kernel . How can i get boot.img and ramdisk.img from this zImage. I have searched throughout Google but couldn't find a proper answer. Any clues ?
Boot.img are image where both kernel (zimage) and ramdisk are stored. You should make one with bootimg tools, and you can get ramdisk from your phone (search xda). At the other hand you can use anykernel template and it's even easier. Hope it helps
Matthew_333 said:
Boot.img are image where both kernel (zimage) and ramdisk are stored. You should make one with bootimg tools, and you can get ramdisk from your phone (search xda). At the other hand you can use anykernel template and it's even easier. Hope it helps
Click to expand...
Click to collapse
Thanks for the suggestion..Can you provide any link or procedure to make the boot.img from zImage and ramdisk.

Any working tool to Unpack Android 6.01 bootloader tar.md5 and repack it so it flash?

The tools that I've tried are for earlier versions of Android does anyone know of a working tool? My goal is to downgrade the kernel 1 versoin on my Note 5 AT&T with a locked bootloader.
N920AUCS3CPK1 but running the N920AUCS3CPJ1 kernel.
Update on useful tools:
Assayyed Kitchen for Windows https://forum.xda-developers.com/ch...-android-roms-editor-assayyedkitchen-t3410545
Assayyed takes the system.img you retrieve from decompressing your firmwares AP file. (typically 1 of 4 files known as combination files used to flash to Odin). This tool debloats, deodex, deknox and remove apps from system. In addition it allows you to unpack the kernel (boot.img) and recovery.img files! You can manipulate some settings in Assayyed (see the thread) or even directly as the image is extracted inside of your work folder for both kernel and recovery. You can replace init, change settings in english and etc. Then Assayyed allows you to repack the tool and I can confirm on sm-n920a nov 1 2016 firmware you can flash the repacked image, booting I need to test on a less expensive device first.
(I don't know if it correctly adjusts file permissions in Windows honestly I didn't boot with the final image I only tested that I could flash it, which I could with heimdall for Ubuntu directly from github using .pit file from current firmware csc file).. I have a thread
Carliv Image Kitchen
https://forum.xda-developers.com/android/development/tool-cika-carliv-image-kitchen-android-t3013658
This tools is strictly for unpacking/repacking the boot.img and recovery.img files, may have other features I been focused on kernel/recovery. It has some really cool features which I am just learning but the great news is it's available in Ubuntu (also Windows I believe.)

Question about creating flashable zip

Hi,
I build aosp for my Xperia X, the output are 3 .img files, system.img, boot.img, userdata.img.
So I wanted to ask if it's possible to create a flashable zip for those .img files instead of flashing them using fastboot.
If yes, what should the folder structure look like?
Also could I use a META-INF folder from an other rom? (omnirom for example)
Greetings.

Categories

Resources