Commit Graph

20 Commits (60ab9bbaffe31f5072195f0dcf352d6e1037bc85)

Author SHA1 Message Date
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
Henrik Grimler 6441c6a6c5
Remove some extra whitespace and convert some spaces to tabs 2021-12-10 09:46:30 +01:00
Mallon Lobjakas c87f5bf210 heimdall: Fix flashing firmwares bigger than 3.5GB 2021-05-03 14:04:53 +02:00
Benjamin Dobell 663bb80f22 Merge branch 'tflash' 2017-05-12 04:34:19 +10:00
Benjamin Dobell bf891c9366 Refactor T-Flash implementation before merging. 2017-05-12 04:32:20 +10:00
Benjamin Dobell 8709370bc4 It's 2017. Where did the years go? 2017-05-12 03:47:37 +10:00
Frédéric Basse aa40b07450 allow higher timeout when switching to t-flash due to sd card initialization 2016-12-24 18:55:56 +01:00
Frédéric Basse 259f5f8973 add T-Flash option in FlashAction 2016-12-24 14:33:39 +01:00
Steffen Pankratz 46c4f8be14 - fixed logical error, wrong variable was used in error message 2016-02-29 18:42:55 +01:00
Benjamin Dobell 082fb091f1 Fixed support for large files (up to 2^32 - 1 bytes)
The Loke protocol supports 32-bit unsigned for the size of files being
flashed. However, POSIX file commands only support 32-bit (signed). As
such we now have platform specific support for larger files.
2014-06-01 14:09:56 +10:00
Benjamin Dobell e6fdafd482 Fixed help output alignment. 2014-05-11 19:26:26 +10:00
Benjamin Dobell ce486f7ecb Removed a few unused variables. 2014-05-07 06:48:00 +10:00
Benjamin Dobell 9f957a1937 Updated copyright notices to 2014 2014-05-06 22:53:10 +10:00
Benjamin Dobell a5452e884a Cleaned up command line interface
- Removed the "--delay <ms>" argument.
- Improved Action usage info.
2014-05-06 21:39:07 +10:00
Benjamin Dobell 3af0c3ad63 Minor code clean up. 2014-05-06 21:39:04 +10:00
Benjamin Dobell 07dcba54fc Update copyright notices, version identifier and documentation for 1.4.0 release. 2013-05-13 00:08:30 +10:00
Benjamin Dobell ebbc3e7cd2 - Removed legacy command line hard-coded partition name parameters.
- As a result of the above two points, there are no "known boot
  partitions", and hence boot partitions are not automatically flashed
  last.
- Made partitions flash in the order in order in which partition arguments
  are specified. Hence, it's recommended that you specify boot partitions
  last.
- Added --usb-level argument that can be used for debugging libusbx, or
  flashing issues in general.
- Removed generally non-functional firmware dumping behaviour.
- Removed auto-resume functionality - Although this feature was definitely
  nice to have; I believe it may be responsible for flashing compatibility
  issues for a variety of devices.
- As a result of the above. In order perform another action after a
  --no-reboot action, you must provide the --resume flag.
- Heimdall Frontend also has support for specifying the --resume flag
  via a GUI. Heimdall Frontend also tries to keep track of your actions
  and enable "Resume" automatically after a "No Reboot" action.
- Refactored quite a few of the actions, and code responsible for flashing
  (particularly PIT file flashing).
- Bumped version to 1.4RC3 *however* this commit is not yet an official
  release candidate. It's still a WIP. In particular build files still
  have not been updated for Linux and OS X.
2013-03-08 00:12:27 +11:00
Benjamin Dobell e0e84b2f7a Fixed --repartition flag parsing bug. 2012-12-01 03:15:02 +11:00
Benjamin Dobell 8ac74126b4 PIT files are no longer always exactly 4096 bytes. Fixed a bug that was a
result of making this assumption.
2012-10-07 23:33:44 +11:00
Benjamin Dobell 6cd6b35c73 Heimdall 1.4 RC1:
- Massive refactoring.
    - Support for Qualcomm based devices.
    - Print PIT from file.
    - Use partition names as arguments e.g. --HIDDEN, --KERNEL, --MOVINAND etc.
    - Heimdall Frontend UI improvements.
    - And much more...
2012-10-02 01:41:25 +10:00