首页 > 编程知识 正文

Android刷机包,安卓手机刷机包

时间:2023-05-05 02:48:14 阅读:183770 作者:2841

作者:ghostry

发布时间:2018-02-04

浏览: 3935

转载注明出处: https://blog.ghostry.cn/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

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。