Function fdr_lib::reset_active_slot

source ·
pub async fn reset_active_slot() -> Result<(), Error>
Expand description

Uses fuchsia.paver FIDL’s BootManager API to set the active slot using the following strategy:

  1. Query for slot-last-set-active
  2. Set the last inactive slot (opposite of the result from 1) to active to reset retry count
  3. Set the result from slot-last-set-active to active

This aims to recover from cases where both slots A and B are marked unbootable. Requires fuchsia.paver.Paver protocol capability.