Introduction to ramdisk. img, system. img, userdata. img In the Android image file, ramdisk Image

Source: Internet
Author: User

Introduction to ramdisk. img, system. img, userdata. img In the Android image file, ramdisk Image

 

After the Android source code is compiled, three image files generated in the out directory are ramdisk. img, system. img, userdata. img, and their corresponding directory tree root, system, and data.

 

Ramdisk. img is the root file system, system. img includes the main packages, libraries, and other files, userdata. img includes some user data. After android loads these three image files, it loads system and userdata to the system and data Directories In the ramdisk file system respectively.

 

Ramdisk images are packaged using cpio and compressed using gzip. It is used to package and compress the root directory. The ramdisk root file system contains files that are very important 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 and program according to init. rc and init. goldfish. rc until the startup 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

 

Both system. img userdata. img images belong to the yaffs2 file format.


The system. imgfile is an image of the system directory, which is similar to the linux root file system image. It contains android applications, configuration files, fonts, and so on.

When android starts, it first loads the ramdisk. img image, mounts it to the/directory, and carries out a series of initialization actions, including creating various Required Directories, initializing the console, and enabling services. System. img specifies some script commands in init. rc, which are parsed and mounted to the/system directory under the root directory through init. c.


The system/app 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. The installed software will not appear here, but in the/data/folder.
The files in the system/bin directory are all local programs of the system. From the bin folder name, we can see that they are binary programs, which are mainly components of the Linux system. System/etc from the perspective of the folder name, all files are saved in the system configuration file, such as the core configuration such as the APN Access Point settings.
System/fonts font folder, in addition to the standard font, bold, italic, you can see that the largest file size may be a Chinese font, or some unicode font.
System/framework is mainly a number of core files. It can be seen from the suffix jar that it is a system platform framework.
The system/lib directory stores the underlying system libraries, such as the Runtime Library of the platform.
System/media ringtones music folder, 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.


Userdata. img stores user data in the Android system. It is mounted to the/data/directory by the init process by parsing the init. rc file. By default, there is no file in it.

Cache. img, mount in the/cache directory.

For the image generation configuration, you can view the \ build \ core \ Makefile file.

 

The following is a detailed explanation of the Qualcomm platform Android social security partition table:


Label Purpose of this partition

-----------------------------------------------------
Modem Partition for modem
Fsc Cookie partition to store Modem File System's cookies.
Ssd Partition for ssd diag module. stores the encrypted RSA keys
Sbl1 Partition for secondary boot loader
Sbl1bak Back up Partition for secondary boot loader
Rpm Partition for rpm image
Rpmbak Back up Partition for rpm image
Tz Partition for tz image
Tzbak Back up Partition for tz image
Hyp Partition for hypervisor image
Hypbak Back up Partition for hypervisor image
Dsp Partition for adsp dymanic loaders image
Modemst1 Copy of Modem File System (Encrypted)
Modemst2 Copy of Modem File System (Encrypted)
DDR Partition for DDR.
Fsg Golden copy or backup of Modem File System (Encrypted). Also used to pre-populate the file system.
Sec. dat contains fuse settings, mainly for secure boot and oem setting
Splash The splash screen is displayed during the apps bootloader (also called the LK). The display driver in LK will read the splash image data from a separate eMMC partition named as 'splash'
Partition t Partition for apps boot loader
Effectbak Back up Partition for apps boot loader
Boot This is the boot partition of your android device, It includes des the android kernel and the ramdisk.
Recovery This is specially designed for backup. The recovery partition can be considered as an alternative boot partition
Devinfo Device information including: iis_unlocked, is_tampered, is_verified, charger_screen_enabled, display_panel, bootloader_version, radio_version
All these attirbutes are set based on some specific conditions and written on devinfo partition ,.
System This partition contains the entire Android OS, other than the kernel and the ramdisk. This includes des the Android GUI and all the system applications that come pre-installed on the device
Cache This is the partition where Android stores frequently accessed data and app components
Persist Partition entry for persist image. which contains data which shouldn't be changed after the device is shipped, for example: calibration data of chips (wifi, bt, camera, etc .), certificates and other security related files.
Misc This partition contains miscellaneous system settings in form of on/off switches. These settings may include CID (Carrier or Region ID), USB configuration and certain hardware settings etc
Keystore Partition for keystore service.
Config Partition needed during display panel initialization. More info at Display_panel_configuration_in_Device_Tree
Oem "It is meant for storing OEM specific info. Customer in this case can decide whether he wants to keep this partition or not typically reserved partitions are kept for future use
Limits Partition to store LMh params on 8976 target. LMh (Limits management) driver in SBL writes the LMh HW trimmed data into separate partition
And uses the same data for later reboots
Mota Backup partition for M ota upgrade
Devcfg Partition needed by TZ for M upgrades.
Dip Partition needed for SafeSwitch, feature (FR26255) designed to allow OEMs and carriers to address new smartphone theft bill issues.
Mdtp Partition needed for SafeSwitch, feature (FR26255) designed to allow OEMs and carriers to address new smartphone theft bill issues.
Userdata Partition for userdata image
Cmnlib Verified boot feature introduced in M needLK to load cmnlib corresponding partitions
Keymaster Verified boot feature introduced in M needs LK to load keymaster from corresponding partitions
Syscfg Syscfg is internal testing for Vmin and CPR characterization
Mcfg All MBNs place holder in flash. Specific MBN wocould be loaded by mcfg image based on the SIM/Carrier.
Msadp used for modem debug policy
Apdp used for persisting the debug policy. "Debug policy" is used to better support development and debug on secure/fuse-blown devices One instance of the debug policy will be signed for the AP
Dpo This partition will store a policy override

 

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.