[Q] Unpacking CM boot image

Search This thread

Bytecode

Inactive Recognized Developer
Dec 30, 2010
2,683
4,487
25
/dev/null
Hello guys, I've been struggling since two and a half hours now to unpack boot.img taken from cm10.1 zip (get.cm). I have an error about the magic header, here it is.

Code:
Android Magic not found in boot.img. Giving up.

Fyi, I need to unpack/repack the boot image to change the bootlogo and kernel.
I've tried with any tool available (dsixda kitchen, championswimmer kernel kitchen, simple mkbootimg or unmkbootimg, xperia boot tools and more), no results. Anyone please?
 

tOrNadO™

Inactive Recognized Contributor
Oct 27, 2012
2,240
1,182
Bangalore
That's actually a kernel.elf, not boot.img ;) Rename it to kernel.elf, and use the kernel kitchen to extract it's contents.

..

Hi.. I found this dead thread when i googled for the same thing that OP also had,, I managed to unpack the kernel's boot.img by renaming it to kernel.elf.. I have to edit init,rc file in order to get bootclasspath lines from a cm10 fxp kernel and put it in my port ROM's init.rc and replace the bootclasspath.. But i never found init.rc file anywhere, there is an init file which doesn't have a bootclasspath but only PATH.. Can u help me with this?
 

NuriJ

Senior Member
Nov 25, 2011
1,188
1,069
Hi.. I found this dead thread when i googled for the same thing that OP also had,, I managed to unpack the kernel's boot.img by renaming it to kernel.elf.. I have to edit init,rc file in order to get bootclasspath lines from a cm10 fxp kernel and put it in my port ROM's init.rc and replace the bootclasspath.. But i never found init.rc file anywhere, there is an init file which doesn't have a bootclasspath but only PATH.. Can u help me with this?

Are you looking in ramdisk?
 

tOrNadO™

Inactive Recognized Contributor
Oct 27, 2012
2,240
1,182
Bangalore
Are you looking in ramdisk?

Yes.. I did that too.. Unfortunately all the methods didn't work.. One simple method worked though.. Change the permissions of all the unpacked files and mount the ramdisk.img and then extract it and change contents of any file of your choice and then repack it.. It works like a charm.. ;)
 

Top Liked Posts