失眠网,内容丰富有趣,生活中的好帮手!
失眠网 > android rom打包解包工具 Android刷机包解包打包

android rom打包解包工具 Android刷机包解包打包

时间:2023-06-10 17:34:02

相关推荐

android rom打包解包工具 Android刷机包解包打包

作者:ghostry

发布时间:-02-04

浏览: 3921

转载注明出处: /technique/852.html

#安装命令

sudo apt-get install android-tools-adb android-tools-fastboot android-tools-fsutils abootimg

#每个工具的用途,根据需要安装

android-tools-adb

Android Debug Bridge CLI tool

android-tools-fastboot

Android Fastboot protocol CLI tool

android-tools-fsutils

Android ext4 utilities with sparse support

abootimg

Tool to read/write/update android boot images

system.img有可能有几种格式。Android sparse image,Linux rev 1.0 ext4 filesystem data,sfs

Ubuntu下有转化工具。//sparse image转化成为ext4的raw imge

Usage: simg2img

//ext4的raw image to sparse image

Usage: img2simg []

ext4文件格式的可以直接mountmount system.img /mnt/system

挂载后修改完umount

如果原来就是ext4直接用就好,如果原来是sparse就转换一下。

sfs格式的也可以直接挂载mount -o loop system.sfs

挂载后可以看到里边有一个ext4格式的镜像,再次挂载就好了。

boot.img是文件组合在一起的。使用abootimg工具可以解包打包。

操作命令mkdir boot && cd boot

abootimg -x ../boot.img

得到这三个文件 :bootimg.cfg initrd.img zImage

initrd.img文件的解包file initrd.img

initrd.img: gzip compressed data, from Unix #可以看到是一个gzip的压缩文件

下面是解压initrd.img文件的命令mkdir initrd

cd initrd

cat ../initrd.img | gunzip | cpio -vid

解压上面的initrd.img后,可以看到非常多的文件

上面编辑完后,重新打包命令如下cd initrd

find . | cpio --create --format='newc' | gzip -9 > ../myinitd.img

新写打包boot.imgabootimg --create myboot.img -f bootimg.cfg -k zImage -r myinitrd.img

下面的命令可以打印出myboot.img文件中的config信息abootimg -i myboot.img

iptables端口映射后php获取客户端ip问题

下一篇:用docker安装gitlab

如果觉得《android rom打包解包工具 Android刷机包解包打包》对你有帮助,请点赞、收藏,并留下你的观点哦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。