OTA recovery process

I notice that the OTA process and memory map for the electron have a factory-reset area?
When is this used/written to?

Is this understanding of OTA correct:

1) Download device-os part to Flash
2) Verify device-os part
3) Copy to device-os partition
4) Repeat for parts 2 and 3
5) Reset device with new device-os in flash

If part 2 fails, is the entire device-os restored from factory-backup?
We are running into issues flashing device-os parts successfully, and our current logic resumes from the failed part (if part 1 succeeds, but part 2 fails, just re-send part 2).

Do we need to restart the entire device OS upgrade when any part fails? What criterion does the upgrade process use to determine that factory backup should be restored, and can we detect that?
Thanks!

@rickkas7 - would you mind giving this a look? I’m fairly certain I know the answer, but I want to be sure. :slight_smile:

Austen @ahigginscassidy, if you’re experiencing OTA issues - please feel free to open up a support ticket or PM me with a Device ID and a timestamp of a recent issue and I can provide you with some insight from our backend.