How can i extract ramdisk ?

Search This thread

gigitux

Senior Member
Oct 28, 2012
170
114
Napoli
Hello guys :)

I have a little problem.

I builded kernel, but i have got only image and Zimage.

How can i extract ramdisk (for mkbooimg) ? Thanks
 

Abhinav1997

Inactive Recognized Developer / Retired Forum Mod
Jul 29, 2012
2,590
5,306
Install p7zip-full package. Then the kernel from which you need ramdisk, just do this- 7z e kernel_name.elf
It'll give 3 files, 0(zImage), 1(Ramdisk), 2(cmdline).

Cheers,
AJ
 

evildev

Senior Member
Jul 23, 2013
348
392
Yep, i try, but i have black screen when boot smarthphone.

Perhaps i do an error....

As far as i know, tearing down kernel with 7zip (or similar) breaks symlinking. I've read that somewhere, don't remember where. Either way, it breaks something. You could unpack kernel.elf with Flashtool, it will give you image, ramdisk.gz, and maybe file called cert or 3 (it depends). If kernel is boot.img instead of kernel.elf, just rename it to kernel.elf.

if you need help on packing/repacking kernel or ramdisk, PM me, I will help you as much as I can.
 

gigitux

Senior Member
Oct 28, 2012
170
114
Napoli
As far as i know, tearing down kernel with 7zip (or similar) breaks symlinking. I've read that somewhere, don't remember where. Either way, it breaks something. You could unpack kernel.elf with Flashtool, it will give you image, ramdisk.gz, and maybe file called cert or 3 (it depends). If kernel is boot.img instead of kernel.elf, just rename it to kernel.elf.

if you need help on packing/repacking kernel or ramdisk, PM me, I will help you as much as I can.

There are links for download Image and zImage.
 

Andrewasth

Senior Member
Jan 27, 2013
1,459
1,294
Athens
This should be in Q&A section not in Development section! REPORTED!

Anyway, you can use championswimmer's Android Kernel Kitchen to extract your kernel for getting zImage, ramdisk and the contents of the ramdisk :good:

It won't work. If you want just to extract use flashtool. Unpacking with 7-zip will destroy symlinks and packing again will never work. To use flashtool rename boot.img to boot.elf. Choose Tools>Extractors>Elf and choose your boot.elf file you renamed previously. Then press dump and close. It should be in the same folder with the boot.elf file. (boot.elf was always a renamed boot.img file ;) ) BTW wrong section
 

evildev

Senior Member
Jul 23, 2013
348
392
It won't work. If you want just to extract use flashtool. Unpacking with 7-zip will destroy symlinks and packing again will never work. To use flashtool rename boot.img to boot.elf. Choose Tools>Extractors>Elf and choose your boot.elf file you renamed previously. Then press dump and close. It should be in the same folder with the boot.elf file. (boot.elf was always a renamed boot.img file ;) ) BTW wrong section

I said that to OP and he gave me links to his zImage and image.
I don't possess great knowledge concerning android, but I wan't to help if someone is stuck, give instructions, etc. But to do someone else's work, well...

aint-nobody-got-time-for-that.png
 
  • Like
Reactions: Garcia98

Garcia98

Senior Member
Mar 4, 2013
1,094
1,431
github.com
It won't work. If you want just to extract use flashtool. Unpacking with 7-zip will destroy symlinks and packing again will never work. To use flashtool rename boot.img to boot.elf. Choose Tools>Extractors>Elf and choose your boot.elf file you renamed previously. Then press dump and close. It should be in the same folder with the boot.elf file. (boot.elf was always a renamed boot.img file ;) ) BTW wrong section

I'm pretty sure that championswimmer's tool works, because I used it just a week ago to extract a kernel and it worked like a charm :D
However, Flashtool method is OK too :)
 

Abhinav1997

Inactive Recognized Developer / Retired Forum Mod
Jul 29, 2012
2,590
5,306
I'm pretty sure that championswimmer's tool works, because I used it just a week ago to extract a kernel and it worked like a charm :D
However, Flashtool method is OK too :)

Nah, it doesn't. But we can use 7z e kernel.elf and then extract ramdisk from champ's kernel kitchen so it'll not break the symlinks. :)

Cheers,
AJ
 

Top Liked Posts