Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to extract ramdisk.img

Tags:

android

rom

use ubuntu

I type file ramdisk.img and the Terminal display ramdisk.img: data, I use cpio and get nothing extracted! How can I extract such ramdisk.img?

like image 240
user1323681 Avatar asked Dec 05 '12 13:12

user1323681


People also ask

How do I create a ramdisk image?

Now you can create the ramdisk using the mount command. The following example shows how to create a ramdisk using tmpfs on 2GB Ram/Swap, on the mount point /mnt/tmp. The -t (type) argument allows to specify the file system (in this case, tmpfs). The -o (options) argument is used to define the space for the ramdisk.

What is recovery ramdisk?

Recovery-ramdisk is used only to boot into recovery. Contains normal boot kernel and recovery-ramdisk ( BOARD_USES_RECOVERY_AS_BOOT := true ). Recovery-ramdisk is used to boot into both recovery and Android.


1 Answers

It's highly possible that ramdisk.img actually is a compressed file ramdisk.cpio.gz. To extract it use this commands:

cd /Path/To/Folder/With/ramdisk.cpio.gz/File
mkdir temp_directory && cd temp_directory
gunzip -c ../ramdisk.img | cpio -idm

Check this blog post for more info: http://blog.djodjo.org/?p=536

like image 190
kalin Avatar answered Sep 21 '22 16:09

kalin