extractFirmware

open suspend override fun extractFirmware(uri: CommonUri, hardware: DeviceHardware, fileExtension: String, preferredFilename: String? = null): FirmwareArtifact?(source)

Extract a matching firmware binary from a platform URI (e.g. content:// or file://) zip archive.

Return

The extracted FirmwareArtifact, or null if no matching file was found.

Parameters

hardware

Used to match the correct binary inside the zip.

fileExtension

The extension to filter for (e.g. ".bin", ".uf2").

preferredFilename

Optional exact filename to prefer within the zip.