Function forced_fdr::perform_fdr_if_necessary
source · pub async fn perform_fdr_if_necessary()
Expand description
Performs a Factory Data Reset(FDR) on the device “if necessary.”
Necessity is determined by comparing the index stored in
forced-fdr-channel-indices.config
for the device’s ota channel against
an index written into storage that represents the last successful FDR.
forced-fdr-channel-indices.config
is provided on a per board basis using
config-data.
§Errors
There are numerous cases (config missing, failed to read file, …) where the library is unable to determine if an FDR is necessary. In all of these cases, the library will not FDR.