Skip to content

Handle USB device disconnection during flashing #21

Description

@ashishsinghbora

Problem Statement

A user may physically remove the USB device while FlashCore is writing.

The application must detect this situation and never report a false successful flash.

Proposed Solution / Enhancement

Detect USB device removal during an active flash.

When disconnection occurs:

  • Stop pending operations.
  • Cancel the flash safely.
  • Release USB resources.
  • Update application state.
  • Report a clear failure to the user.

Add automated tests using a fault-injecting BlockDevice where possible.

Architectural Layer Impacted

USB Layer / Flash Engine / Android Integration

Alternatives Considered

Ignoring disconnection errors could leave the target partially written while the UI reports success.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingphase:safetyPhase: Device safety

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions