Payload.bin to Super.img

黑鲨手机 进不去恢复模式

黑鲨手机 重复重启

原始链接:Kpfc白中白

1
2
3
4
5
6
7
8
9
10
11
12
13
#黑鲨游戏手机3s# #黑鲨游戏手机3Pro#
有没有一些比较喜欢倒腾刷系统的黑鲨3机友有时候遇到那种super内部分区逻辑损坏,而无法进入官方recovery又没办法进入twrp卡刷救砖,无论如何进入recovery分区都会卡回bootloader(fastboot)模式的情况呢?
这种情况一般只有刷入super.img的镜像才能解决,可是黑鲨3的super分区可是15gb啊,求助于别人就算提取了,别人也不得不面临一个困扰的选择,要么用电脑的压缩软件压缩一下再上传,要么直接上传,然而就算是电脑用7z+极限压缩最终也还是有7gb多一点或者7.5gb左右(这个看电脑性能而决定),上传这么大的文件无论是怎么样也不方便,最大的问题就是得等了,上传完之后你又得下载,下载完后还得解压,解压后还得刷入,可能一套下来大半天没了受虐滑稽受虐滑稽
今天提供一个可调节super内部逻辑分区super.img,只有392kb左右(蓝奏云内的是我压缩后的大小,只有2.7kb)
这个super.img非常的小,不过它的作用也仅限于调节super内部的分区逻辑,损坏的super逻辑分区被修复后,可能你也就可以进入recovery分区了此时可以通过刷入twrp卡刷全量包救砖或者是通过我的线刷包来救砖都是可以的,如果刷入此super.img还是无法重启至recovery分区那就得让人提取了受虐滑稽受虐滑稽受虐滑稽,后续有空再搞个真的super线刷包吧,没解压7gb多,解压后18.4gb左右,所以可能你需要7gb+18.4gb的地方来存放才行。
还有就是提供一个官方recovery的镜像,可能有时候,真的需要官方recovery又找不到别人给你提取,这个可以帮到你(黑鲨3提取的)受虐滑稽
(图中的蓝奏云网盘文件下载后需要解压才可以使用!!!)

蓝奏云下载,
查看链接:https://wwac.lanzouf.com/b00qlarsd
ht删tps://ww删ac.lanzouf.c删om/b00qlarsd
密码:kpfc
(我分享的东西一般是不会有密码的,这次加上是因为蓝奏云改变了政策,需要会员才能无密码分享)

TIPS

COMMAND

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
fastboot getvar partition-size:super
#partition-size:super: 0x3C0000000
#Finished. Total time: 0.005s

unzip 20200304174041-klein-ota-signed_by_xiaomi_72ffccab1dc9d94658fa95c73b795489.zip
cd 20200304174041-klein-ota-signed_by_xiaomi_72ffccab1dc9d94658fa95c73b795489

wget https://github.com/Exynos-nibba/lpunpack-lpmake-mirror/archive/refs/heads/Linux-debian.zip
unzip Linux-debian.zip && rm Linux-debian.zip

otadump payload.bin
docker run -it --rm -v "${PWD}/:/app" ubuntu bash

cd /app/lpunpack-lpmake-mirror-Linux-debian/
sh install.sh
#Installing lpunpack and lpunpack!
#cp: cannot stat 'binary/lpunpack': No such file or directory
#cp: cannot stat 'binary/lpmake': No such file or directory
#Finished installing!
#invoke bin using lpunpack for lpunpack or lpmake for lpmake

cd /app/extracted_*

stat -c '%n %s' vendor.img
stat -c '%n %s' system.img
stat -c '%n %s' product.img
#vendor.img 1099173888
#system.img 4049526784
#product.img 325869568

echo $((0x3C0000000))
#16106127360
echo $((5364260864+1099173888+325869568))
#6789304320

lpmake \
--metadata-size 65536 \
--super-name super \
--metadata-slots 3 \
--device super:16106127360 \
--group main:7084945408 \
--partition system:readonly:5364260864:main --image system=./system.img \
--partition vendor:readonly:1394814976:main --image vendor=./vendor.img \
--partition product:readonly:325869568:main --image product=./product.img \
--sparse \
-virtual-ab \
--output ./super.img
#lpmake I 08-27 22:04:37 34 34 builder.cpp:1012] [liblp]Partition system will resize from 0 bytes to 4049526784 bytes
#lpmake I 08-27 22:04:37 34 34 builder.cpp:1012] [liblp]Partition vendor will resize from 0 bytes to 1099173888 bytes
#lpmake I 08-27 22:04:37 34 34 builder.cpp:1012] [liblp]Partition product will resize from 0 bytes to 325869568 bytes
#Invalid sparse file format at header magic
#Invalid sparse file format at header magic
#Invalid sparse file format at header magic

exit ## exit docker

cd extracted_*
fastboot flash super super.img

XRSec has the right to modify and interpret this article. If you want to reprint or disseminate this article, you must ensure the integrity of this article, including all contents such as copyright notice. Without the permission of the author, the content of this article shall not be modified or increased or decreased arbitrarily, and it shall not be used for commercial purposes in any way