Android镜像文件ramdisk.img,system.img,userdata.img介绍
Android 源码编译后,在out目录下生成的三个镜像文件:ramdisk.img,system.img,userdata.img以及它们对应的目录树root,system,data。
ramdisk.img是根文件系统,system.img包括了主要的包、库等文件,userdata.img包括了一些用户数据,android加载这3个映像文件后,会把 system和 userdata分别加载到 ramdisk文件系统中的system和 data目录下。
Ramdisk镜像是采用cpio打包,gzip压缩的。它是对root目录的打包和压缩,ramdisk根文件系统中包含一些对于启动android的很重要的文件,比如内核启动完后加载的第一个进程init、一些重要的配置文件等,总之它控制着整个android的启动。根据 init.rc,init.goldfish.rc来初始化并装载系统库、程序等直到开机完成。
init.rc脚本包括了文件系统初始化、装载的许多过程。init.rc的工作主要是:
1)设置一些环境变量
2)创建system、sdcard、data、cache等目录
3)把一些文件系统mount到一些目录去,如,mount tmpfs tmpfs /sqlite_stmt_journals
4)设置一些文件的用户群组、权限
5)设置一些线程参数
6)设置TCP缓存大
system.img userdata.img这两个镜像都属于yaffs2文件格式。
system.img文件是system目录的一个映像,类似于linux的根文件系统的映像,放着android的应用程序,配置文件,字体等。
android启动时首先加载ramdisk.img镜像,并挂载到/目录下,并进行了一系列的初始化动作,包括创建各种需要的目录,初始化console,开启服务等。System.img是在init.rc中指定一些脚本命令,通过init.c进行解析并挂载到根目录下的/system目录下的。
system/app 这个里面主要存放的是常规下载的应用程序,可以看到都是以APK格式结尾的文件。在这个文件夹下的程序为系统默认的组件,自己安装的软件将不会出现在这里,而是/data/文件夹中。
system/bin 这个目录下的文件都是系统的本地程序,从bin文件夹名称可以看出是binary二进制的程序,里面主要是Linux系统自带的组件。 system/etc 从文件夹名称来看保存的都是系统的配置文件,比如APN接入点设置等核心配置。
system/fonts 字体文件夹,除了标准字体和粗体、斜体外可以看到文件体积最大的可能是中文字库,或一些unicode字库。
system/framework 主要是一些核心的文件,从后缀名为jar可以看出是是系统平台框架。
system/lib lib目录中存放的主要是系统底层库,如平台运行时库。
system/media 铃声音乐文件夹,除了常规的铃声外还有一些系统提示事件音
system/usr 用户文件夹,包含共享、键盘布局、时间区域文件等。
userdata.img是Android系统中存放用户数据的,它被init进程通过解析init.rc文件mount到/data/目录下,默认里面是没有文件的。
cache.img,mount在/cache目录下。
各个镜像生成配置可以查看\build\core\Makefile文件。
如下为高通平台Android社保分区表详细解析:
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 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’
aboot Partition for apps boot loader
abootbak Back up Partition for apps boot loader
boot This is the boot partition of your android device,It includes 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 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 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 would 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
Android镜像文件ramdisk.img,system.img,userdata.img介绍的更多相关文章
- Android 系统镜像: boot.img kernel.img ramdisk.img system.img userdata.img cache.img recovery.img
boot.img(kernel.img+ramdisk.img) ramdisk.img(/) system.img(/system) userdata.img(/data) cache.img(/c ...
- zImage.img、ramdisk.img、system.img、userdata.img介绍及解包、打包方法
ramdisk.img system.img userdata.img介绍及解包.打包方法 Android 源码编译后,在out/target/product/generic下生成ramdisk.im ...
- Android系统的镜像文件的打包过程
在前面一篇文章中,我们分析了Android模块的编译过程.当Android系统的所有模块都编译好之后,我们就可以对编译出来的模块文件进行打包了.打包结果是获得一系列的镜像文件,例如system.img ...
- Android NDK开发之Android.mk文件
Android NDK开发指南---Android.mk文件 博客分类: Android NDK开发指南 Android.mk文件语法详述 介绍: ------------ 这篇文档是用来描述你的 ...
- Android.mk文件语法规范及使用模板
Android.mk文件语法详述 介绍:------------这篇文档是用来描述你的C或C++源文件中Android.mk编译文件的语法的,为了理解她们我们需要您先看完docs/OVERVIEW.h ...
- Android NDK开发指南(二)Android.mk文件
http://www.cnblogs.com/yaozhongxiao/archive/2012/03/06/2382225.html 1. 概述 Android.mk文件是用来描述build sy ...
- Android系统定制——Download Android System 及加载system镜像文件
定制android系统(配置及相关系统的镜像文件),具体可参考:Driver_All_in_One_V1.0——MT6735_6753.pdf文档,特别需要理解的是Download部分. 与之对应的软 ...
- 解决:Android编译源码根目录下/system/vold后,通过push命令将编译生成的vold文件push至system/bin下无法正常开机
这段时间由于工作需要,在对android根目录下/system/vold进行修改编译的时候,在通过adb命令将vold文件push至/system/bin目录下,adb reboot重启手机却发现一直 ...
- Android Studio 配置虚拟设备的镜像文件的存放路径
操作系统:Windows 10 x64 IDE:Android Studio 3.3 Android Studio创建的虚拟设备的默认存放路径是位于C盘,这导致C盘的可用容量变小. 所以,我决定要将虚 ...
随机推荐
- Resistance
题意: 给出一个由n个节点和m个二元电阻元件组成的电路,求问节点1到节点n的等效电阻. 解法: 应用电子电路分析中的基尔霍夫定律,对于每一个点有流量平衡,得 对于点$x$有 $$I_{出} + \su ...
- 3-3 浮点型字面量 & 3-4浮点型案例
双精度的浮点类型,末尾加d或者D 3-4浮点型案例 如果一个浮点类型的末尾什么也不写 他表示就是一个double类型的.所以这里定义报错了. float f=1234.328; 把一个范围大的数赋值给 ...
- IT兄弟连 JavaWeb教程 Servlet会话跟踪 Session技术
Servlet提供了HttpSession接口,该接口提供了一种跨多个页面请求或访问网站时识别用户以及存储有关用户信息的方式. Servlet容器使用这个接口来创建一个HTTP客户端和HTTP服务器之 ...
- 3.Python自我修炼(升仙中....整数,布尔值,字符串,for循环)
python学习(整数,布尔值,字符串,for循环) 1.整数 在python3中所有的整数都是int类型. 但在python2中如果数据量比较大. 会使用long类型.但是在python3中不存 ...
- VRTK3.3.0-004传送
直线传送: 一.无高度变换传送(VRTK_BasicTeleport) 1丶继续在VRScripts下创建空物体PlayArea,用来挂在传送相关脚本:创建Plane作为传送地面 2丶在PlayAre ...
- ZOJ 4019 Schrödinger's Knapsack (from The 18th Zhejiang University Programming Contest Sponsored by TuSimple)
题意: 第一类物品的价值为k1,第二类物品价值为k2,背包的体积是 c ,第一类物品有n 个,每个体积为S11,S12,S13,S14.....S1n ; 第二类物品有 m 个,每个体积为 S21,S ...
- shell学习(3)- grep
常用选项 -E :开启扩展(Extend)的正则表达式. -i :忽略大小写(ignore case). -v :反过来(invert), 显示不包含匹配文本的所有行. -V 或 --vers ...
- SpringBoot | quartz | @DisallowConcurrentExecution
注释放在job类上, 作用: 将该注解加到job类上,告诉Quartz不要并发地执行同一个job定义(这里指特定的job类)的多个实例.
- PostgreSQL-9-别名与动态表复制
1.列别名 SELECT column_name AS alias_name FROM table_name conditions... ; alias_name: 它指定分配给列的临时名称 SEL ...
- CF #546div2D
题目本质:只有能做到一路过关斩将的勇者才能冒泡过来救出女主. 主要代码: ; int n, m, a[maxn], ans; vector<int> edge[maxn]; set< ...