How to create boot.img - Galaxy Note 3 Q&A, Help & Troubleshooting

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

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] extract a rom

Hello
can any one tell me how i can extract a rom so i can gate some apk that my original rom use to have.
thank you
unzip with winrar
system>app> apk files here
Questions to general section please. Written in forum rules.
Sent from my u8800 using XDA App
Thank you oguzhan mobile
How to extract the update.app (stock rom file)?
andreasha said:
How to extract the update.app (stock rom file)?
Click to expand...
Click to collapse
The attached should be all you need. split_updata.pl will extract the system image which you can then mount directly. splitfile.c will extract the mbn files and boot.img. Use abootimg to extract the kernel and initrd and then cpio to get the root fs from the initrd. Obviously you will want to use a linux box for this.
dzo said:
The attached should be all you need. split_updata.pl will extract the system image which you can then mount directly. splitfile.c will extract the mbn files and boot.img. Use abootimg to extract the kernel and initrd and then cpio to get the root fs from the initrd. Obviously you will want to use a linux box for this.
Click to expand...
Click to collapse
Thanks mate, really nice instructions!

[Q] How do I add my own img file to a separate partition ?

I am a beginner, and I have compiled a game built with C. The instructions I have say that I have to flash the final .img file to a separate partition on my SM-N900P. Now I have successfully downloaded the stockfirmware, unpacked it with mkbootimg, built my own dtb.img and flashed the phone. (Side note: I got an error about Samsung Keyboard, which if you know how I can address I would be grateful). I do not know how / where to put the .img file I compiled though. Do I pack it when I tar my files?

[Important] How to create .zip from system.img rom

Guys I need help, I finished building cyanogenmod 13 for my project, but I can't use the command "make otapakage" becouse it will make an flashable zip with system folder compressed on a .dat file and the META-INF folder will not work if I unpack them
The question is: how can I create a flashable cm 13 with unpacked system folder? like this:
Zip:
META-INF
System
Boot.img
The faster someone helps me, the faster the project goes
Ext4 Unpacker and Ext2Explore here the tutorial http://forum.xda-developers.com/showthread.php?t=2285831
and here is the meta inf folder in this folder is all ready you must not change anything in there
https://drive.google.com/file/d/0B9Swc5FblVWARmd3YzdDcmZxajQ/view?usp=sharing

How can i unpack boot.img?

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?

Categories

Resources