A small wrapper over LibUsbDotNet for easy and convenient communication with mobile devices in Fastboot mode.
var fb = new Fastboot();
// Connect to first available device
fb.Connect();
// Get product name (generic variable)
var product = fb.Command("getvar:product"); // Example output: davinci
// Print serial number
Console.WriteLine(fb.GetSerialNumber());
// Print product name
Console.WriteLine(product.Payload);
// Upload local file with path
fb.UploadData("recovery.img");
// or with FileStream
fb.UploadData(new FileStream("recovery.img", FileMode.Open));
// Flash uploaded data to recovery partition
var res = fb.Command("flash:recovery");
// Print status
Console.WriteLine(res.Status); // Example output: Okay
// Boot uploaded ramdisk
fb.Command("boot");
Wait for any device, timeout: 25 seconds.
Connect to first available device.
Disconnect the device and dispose some resources.
Get device serial number.
Send command (as bytes array) and read response.
Send command (as simple string) and read response.
Upload data from FileStream
.
Upload data from specified file.
Get an array of serial numbers of connected devices.
- Status:
Status
- status convered from header - Payload:
string
- response from device - RawData:
byte[]
- raw response
- Data
- Fail
- Info
- Okay
- Unknown