Depend on initramfs-minimal for a bunch of samsung devices to make them flashable again
I checked boot partition and boot.img size for some Samsung devices, 9 out of 12 tested need to depend on postmarketos-initramfs-minimal if we want boot.img to fit in boot partition, so it seems likely that there are more Samsung devices that are currently un-flashable.
Note that it is possible to find boot partition size for Samsung devices without having access to the device. The size can be read from the device PIT, which can often be found in stock firmware zip for the device, in the CSC_*.tar.md5
archive (they are also often shared on XDA or similar).
If you have a PIT you can use heimdall to print partitions and look for Partition Name: BOOT
:
$ heimdall print-pit --file /tmp/TRLTE_EUR_OPEN.pit
[ ... ]
--- Entry #16 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 17
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size/Offset: 274440
Partition Block Count: 34816
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: BOOT
Flash Filename: boot.img
FOTA Filename:
[ ... ]
The partition size is then equal to Partition Block Count*512
if Device Type
is 2 (MMC)
, and Partition Block Count*4096
if Device Type
is 8 (UFS)
.
Apart from devices fixed in this MR I tested:
- samsung-dream
- samsung-gts210lte
- samsung-treltexx
where boot.img is small enough to be flashable.
See also discussions in !5000 (closed).