1

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?

4
  • super = group main + metadata-size. sure you want the readonly flag?
    – alecxs
    Jun 15, 2022 at 19:13
  • @alecxs a. How do you know the metadata-size? b. I am not sure I want the readonly flag. How can I decide?
    – Clément
    Jun 15, 2022 at 21:20
  • lineageos comes without google bloat. some people want install OpenGApps or microG to get google play services functional, therefore system must mounted rw
    – alecxs
    Jun 16, 2022 at 19:33
  • @alecxs Thanks a lot, I was not aware of this. In my case (where I don't want to install OpenGApps or microG), I believe it does not change anything, but I am glad I know the reason why now.
    – Clément
    Jun 16, 2022 at 19:45

0

You must log in to answer this question.

Browse other questions tagged .