I got into phone tinkering and GSI flashing with my old Tecno spark 5 pro this week. I followed a lot of XDA guides on how to flash devices with fastboot and ended up bricking my device about 5 times when experimenting to see which GSI img would work with my phone architecture [system-arm64-ab.img.xz].
[STEP 1] Unpack the super.img which extracts the system, vendor and product images
[STEP 2] You could then replace the stock system image with the gsi.img you wanted to flash (I'm currently trying to flash aosp-arm64-ab-gapps-14.0-20240816.img gotten from here: https://github.com/ponces/treble_aosp/releases)
[STEP 3] Repack the gsi.img, original vendor.img and original product.img into a new super.new.img that could then be flashed onto the phone with a fastboot command.
Unfortunately I ran into a problem with repacking the three images as the gsi.img is too large for my phone's super partition [0x104000000 = 4,362,076,160 bytes]. I know I could probably just find a smaller gsi.img that fits, but finding compatible gsi's for this architecture is a huge pain. I searched if there was a way to resize my super partition and found some tutorials that use TWRP and parted: (https://xdaforums.com/t/guide-dangerous-...n.4315365/) but they don't work with devices with dynamic super partition.
What I'm asking is that is there a way to repartition mtk devices with dynamic super partition? maybe someway to edit the scatter file? Or do I have to find another GSI rom. Thanks for reading and I appreciate any help.
U don't need to go all these ,just use
fastboot reboot fastboot
fastboot delete-logical-partition product
fastboot create-logical-partition product 320
Then go and download the product image of 320kb and flash
fastboot erase system
fastboot flash system (the GSI)
fastboot reboot recovery
And format in recovery