1

I'm trying to customize an Android 11 super partition, removing certain apps. I used https://forum.xda-developers.com/t/guide-ota-tools-lpunpack.4041843/ to unpack the super partition, mounted them as read-write using the instructions here and then repacked them as follows:

~/otatools/bin/lpmake \
--metadata-size 65536 \
--metadata-slots 2 \
--device super:2684354560 \
--group qti_dynamic_partitions:2680160256 \
--partition system:readonly:700383232:qti_dynamic_partitions \
--image system=./system.img \
--partition system_ext:readonly:300167168:qti_dynamic_partitions \
--image system_ext=./system_ext.img \
--partition product:readonly:68022272:qti_dynamic_partitions \
--image product=./product.img \
--partition vendor:readonly:304410624:qti_dynamic_partitions \
--image vendor=./vendor.img \
--output ./super.img

The command executes fine with the usual messages about invalid sparse images. But when I flash it using EDL mode, the phone won't boot. Furthermore, 7zip won't open this file like it opens the original super image, it detects it as a different format. It doesn't seem to be a boot verity issue. Obviously, I'm doing something wrong, but what?

6
  • 1
    Does this answer your question? Android Verified Boot and generation of vbmeta image
    – alecxs
    Commented Oct 20, 2021 at 19:03
  • @alecxs No it doesn't, I'm not asking about a vbmeta image and it doesn't look like a verified boot issue to me
    – Ytagger
    Commented Oct 20, 2021 at 20:29
  • @alecxs I think you're right that it's the dm-verity causing the problem. Unfortunately the bootloader cannot be unlocked on this device, and flashing the vbmeta without unlocking does cause the red warning screen.
    – Ytagger
    Commented Oct 21, 2021 at 4:26
  • try to hex patch devinfo partition forum.xda-developers.com/showthread.php?t=4100897
    – alecxs
    Commented Oct 21, 2021 at 10:55
  • I tried that already, but like the article says, it's only for zte phones. My devinfo partition is completely blank. If you look at the source in the Alephsecurity article, you will see that only certain bootloaders store the unlock info in devinfo - not mine, apparently. It looks like the bootloader itself is stored in the modem partition but I have no idea how to patch it.
    – Ytagger
    Commented Oct 21, 2021 at 11:27

1 Answer 1

1

Try replacing readonly with none, and add the flag "--virtual-ab". That did it for me.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .