Decompress and package the android root file system ramdisk. img

Source: Internet
Author: User

1. ramdisk. the imgfile gzip is compressed, so use the gunzip command to decompress it. but gunzip extension .gz can be decompressed normally, otherwise it will be ignored. (source file type) ramdisk. img: gzip compressed data, from Unix 2. after the name is removed, the suffix .gz is automatically removed and renamed as ramdisk. img. The file type is ramdisk. img: ASCII cpio archive (SVR4 with no CRC) 3. at this time, you can use the cpio command from ramdisk. img decompress the file with the file system. Therefore, we recommend that you create a new directory for mkdir aaa to enter the directory cpio-I-F .. /ramdisk. imgOK. After decompression, you can customize your file system and init. rc: you can change it. 4. after the customization, we began to repackage cpio-I-t-F .. /r Amdisk. img> listcpio-o-H newc-O new. img <list is ready, and a new ramdisk is packaged. img. The name is new. img, but it cannot run directly at this time. Why? Let's look at the file type. new. img: ASCII cpio archive (SVR4 with no CRC) and ramdisk after decompression. img is the same, so it is still a step away at this time, that is, use gzip to compress gzip new.imgto to create a. file named new.img.gz: gzip compressed data, was "new. img ", from Unix, last modified: Mon Dec 24 10:59:51 2012 and rename it ramdisk. imgmv new.img.gz ramdisk. img 5. okay. If you have a board, re-burn ramdisk. imgfile. You can also run the simulator without a board. emulator-ramdisk. /ramdisk. img-system. /system. img-data. /userdata. img-sdcard (Optional). Sort out the command cp ramdisk. img ramdisk.img.gz gunzip ramdisk.img.gz mkdir aaacd aaacpio-I-F .. /ramdisk. img (after decompression, customize your own root file system) cpio-I-t-F .. /ramdisk. img> listcpio-o-H newc-O new. img <listgzip new. imgmv new.img.gz ramdisk. imgcp ramdisk. img .. /ramdisk. img (overwrite the original ramdisk, optional) emulator-ramdisk. /ramdisk. img-system. /system. img-data. /userdata. img

Related Article

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.