Create an android ramdisk. IMG Image

Source: Internet
Author: User
Tags unpack

Unpack

1. view the file format: file ramdisk. img

Ramdisk. IMG: gzip compressed data, from UNIX

Ramdisk. IMG is a compressed package. Of course, ramdisk. IMG compression is not required

2. decompress the ramdisk. IMG package: gunzip-S. IMG ramdisk. img

Because the file name is not .gz, you need to add-s and decompress it to generate the ramdisk file.

3. view the extracted file ramdisk: file ramdisk.

Ramdisk: ASCII cpio archive (svr4 with no CRC)

Cpio package files.

4 unpack package file ramdisk: mkdir rootfs; CD rootfs; cpio-I-f ../ramdisk; LS

Data Dev init. Goldfish. RC proc sys ueventd. Goldfish. RC
Default. Prop init. RC sbin system ueventd. RC

This is all the files.

Then we can modify the files under rootfs. To use the modified rootfs, we only need to repackage rootfs as ramdisk. IMG.

Package

1. Generate a cpio package: CD rootfs; find. | cpio-o-h NEWC> ../tmp_ramdisk.img

2. compress the cpio package: gzip-C tmp_ramdisk.img> ramdisk. img

The newly generated ramdisk. IMG contains the modified

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.