FirmwareKit.Payload.Creator
1.0.0
.NET 6.0
This package targets .NET 6.0. The package is compatible with this framework or higher.
.NET Standard 2.0
This package targets .NET Standard 2.0. The package is compatible with this framework or higher.
dotnet add package FirmwareKit.Payload.Creator --version 1.0.0
NuGet\Install-Package FirmwareKit.Payload.Creator -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FirmwareKit.Payload.Creator" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FirmwareKit.Payload.Creator" Version="1.0.0" />
<PackageReference Include="FirmwareKit.Payload.Creator" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add FirmwareKit.Payload.Creator --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: FirmwareKit.Payload.Creator, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package FirmwareKit.Payload.Creator@1.0.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=FirmwareKit.Payload.Creator&version=1.0.0
#tool nuget:?package=FirmwareKit.Payload.Creator&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
FirmwareKit.Payload
A .NET Standard library for parsing and extracting Android OTA (Over-The-Air) payload files.
Features
- Parse and extract Android OTA payload.bin files
- Support for both local files and remote URLs
- Handle ZIP-wrapped payloads
- Extract specific partitions or all partitions
- Support for HTTP range requests for efficient remote access
- Comprehensive error handling with custom exceptions
Project Structure
FirmwareKit.Payload/
├── Core/ # Core functionality for payload parsing
│ ├── PayloadParser.cs # Main public API for parsing and extraction
│ ├── PayloadExtractor.cs# Handles partition extraction
│ ├── OperationProcessor.cs# Processes individual install operations
│ ├── PayloadHeader.cs # Reads payload header
│ └── BigEndianReader.cs # Big-endian data reading utilities
├── IO/ # Input/output utilities
│ ├── HttpOffsetStream.cs# Seekable stream over HTTP resource section
│ └── HttpRangeStream.cs # Seekable stream over entire HTTP resource
├── Remote/ # Remote resource handling
│ ├── RemotePayloadReader.cs # Utilities for remote payloads
│ └── RemoteZipReader.cs # Utilities for remote ZIP files
├── Exceptions/ # Custom exception types
│ └── PayloadExceptions.cs # Payload-related exceptions
├── Models/ # Data models
│ ├── PayloadMetadata.cs # Parsed payload metadata
│ └── UpdateMetadata.cs # Auto-generated Protobuf types
└── Payload.cs # Public API entry point
Installation
NuGet Package
Install-Package FirmwareKit.Payload
Build from Source
git clone https://github.com/Uotan-Dev/FirmwareKit.Payload.git
cd FirmwareKit.Payload
dotnet build FirmwareKit.Payload/FirmwareKit.Payload.csproj -c Release
Usage
Basic Usage
using FirmwareKit.Payload;
// Get payload metadata from local file
var metadata = PayloadParser.GetPayloadMetadata("payload.bin");
// Get partition information
var partitions = PayloadParser.GetPartitionInfo("payload.bin");
// Extract all partitions
PayloadParser.Extract("payload.bin", outputDir: "./output");
// Extract specific partitions
PayloadParser.Extract("payload.bin", new[] { "boot", "system" }, "./output");
Remote URL Support
// Get metadata from remote URL
var metadata = await PayloadParser.GetPayloadMetadataFromUrlAsync("https://example.com/update.zip");
// Extract partitions from remote URL
await PayloadParser.ExtractFromUrlAsync("https://example.com/update.zip", outputDir: "./output");
// Extract only boot partitions
await PayloadParser.ExtractBootFromUrlAsync("https://example.com/update.zip", "./output");
API Reference
PayloadParser Class
| Method | Description |
|---|---|
GetPayloadMetadata(string filepath) |
Reads payload metadata from a local file |
GetPayloadMetadataAsync(string filepath) |
Asynchronously reads payload metadata |
GetPartitionInfo(string filepath) |
Gets partition size information |
Extract(string filepath, string[]? extractFiles, string? outputDir) |
Extracts partitions from local file |
ExtractAsync(string filepath, string[]? extractFiles, string? outputDir) |
Asynchronously extracts partitions |
ExtractAndroidMetadata(string filepath, string? outputPath) |
Extracts Android metadata file |
GetPayloadMetadataFromUrlAsync(string url) |
Gets metadata from remote URL |
ExtractFromUrlAsync(string url, string[]? extractFiles, string? outputDir) |
Extracts partitions from remote URL |
ExtractBootFromUrlAsync(string url, string? outputDir) |
Extracts boot partitions from remote URL |
Dependencies
- Google.Protobuf - Protobuf serialization
- BrotliSharpLib - Brotli decompression
- BsDiff - BsDiff patch support
- SharpCompress - BZip2/XZ decompression
- ZstdSharp.Port - Zstd decompression
License
This project is licensed under the MIT License - see the LICENSE file for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- BrotliSharpLib (>= 0.3.3)
- FirmwareKit.Payload.Reader (>= 1.0.0)
- Google.Protobuf (>= 3.35.0)
- SharpCompress (>= 0.48.1)
- System.Memory (>= 4.6.3)
- ZstdSharp.Port (>= 0.8.8)
-
.NETStandard 2.1
- BrotliSharpLib (>= 0.3.3)
- FirmwareKit.Payload.Reader (>= 1.0.0)
- Google.Protobuf (>= 3.35.0)
- SharpCompress (>= 0.48.1)
- ZstdSharp.Port (>= 0.8.8)
-
net10.0
- BrotliSharpLib (>= 0.3.3)
- FirmwareKit.Payload.Reader (>= 1.0.0)
- Google.Protobuf (>= 3.35.0)
- SharpCompress (>= 0.48.1)
- ZstdSharp.Port (>= 0.8.8)
-
net6.0
- BrotliSharpLib (>= 0.3.3)
- FirmwareKit.Payload.Reader (>= 1.0.0)
- Google.Protobuf (>= 3.35.0)
- SharpCompress (>= 0.48.1)
- ZstdSharp.Port (>= 0.8.8)
-
net8.0
- BrotliSharpLib (>= 0.3.3)
- FirmwareKit.Payload.Reader (>= 1.0.0)
- Google.Protobuf (>= 3.35.0)
- SharpCompress (>= 0.48.1)
- ZstdSharp.Port (>= 0.8.8)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on FirmwareKit.Payload.Creator:
| Package | Downloads |
|---|---|
|
FirmwareKit.Payload
A .NET Standard library for parsing and extracting Android OTA payload.bin files. This meta-package includes Reader, Creator, and Modifier modules. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 42 | 5/23/2026 |