Android system. IMG, userdata. IMG, ramdisk. IMG Analysis

Source: Internet
Author: User

1. Use the file command to query the file type

File ramdisk. IMG --> ramdisk. IMG: gzip compressed data, from UNIX

File System. IMG --> system. IMG: VMS Alpha executable

File System. IMG --> userdata. IMG: VMS Alpha executable

 

Conclusion: ramdisk. IMG is packaged and decompressed with gzip. File System. IMG and file system. IMG are decompressed with unyaffs and compressed with mkyaffs2image.

 

2. mkyaffs2image can be found in the out folder (note that you need to find it in the out folder after compilation) Find Out-name mkyaffs2image

Unyaffs: http://code.google.com/p/tookubuntu/downloads/detail? Name=unyaffs.tar.gz & can = 2 & Q =

 

Upload the above five files to the same folder for operations...

 

3. after unzipzip ramdisk.img.gz is decompressed, we find that it is a small file system that contains some important files for Android startup, for example, after the kernel is started, it loads the first process init and some important configuration files. In short, it controls the entire android startup. Initialize and load the system library according to init. RC and init. Goldfish. RC,ProgramWait until the boot is complete. The init. RC Script includes many file system initialization and loading processes. The main work of init. RC is:
1) set some environment variables
2) create directories such as system, sdcard, data, and Cache
3) mount some file systems to some directories, for example, Mount tmpfs/sqlite_stmt_journals
4) set user groups and permissions for some files
5) set some thread parameters
6) set the TCP cache size

 

4. Decompress system. img

./Unyaffs system. img

Android applications, required library files, various resources, and framework jar libraries are included in system. IMG.

 

5. Decompress userdata. img

./Unyaffs userdata. img

This contains some less important applications

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.