看看周边?

Life's not Good 刷机主题T恤

跳转淘宝

查看LGE.FUN的最新内容

该公众号会推送LGE社区LGE下载站和G7、黑砖刷机手册的网站最新消息,以及桌面刷机套件刷级亡灵的更新消息。
就是说某天站点炸了应该能通知上

如何在Android环境内提取/写入Twrp的RamDisk

我不会教你很详细

环境

下载应用:Termux并配置可用后执行下方指令

apt update && apt upgrade #更新
apt install make clang git #安装
git clone https://github.com/ggrandou/abootimg.git #下载
cd abootimg && make #配置程序
su#配置环境 
cp ./abootimg /system_root/bin/
abootimg --help

提取当前boot

cd /sdcard/*任意文件夹路径,想不出来可以把这段删了,包括星号。*
dd if=/dev/block/by-name/boot_a of=./boot

解开带TWRP的Boot

abootimg -x xxxxxboot.img

解完之后会得到三个文件

zlmage
bootimg.cfg
initrd.img

留下initrd.img其他的都撒了(骨灰都给你羊了)

把initrd.img写自己想要的BOOT

abootimg -u xxxxxboot.img -r initrd.img 

有时候会报错说啥尺寸太大塞不进啥的就像这样

20f.img: updated is too big for the Boot Image (30015488 vs 25575424 bytes)`

这时候你就可以在指令后面加上个-c "bootsize=xxxxxxxx"就像这样

abootimg -u xxxxxboot.img -r initrd.img -c "bootsize=30015488"

写人Boot

ls #保证你能看到你编译的boot的名字
dd if=*编译的好了的boot的地址* of=/dev/block/by-name/boot_a #写入boot_a
dd if=*编译的好了的boot的地址* of=/dev/block/by-name/boot_b #写入boot_b

成了

没有成功启动也没关系,试一下别的源吧!本站还准备了很多教程,如果你喜欢这篇文章请多多为我投票吧~下滑后点击左上角的菜单键查看更多吧!