heimdall/heimdall
Henrik Grimler 60ab9bbaff
FlashAction: Make sure file fit partition before flashing
Partition size is calculated as block count times a block size of 512
for DeviceType 2 and 4096 for DeviceType 8.

Flashing stock android on some devices fail due to some partitions
being too small for the corresponding file.  This is the case on
klimtlte (and other exynos5420 devices), where sboot.bin does not fit
into the BOOTLOADER partition.

Tests done:

* Flash stock android (A500FXXS1CSB2) to a5lte, works fine
* Flash stock android (I9300XXUGPE1) to i9300, works fine
* Flash stock android (I9505XXUPQG1) to i9505, works fine
* Flash stock android (G930FXXU8ETI2) to herolte (with block
  size 4096), works fine
* Flash stock android (T705XXU1CPL1) to klimtlte, fails due to
  BOOTLOADER partition being smaller than sboot.bin, the file has a
  size of 1148160, and the partition 2046*512=1047552
2021-12-16 16:05:42 +01:00
..
source FlashAction: Make sure file fit partition before flashing 2021-12-16 16:05:42 +01:00
60-heimdall.rules Renamed udev rules file and explictly added /usr/include to the include search path for Heimdall Frontend on UNIX systems. 2013-06-04 23:00:55 +10:00
CMakeLists.txt Remove some extra whitespace and convert some spaces to tabs 2021-12-10 09:46:30 +01:00