At least Samsung Galaxy series devices support download mode(also known as Odin mode or flash mode) which usually can be accessed by pressing down specific buttons while powering on the phone. Is this download mode on a small separate partition on internal-storage like recovery mode? Or is it device-dependent?
Depends on how corporate paranoia is going at the time or their design tactics. A lot of Samsung's download mode is coded within the secondary bootloader. I'm not seeing a non .pdf that I'm happy with but Many references are easily found around the worldwide web. Keywords: secondary bootloader. (edit added detail below)
First attempt to add more details was too long. incase you want more details about the process involved some links at the. Bottom to give a base for research.
Per Samsung knox website refer to PG. 7 under Boot Loader/ Primary Boot Loader/ Secondary Boot Loader: glossary of terms
The SBL adds functions for erase and programming of flash memory and EEPROM; it also handles the actual download of new or updated software. This allows a minimum ROM utilization by the PBL.
Now compare it to what Odin mode does and You will notice similarities. That fact that the bootloader itself can be used as a gateway to obtain sensitive corporate documents. Including the fact that both Qualcomm and Samsung Knox have multiple defense contracts. Makes it tough to find officially supported documentation such as spec sheets or R&D documentation but not impossible.
Alright. From what I gather, it is in either a separate partition "SBL1" and/or it is in a file called sbl.bin. See here for the partition names/ locations. And, yes, it is chain fire's triangle away which is featured in the post, but it seems that the flash counter is stored there, among other things. So I downloaded a partition viewer, looked for, and found the two partitions he mentions: