如何对system.img和userdata.img解包,再重新打包
2016-08-17 10:48
645 查看
下载代码仓储 <https://android.googlesource.com/platform/system/extras>: | |
git clone https://android.googlesource.com/platform/system/extras | |
选择对应的版本: | |
cd extras | |
git checkout android-4.1.1_r1 | |
编译 simg2img: | |
cd ext4_utils | |
gcc -o simg2img -lz sparse_crc32.c simg2img.c | |
拆包android镜像文件: | |
cd ../../ | |
./extras/ext4_utils/simg2img system.img system.raw.img | |
./extras/ext4_utils/simg2img userdata.img userdata.raw.img | |
通过mount挂载镜像(Mac osx系统可以使用Paragon's ExtFS): | |
mkdir /mnt/my_system /mnt/my_userdata | |
mount -t ext4 -o loop userdata.raw.img /mnt/my_userdata | |
编译 make_ext4fs: | |
cd extras/ext4_utils | |
gcc -o make_ext4fs -lz make_ext4fs_main.c make_ext4fs.c ext4fixup.c ext4_utils.c allocate.c backed_block.c output_file.c contents.c extent.c indirect.c uuid.c sha1.c sparse_crc32.c wipe.c | |
重新打包镜像: | |
cd ../../ | |
PATH="$PATH:$(pwd)/extras/ext4_utils/make_ext4fs" ./extras/ext4_utils/mkuserimg.sh -s /mnt/my_system_dir my_system.img ext4 /tmp 512M |
相关文章推荐
- mtk打包/解包 boot.img, system.img, userdata.img, or recovery.img
- Linux下 解包/打包 Android 映像文件 system.img, boot.img, ramdisk.img, userdata.img.
- Linux下 解包/打包 Android 映像文件 system.img, boot.img, ramdisk.img, userdata.img.
- MTK的android镜像 解包和打包( boot.img, system.img, userdata.img, or recovery.img)
- Linux下 解包/打包 Android 映像文件 system.img, boot.img, ramdisk.img, userdata.img.
- 如何解包编译重新打包boot.img System.img(转自百度文库)
- ramdisk.img system.img userdata.img介绍及解包、打包方法
- inux下 解包/打包 Android 映像文件 system.img, boot.img, ramdisk.img, userdata.img.
- 解压和打包boot.img,userdata.img,system.img
- 解包system.img, cache.img,修改并重新打包
- [工具] 小白如何修改解包打包system.img
- 如何解包/编辑/打包boot.img文件
- [教程] system.img解包打包的方法,方便菜鸟们制作直刷ROM
- Android ramdisk.img system.img userdata.img
- make system.img, ramdisk.img, userdata.img
- android system.img的解包和打包
- Android ramdisk.img system.img userdata.img 介绍与使用
- 如何解包/编辑/打包boot.img文件
- 如何解包/编辑/打包boot.img文件
- Android 的 ramdisk.img、system.img、userdata.img 作用说明,以及UBoot 系统启动过程