android查看分区和镜像文件的结构

一、系统分区的的含义,查看,修改

1.解决系统adb remount 失败

dm_verity is enabled on the system and vendor partitions.Use "adb disable-verity" to disable verity.If you do not, remount may succeed,

however, you will still not be able to write to these volumes.remount of /system failed: Read-only file systemremount failed

	1.use2root to get root privilege (adb shell setprop ro.debuggable 1) 
	2.adb shell setenforce 0 
	3.adb disable-verity 
	4.adb reboot 
	5.after poweron ,use2root to get root privilege again 
	6.adb shell setenforce 0 
	7.adb remount 

二、不同的分区对应的系统镜像
我们在查看不同的镜像内容之前先查看一下编译出来的镜像和手机硬件中的分区对于情况:对于linux目录树和挂载点相关内容查阅相关知识

root@bullhead:/system # df 查看的目标是google nexus 5x的信息
Filesystem               Size     Used     Free   Blksize
/dev                   900.9M    40.0K   900.9M   4096
/sys/fs/cgroup         900.9M    12.0K   900.9M   4096
/mnt                   900.9M     0.0K   900.9M   4096
/system                  2.9G   724.0M     2.2G   4096
/vendor                238.1M   178.3M    59.8M   4096
/cache                  90.5M    72.0K    90.4M   4096
/persist                11.7M   120.0K    11.6M   4096
/firmware               86.0M    55.4M    30.6M   16384
/storage               900.9M     0.0K   900.9M   4096
/data                   10.6G   181.2M    10.4G   4096
/mnt/runtime/default/emulated    10.6G   181.2M    10.4G   4096
/storage/emulated       10.6G   181.2M    10.4G   4096
/mnt/runtime/read/emulated    10.6G   181.2M    10.4G   4096
/mnt/runtime/write/emulated    10.6G   181.2M    10.4G   4096

下面在吧编译处理的数据做一些对比:

编译完成后会上成几个镜像文件:

-rw-r--r--  1 danmo danmo  11732264 3月   1 11:21 boot.img
-rw-r--r--  1 danmo danmo   5824660 3月   1 11:54 cache.img
-rw-rw-r--  1 danmo danmo   1284185 3月   1 11:21 ramdisk.img
-rw-r--r--  1 danmo danmo  12809516 3月   1 11:21 recovery.img
-rw-rw-r--  1 danmo danmo 831158968 3月   1 11:54 system.img
-rw-r--r--  1 danmo danmo 141081244 3月   1 11:54 userdata.img 

 

我们已经得到了手机硬件的信息在linux kernel中的管理方式,镜像文件已经通过源码编译出来,现在我们使用系统工具镜像文件放入不同的分区中去:

fastboot flash boot out/target/product/bullhead/boot.img
fastboot flash recovery out/target/product/bullhead/recovery.img
fastboot flash system out/target/product/bullhead/system.img
fastboot flash userdata out/target/product/bullhead/userdata.img
fastboot flash cache out/target/product/bullhead/cache.img

 

 

 

三、安卓重新定义分区表

四、googlenexus5x编译安卓原生android源码镜像

针对不同的机型查看分区信息
cat /proc/mtd
cat /proc/emmc
cat /proc/partitions
ls -l /dev/block/platform/*/by-name/
http://www.cnblogs.com/shangdawei/p/4514128.html

dd if=/dev/block/mmcblk0p13 of=/data/local/tmp/boot.img

查看系统分区:http://www.joenchen.com/archives/1167

从新分区:http://www.cnblogs.com/freeliver54/archive/2013/06/26/3157599.html

分区操作:http://bbs.ydss.cn/thread-496703-1-1.html

详细分区内容:http://www.cnblogs.com/shangdawei/p/4514128.html

 

parted工具下载链接:http://download.csdn.net/detail/tomggx/9684189

你可能感兴趣的:(rom学习篇)