SharpEDL 1.0.5
dotnet add package SharpEDL --version 1.0.5
NuGet\Install-Package SharpEDL -Version 1.0.5
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="SharpEDL" Version="1.0.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SharpEDL" Version="1.0.5" />
<PackageReference Include="SharpEDL" />
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 SharpEDL --version 1.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SharpEDL, 1.0.5"
#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 SharpEDL@1.0.5
#: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=SharpEDL&version=1.0.5
#tool nuget:?package=SharpEDL&version=1.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
SharpEDL
Introduce
Warning: This project is experimental supported, more test needed
SharpEDL is a native implementation of Qucalcomm EDL communication using C#
.NET Runtime version 8.0, tested on my device(Redmi 5 plus)
Already implemented:
- Get device info and send programmer under Sahara mode
- Read/Write/Erase partitions
- Sparse file flash
- Parse partition table
- Flash flat build, generate rawprogram files
- Mi device auth/noauth
Get Started
Sahara read device info
SaharaServer server = new SaharaServer { Port = port };
server.DoHelloHandshake(SaharaMode.Command);
string msmid = server.GetMsmHWID();
string pkhash = server.GetOEMPkHash();
int serial = server.GetSerialNum();
int sblVersion = server.GetSblVersion();
Console.WriteLine($"MSM HWID: {msmid}\n" +
$"OEM PK Hash: {pkhash}\n" +
$"SerialNum: {serial}\n" +
$"SBL Version: {sblVersion}");
Sahara send programmer
SaharaServer server = new SaharaServer { Port = port };
// Now at Command mode, let's switch
server.SwitchMode(SaharaMode.ImageTxPending);
var state = server.DoHelloHandshake(SaharaMode.ImageTxPending);
FileStream stream = new FileStream("I:\\tmp\\qc\\mi_noauth_625.mbn", FileMode.Open, FileAccess.Read);
server.SendProgrammer(state.ImageTransfer, stream, (uint)stream.Length);
Readback image
FirehoseServer Server = new FirehoseServer { Port = port };
Server.ProgressChanged += OnProgressChanged; //optional
Server.ReadbackImage(new PartitionInfo
{
Label = "boot",
FileSectorOffset = 0,
StartSector = "790528",
SectorLen = 131072,
BytesPerSector = Server.SectorSize,
Sparse = false,
Lun = 0,
FilePath = "I:\\tmp\\qc\\boot.img"
});
Write sparse partition
FirehoseServer Server = new FirehoseServer { Port = port };
Server.ProgressChanged += OnProgressChanged; //optional
PartitionInfo info = new PartitionInfo
{
Label = "system",
FileSectorOffset = 0,
StartSector = "1054720",
SectorLen = 6291456,
BytesPerSector = Server.SectorSize,
Sparse = true,
Lun = 0,
FilePath = "I:\\tmp\\qc\\system.img"
};
Server.WriteSparseImage(info);
Write unsparse partition
FirehoseServer Server = new FirehoseServer { Port = port };
Server.ProgressChanged += OnProgressChanged; //optional
Server.WriteUnsparseImage(new PartitionInfo
{
Label = "boot",
FileSectorOffset = 0,
StartSector = "790528",
SectorLen = 131072,
BytesPerSector = Server.SectorSize,
Sparse = false,
Lun = 0,
FilePath = "I:\\tmp\\qc\\boot.img"
});
For more examples, view Demo
Credits
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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 was computed. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- System.IO.Ports (>= 9.0.7)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Changelog:
This version allows to use rawprogram files as argument directly.