I am trying, following this tutorial, to re-package a super.img
file, but am confused by lpmake.
I am trying to package the following 3 images:
partition | size |
---|---|
lineage-18.1-20220511-UNOFFICIAL-arm64_avS.img | 2035568640 |
vendor.img | 312594432 |
product.img | 1945939968 |
total | 4294103040 |
using the command
lpbinary/binary/lpmake \
--metadata-size 65536 --metadata-slots 1 --device super:4294103040 \
--group main:4294103040 --partition system:readonly:2035568640:main \
--image system=./lineage-18.1-20220511-UNOFFICIAL-arm64_avS.img \
--partition vendor:readonly:312594432:main --image vendor=./vendor.img \
--partition product:readonly:1945939968:main --image product=./product.img \
--sparse --output ./super.new.img
and I get back:
lpmake I 06-14 05:43:50 7411 7411 builder.cpp:1012] [liblp]Partition system will resize from 0 bytes to 2035568640 bytes
lpmake I 06-14 05:43:50 7411 7411 builder.cpp:1012] [liblp]Partition vendor will resize from 0 bytes to 312594432 bytes
lpmake E 06-14 05:43:50 7411 7411 builder.cpp:698] [liblp]Not enough free space to expand partition: product
Not enough space on device for partition product with size 1945939968
I don't know the size of my super partition, so I simply set --device super:4294103040
, thinking that the sum of the images should hold on a partition of the same size.
Why is this not working? Does the partition needs to be bigger than the image? If yes, by which factor?
readonly
flag. How can I decide?