昨天解包了一天,HIT archive data格式的system.img用simg2img解不了,在网上查了好久,终于把HIT archive data格式的system.img成功挂载,以下把我解包过程中所遇到的问题在这里和大家分享一下,希望能帮到大家。
我的机器环境:ubuntu 12.04 lts(64位)
1,创建一个需要被挂在的目录
# mkdir /mnt/system
2,载入mtd模块
# modprobe mtdblock
3,载入ubi模块(前提你的linux环境以支持ubi模块)
# modprobe ubi
4,载入nandsim来模拟nand设备
# modprobe nandsim first_id_byte=0xec second_id_byte=0xd5 third_id_byte=0x51 fourth_id_byte=0xa6 //- 2GiB, 4096 bytes page.
- 要根据自己机器的情况来选择:
-
modprobe nandsim first_id_byte=0x20 second_id_byte=0x33
- 16MiB, 512 bytes page; -
modprobe nandsim first_id_byte=0x20 second_id_byte=0x35
- 32MiB, 512 bytes page; -
modprobe nandsim first_id_byte=0x20 second_id_byte=0x36
- 64MiB, 512 bytes page; -
modprobe nandsim first_id_byte=0x20 second_id_byte=0x78
- 128MiB, 512 bytes page; -
modprobe nandsim first_id_byte=0x20 second_id_byte=0x71
- 256MiB, 512 bytes page; -
modprobe nandsim first_id_byte=0x20 second_id_byte=0xa2 third_id_byte=0x00 fourth_id_byte=0x15
- 64MiB, 2048 bytes page; -
modprobe nandsim first_id_byte=0xec second_id_byte=0xa1 third_id_byte=0x00 fourth_id_byte=0x15
- 128MiB, 2048 bytes page; -
modprobe nandsim first_id_byte=0x20 second_id_byte=0xaa third_id_byte=0x00 fourth_id_byte=0x15
- 256MiB, 2048 bytes page; -
modprobe nandsim first_id_byte=0x20 second_id_byte=0xac third_id_byte=0x00 fourth_id_byte=0x15
- 512MiB, 2048 bytes page; -
modprobe nandsim first_id_byte=0xec second_id_byte=0xd3 third_id_byte=0x51 fourth_id_byte=0x95
- 1GiB, 2048 bytes page;我昨天解包的时候就是在这里搞错了(我的机器需要4096 bytes page),然后再最后mount的时候老是mount不上,记住这步至关重要! 5,检查加入模块的环境# cat /proc/mtd
dev: size erasesize name mtd0: 10000000 00020000 "NAND simulator partition 0"
# ls -la /dev/mtd*
crw-rw---- 1 root root 90, 0 2013-08-17 20:02 /dev/mtd0 crw-rw---- 1 root root 90, 1 2013-08-17 20:02 /dev/mtd0ro brw-rw---- 1 root disk 31, 0 2013-08-17 20:03 /dev/mtdblock0
6,把system.img直接载到mtd的块设备
dd if=system.img of=/dev/mtdblock0 bs=2048
7,在这里 需要安装mtd-utils工具箱(ubuntu下 直接apt-get install mtd-utils),这一步是将ubi模块与已载入了system.img的mtd模块关联
# ubiattach /dev/ubi_ctrl -m 0
在这里 很多Linux环境会不成功,提示ubiattach: error!: cannot attach mtd0 error 22 (Invalid argument)
此时 可以通过查看dmesg,可以看到
UBI error: validate_ec_hdr: bad VID header offset 4096
我们修改 为
# ubiattach /dev/ubi_ctrl -m 0 -O 4096
到这里,模块载入成功
UBI device number 0, total 2048 LEBs (264241152 bytes, 252.0 MiB), available 0 LEBs (0 bytes), LEB size 129024 bytes (126.0 KiB)
8,挂载该模块到指定目录就OK# mount -t ubifs /dev/ubi0_0 /mnt/system/
http://blog.csdn.net/wise622453/article/details/10062953(大部分源自这里)http://www.androidquestions.org/threads/2192-how-to-mount-android_root-img-as-ubifs-image
相关推荐
把unyaffs与system.img放到同一目录,进入命令模式,运行:unyaffs system.img;windows上的android img解包工具,用于解system.img等文件,不包含打包功能。
只要点击机器人文件,将system.img导入 马上就解包出你所需要的文件
安卓系统boot.img和recovery.img及system.img文件解包打包工具,Windows下使用,适用于联发科及高通芯片
工具: unyaffs,mkyaffs2image ...其中unyaffs有windows版本和linux版本,mkyaffs2image只有linux版本。...按照原system目录的文件结构组织好后,目录复制到linux环境下使用mkyaffs2image重新打包成system.img。
解包boot.img工具解包
linux下的system.img解压和打包工具 解包 unyaffs system.img 打包,system为system.img解包后的目录 mkyaffs2image system?system.img By Tekin
支持img格式解包打包。包括system.img等等 支持super格式的解包打包. 支持任意BR后缀解包打包.制作卡刷包 支持任意DAT后缀解包打包、制作卡刷包 支持内核boot的解包打包. 分解payload格式文件。 支持直接卡刷包分解...
system.new.dat.br解包打包工具,使用方法 brotli.exe -h
2.sdat2img:格式转换工具,用于将「system.new.dat」文件转换为ext4格式的「system.new.img」 3.SystemExtractor:解包工具,用于将「system.new.img」解包 ======================================== 航母一键解包...
ubuntu 解包打包 boot.img 记得查看 readme 问题: libstdc++.so.6: cannot open shared object file: No such file or directory: 原因在于,在13.10 版本中,ia32_libs 被废弃了导致没有32位的lib库。 解决方法 `...
1.将要解包的boot.img拷贝过来,执行脚本source unpack.sh,解包boot.img; 2.进入到文件夹ramdisk,编辑需要的文件,比如init.rc, init.amlogic.board.rc,替换init, 编辑fstab等; 还可以替换内核code,即将out/...
BOOT.img和recovery.img解包打包工具,支持高通和mtk的cpu,手机刷机制作刷机包利器,兼容2012年到2018年的cpu,移植recovery必备工具
2.sdat2img:格式转换工具,用于将「system.new.dat」文件转换为ext4格式的「system.new.img」 3.SystemExtractor:解包工具,用于将「system.new.img」解包 引用说明: 本工具为一套组合使用工具,实测可在Win10...
unpack yafffs 解开 yafffs(包括data img及system img) updata app的话就输入bootimg unpack updata 下面一一说明功能中的参数 unpack updata [文件] [文件]为空时 默认使用UPDATA APP 解开后 会有四个...
软件小,速度快,提取手机rom中的.IMG文件中的内容。提取。是diy手机rom的助手。且还是以.img压缩的文件,查看,解压的好助手。
支持img格式解包打包 支持super格式的解包打包 支持任意BR后缀解包打包 支持任意DAT后缀解包打包 支持recovery和boot的解包打包 分段合并 payload.bin相关功能 一键制作miui的第三方固件 解锁分区 修补boot 分区镜像...
支持安卓7.x的system.new.dat打包解包,转自如有论坛。
里面有详细的说明,但是亲首次运行要安装linux库文件的。