How can i unpack boot.img? - Xiaomi Redmi Note 7 Questions & Answers

I want to custom kernel without magisk.
So i tried to unpack boot.img in order to modify kernel in boot.img.
But, i couldn't unpack boot.img with any other unpack tool like Android image kitchen.
Common problem is about ramdisk.
i guess common unpack tools can't unpack pie 9.0 boot.img.
so i used different ways flashing other rom's boot.img because of using recent custom kernel. However, it is just temporary action.
do you know any other ways to unpack boot.img?

Letmeseeforest said:
I want to custom kernel without magisk.
So i tried to unpack boot.img in order to modify kernel in boot.img.
But, i couldn't unpack boot.img with any other unpack tool like Android image kitchen.
Common problem is about ramdisk.
i guess common unpack tools can't unpack pie 9.0 boot.img.
so i used different ways flashing other rom's boot.img because of using recent custom kernel. However, it is just temporary action.
do you know any other ways to unpack boot.img?
Click to expand...
Click to collapse
You can unpack any boot image if you have the right tools. If the problem is with unpacking the ramdisk, that would be because you are trying to use the wrong tool to decompress it. Open the ramdisk image with an hex editor, and post the values of the first 4 bytes. And then tell us which tool you are trying to use to decompress it.

Why ramdisk is empty?
Bro I have redmi note 7 pro
when I unpack boot.IMG , ramdisk folder is always empty
Why ?
is there something that I missing?

Related

[HELP] can somebody extract this boot.img please

hi,
i have a big problem.
i have extracted with perl script the boot.img from updata.app
this works fine... but when i want to extract the boot.img, then i have many errors and the .gz files are not readable.
i have tried it under windows and ubuntu, but still the same :-(
can somebody extract the file ?
here is the .img file
http://www.megaupload.com/?d=XX69Z7BM
many thanks
That img file is corrupt, or does not have a ramdisk image within it (only a kernel). Or it is using some non-standard means to store the ramdisk.
What is it from and how did you extract it?
thanks for your replay
the file is from a v845 (huawei 8120).
Firmware: V845 V100R001MYSC02B 236(Malaysia)
from here: huawei
i used the script split_updata.pl, split_bootimg.pl and unyaffs.exe
the boot.img doesn't use yaffs2, it is a raw kernel image combined with a cpio archive of the ramdisk image (and a short header to tell where the files are delimited). Your file has a corrupt header. I was able to extract it for you. Do you want me to attach it for you? I assume you extracted the kernel OK (it worked for me).
Gene Poole said:
the boot.img doesn't use yaffs2, it is a raw kernel image combined with a cpio archive of the ramdisk image (and a short header to tell where the files are delimited). Your file has a corrupt header. I was able to extract it for you. Do you want me to attach it for you? I assume you extracted the kernel OK (it worked for me).
Click to expand...
Click to collapse
yes, please attach it
can you tell me, with which tools you managed to extract the kernel ?
thanks
wildgunman said:
yes, please attach it
can you tell me, with which tools you managed to extract the kernel ?
thanks
Click to expand...
Click to collapse
I normally use the tools found in this thread:
http://forum.xda-developers.com/showthread.php?t=551711
but like I said, your image was corrupt or something. I just hex grepped it for a gzip signature indicating the start of the gzipped cpio ramdisk portion.

[Q] How to make system.img from extracted system folder?

I've been working on a custom rom with android kitchen and I want to get the system.img and boot.img.But the system.img seems to be extracted and the boot.img isn't.How do I get the system.img?Can I make .img file with power archiver or something?
fdespotovski said:
I've been working on a custom rom with android kitchen and I want to get the system.img and boot.img.But the system.img seems to be extracted and the boot.img isn't.How do I get the system.img?Can I make .img file with power archiver or something?
Click to expand...
Click to collapse
If your PC using linux system,I recommend you to use Virtual Box.
If U using windows system,you must configuration Java environment first,and then install a software who name is Cygwin,You can use it to extract the system.img and boot.img.

Need help: extract boot.img

Hi,
I need help to unpack stock boot.img of kitkat rom.
Kitchen cannot do that because of LZ format..
I compiled the latest version of unpackbootimg but no way to make a "gunzip" of the ramdisk.
Thanks !
@GalaxyUser
lz4 compression
I just tried with this tool (Android.Image.Kitchen.v2.0-Win32.zip)
http://forum.xda-developers.com/show....php?t=2073775
Seems OK

How to create boot.img

I have some original C code, which I have compiled successfully, and like to put on my phone, SM-N900P. I downloaded a copy of stock firmware and used unmkbootimg to unpack the boot.img. What do I do from here on? I have searched online and this site. I believe I have to put my files in the ramdisk directory. What I do not know is what files go in there? Can I put .img files in there? Is there a specific order in which directory to use within the ramdisk? I read someone's post instructing me to put the .ko files in ramdisk/lib/modules directory. But the ramdisk directory I have does not have a /lib directory. Should I create one? I only ask because each phone seems to have a different setup. I basically have a zImage, dt.img, and a couple of other img files.
Even if you can not help, I appreciate if you point me to relevant useful information.
Thanks
sansari123 said:
I have some original C code, which I have compiled successfully, and like to put on my phone, SM-N900P. I downloaded a copy of stock firmware and used unmkbootimg to unpack the boot.img. What do I do from here on? I have searched online and this site. I believe I have to put my files in the ramdisk directory. What I do not know is what files go in there? Can I put .img files in there? Is there a specific order in which directory to use within the ramdisk? I read someone's post instructing me to put the .ko files in ramdisk/lib/modules directory. But the ramdisk directory I have does not have a /lib directory. Should I create one? I only ask because each phone seems to have a different setup. I basically have a zImage, dt.img, and a couple of other img files.
Even if you can not help, I appreciate if you point me to relevant useful information.
Thanks
Click to expand...
Click to collapse
boot.img contain: ramdisk, zImage (kernel compressed with modules), dtb (device tree binary) and some time have name dt.img.
When you compile kernel from source, you will get zImage and dt.img (if you use dtbTool to merge all device tree rev). Use xiaolu's unmkbootimg to extract stock kernel to get ramdisk and modify it, replace zImage and dt.img then repack it to become boot.img and ready to flash it.
You should create thread in Q&A box
hiepgia said:
boot.img contain: ramdisk, zImage (kernel compressed with modules), dtb (device tree binary) and some time have name dt.img.
When you compile kernel from source, you will get zImage and dt.img (if you use dtbTool to merge all device tree rev). Use xiaolu's unmkbootimg to extract stock kernel to get ramdisk and modify it, replace zImage and dt.img then repack it to become boot.img and ready to flash it.
You should create thread in Q&A box
Click to expand...
Click to collapse
Thanks. I'll move to Q&A

extraction of kernel form rom installation file

Hi,
Do you know how to extract kernel from installation file of rom and make flashable (in TWRP) zip kernel file ?
I need extract ant make flashable kernel file from [ROM][AQF5][6.0.1][G900x]SkiesROM UX v3.1 A7 2017
I will be grateful for your help
tomaasz said:
Hi,
Do you know how to extract kernel from installation file of rom and make flashable (in TWRP) zip kernel file ?
I need extract ant make flashable kernel file from [ROM][AQF5][6.0.1][G900x]SkiesROM UX v3.1 A7 2017
I will be grateful for your help
Click to expand...
Click to collapse
Hi,
Sorry for the delayed reply.
Can you be little more specific? Do you want to 1) extract the kernel (that is an "zImage") image or 2) simply the "boot.img"?
The second task is simple as you can simply copy the "boot.img" from the ROM zip. You can flash "boot.img" directly via twrp (no need to make flashable zip).
The first task, however, is bit complicated as it requires the use of some tools like mkbootimg or Android Image Kitchen to split the "boot.img". You can flash the obtained "zImage" by simply copying that into an existing anykernel based klte custom kernel. :laugh:
Feel free to contact me for any further clarification/help.
Hi,
Thanks for your answer. I needed flashable zip kernel file extracted from SkiesRom.
I wanted patch this by DualBoot
tomaasz said:
Hi,
Thanks for your answer. I needed flashable zip kernel file extracted from SkiesRom.
I wanted patch this by DualBoot
Click to expand...
Click to collapse
Hi, if you have a Linux, you can easily extract the zImage from the "boot.img" using mkbootimg (see previous comment for links). If you want me to do that job, feel free to send the "boot.img" of that mentioned ROM (I'll make a flashable anykernel zip file for you so that you can flash over any ROM).
Regarding the DualBoot, I really do not know...

Categories

Resources