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
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
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