Introduction and use of Android ramdisk. IMG system. IMG userdata. img

Source: Internet
Author: User

Android
After the source code is compiled, the system. IMG, ramdisk. IMG, and userdata. IMG image files are obtained. Ramdisk. IMG is
File system, system. IMG includes major packages, libraries, and other files. userdata. IMG includes some user data. After emulator loads these three image files
Load System. IMG and userdata. IMG to the system and userdata directories in the ramdisk file system respectively (similarity will be found ).

We will find that the contents of the compiled root folder are similar to those of the android runtime root directory. The ramdisk root file system contains some important documents for Android startup.
For example, the first process init and some important configuration files loaded after the kernel is started. In short, it controls the startup of the entire android system. According
Init. RC, init. Goldfish. RC to initialize and load the system library and program until the startup is complete. The init. RC Script includes many file system initialization and loading operations.
. 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
5) set some thread parameters
6) set the TCP cache size

The generated system. IMG, ramdisk. IMG, and userdata. IMG image files are packaged using cpio and compressed using gzip. You can run the file command to verify
Certificate:
File ramdisk. IMG, output: ramdisk. IMG: gzip compressed data, from UNIX,
Last modified: Wed mar 18 17:16:10
2009, we can learn how to extract ramdisk. IMG. Copy ramdisk. IMG to any other directory and change its name
Ramdisk.img.gz and use the command
Gunzip ramdisk.img.gz and create a new folder named ramdisk. Enter and enter
Command cpio-I-f
../Ramdisk. IMG. Now you can see and operate the content in ramdisk. Then the system and
Copy the files in userdata to ramdisk/system and ramdisk/userdata. In this way, a file system is obtained.


You will also find that the sys in the root file system is a Linux.

========================================================== ==================================

In Android
Android 1.5 system loaded on the 2.1 simulator:

Ben
The three imgfiles compiled in this document are in version 2.1. You can use system. IMG and ramdisk. IMG to replace version 1.5:

Life
Command:

Dozen
Enable the android 1.5 simulator and load both system. IMG and ramdisk. IMG.

Emlator
-AVD sdk_00005-ramdisk [ramdisk. IMG path]-system [system. IMG path]

Qi
After the operation, you can see that the mobile phone version in the settings has changed to version 2.1.

========================================================== ==================================


For Android system folders, such as the out/target/prod t/smdk6410/system directory, the descriptions are as follows:

System/APP

This mainly stores applications that are routinely downloaded. You can see that all files end with the APK format. The program in this folder is the default component of the system, and the installed software will not appear in this
But in the/data/folder.

System/bin
The files in this directory are all local programs of the system. From the bin folder name, we can see that the files are binary programs, which are mainly components of the Linux system.

System/etc
From the folder name, the system configuration files are saved, such as the core configuration of the APN Access Point settings.

System/Fonts
Font folder, in addition to the standard font, bold, and italic, you can see that the largest file size may be a Chinese font, or some Unicode font.

System/framework
It is mainly some core files. It can be seen from the suffix jar that it is a system platform framework.

System/lib
The lib directory stores the underlying system libraries, such as the Runtime Library of the platform.

System/Media
In addition to regular ringtones, there are also some system prompts for event music.

System/usr
User folders, including sharing, keyboard layout, and time zone files.

From: http://blog.csdn.net/cx968968/archive/2010/08/17/5817662.aspx

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.