Android Image File Ramdisk.img,system.img,userdata.img Introduction

Source: Internet
Author: User

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

Ramdisk.img is the root file system, System.img includes the main package, library and other files, Userdata.img includes some user data, Android loaded these 3 image files, the system and UserData will be loaded separately into The system and data directories in the RAMDisk filesystem.

The RAMDisk image is compressed with cpio packaging and gzip. It is the root directory of packaging and compression, RAMDisk root file system contains some important to start Android files, such as the kernel boot up after the loading of the first process init, some important configuration files, in short, it controls the entire Android boot. Initialize and load system libraries, programs, etc. according to init.rc,init.goldfish.rc until the boot is complete.

The init.rc script includes many procedures for file system initialization and loading. Init.rc's work is mainly:
1) Set some environment variables
2) Create a directory of system, SDcard, data, cache, etc.
3) Mount some file systems to some directories, such as Mount Tmpfs tmpfs/sqlite_stmt_journals
4) Set up user groups, permissions for some files
5) set some thread parameters
6) Set the TCP cache to large

System.img userdata.img Both images belong to the YAFFS2 file format.


The system.img file is an image of the system directory, similar to the image of a Linux root filesystem, with Android apps, profiles, fonts, and so on.

When Android starts, it 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, opening the service, and so on. System.img is to specify some script commands in init.rc, which are parsed by init.c and mounted to the/system directory under the root directory.


System/app this is mainly stored in the regular download of the application, you can see the APK format is the end of the file. Under this folder the program for the system default components, the software installed by itself will not appear here, but in the/data/folder.
System/bin files in this directory are local programs of the system, from the Bin folder name can be seen binary binary program, which is mainly the Linux system comes with components. System/etc from the folder name is the system configuration files, such as APN access point settings and other core configuration.
System/fonts font folder, in addition to the standard font and bold, italic can see the largest file volume may be the Chinese font, or some Unicode font.
System/framework is mainly a few core files, from the suffix named jar can be seen as a system platform framework.
The System/lib Lib directory is primarily the underlying library of the system, such as the Platform Runtime Library.
System/media Ringtones Music folder, in addition to regular ringtones, there are some system alert event tones
SYSTEM/USR user folders, including shares, keyboard layouts, time zone files, and so on.


USERDATA.IMG is the user data in the Android system, it is the init process by parsing the init.rc file mount to the/data/directory, the default is no files.

Cache.img,mount is under the/cache directory.

Each mirror build configuration can view the \build\core\makefile file.

The following is a detailed analysis of the Qualcomm Platform Android Social Security partition table:


Label Purpose of this partition

-----------------------------------------------------
ModemPartition for Modem
FSCCookie partition to store Modem File System ' s cookies.
SSDPartition for SSD diag module. Stores the encrypted RSA keys
SBL1Partition for secondary boot loader
Sbl1bakBack up Partition for secondary boot loader
RpmPartition for RPM image
RpmbakBack up Partition for RPM image
TzPartition for TZ Image
TzbakBack up Partition for TZ image
HypPartition for hypervisor image
HypbakBack up Partition for hypervisor image
DSPPartition for ADSP dymanic loaders image
Modemst1Copy of Modem File System (Encrypted)
Modemst2Copy of Modem File System (Encrypted)
DDRPartition for DDR.
FSGGolden Copy or backup of the Modem File System (Encrypted). Also used to pre-populate the file system.
SecSec.dat contains fuse settings, mainly for secure boot and OEM setting
SplashThe splash is displayed during the apps bootloader (also called the LK). The display driver in LK would read the splash image data from a separate EMMC partition named as ' Splash '
abootPartition for Apps boot loader
AbootbakBack up Partition for apps boot loader
BootThis is the boot partition of your Android Device,it includes the Android kernel and the RAMDisk.
RecoveryThis is specially designed for backup. The recovery partition can be considered as an alternative boot partition
DevInfoDevice information including:iis_unlocked, is_tampered, is_verified, charger_screen_enabled, Display_panel, Bootloader_version, Radio_version
All these attirbutes is set based on some specific conditions and written on DevInfo partition,.
systemThis partition contains the entire Android OS, other than the kernel and the RAMDisk. This includes the Android GUI and all the system applications. Come pre-installed on the device
CacheThis is the partition where Android stores frequently accessed data and apps components
persistPartition entry for persist image. which contains data which shouldn ' t be changed after the device shipped, for example:calibration data of chips (WiFi, BT, Camera, etc), certificates and other security related files.
MiscThis 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
KeyStorePartition for KeyStore service.
ConfigPartition needed during display panel initialization. More info at Display_panel_configuration_in_device_tree
OEM"It's meant for storing OEM specific info. Customer in this case can decide whether he wants to keep this partition or not typically reserved partitions is kept for Future use
LimitsPartition 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
MotaBackup partition for M OTA upgrade
devcfgPartition needed by TZ for M upgrades.
DipPartition needed for Safeswitch, feature (FR26255) designed to allow OEMs and carriers to address new smartphone theft bil L issues.
MDTPPartition needed for Safeswitch, feature (FR26255) designed to allow OEMs and carriers to address new smartphone theft bil L issues.
UserDataPartition for UserData image
CmnlibVerified boot feature introduced in M needlk to load cmnlib corresponding partitions
KeymasterVerified boot feature introduced in M needs LK to load keymaster from corresponding partitions
syscfgSYSCFG is internal testing for Vmin and CPR characterization
mcfgAll Mbns place holder in Flash. Specific MBN would is loaded by Mcfg image based on the sim/carrier.
MSADPUsed for Modem debug policy
APDPUsed 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 poli Cy'll be signed for the AP
DPOThis partition would store a policy override

Android Image File Ramdisk.img,system.img,userdata.img Introduction

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.