NOTICE: Builds fail on tarvis ci since i have insufficent credits (migrate to git workflow wen)
I have migrated it to github workflows :)
A small wrapper over LibUsbDotNet for easy and convenient communication with mobile devices in Fastboot mode.
var fastboot = new Fastboot();
fastboot.Connect();
Console.WriteLine("Connected.");
Console.WriteLine("Executing: fastboot reboot-fastboot");
fastboot.Reboot(Fastboot.RebootOptions.Fastbootd); // this reboots your phone into the userspace fastboot
var fastboot = new Fastboot();
fastboot.Connect();
Console.WriteLine("Connected.");
Console.WriteLine("Executing: fastboot reboot-recovery"); // reboots your phone into recovery mode
fastboot.Reboot(Fastboot.RebootOptions.Recovery);
Console.WriteLine("Your device should be in Recovery Mode.");
var fastboot = new Fastboot();
fastboot.Connect();
Console.WriteLine("Connected.");
fastboot.SendOemCommand("unlock"); // this sends the oem command unlock to the phone to then prompt if the bootloader should be unlocked
var fastboot = new Fastboot();
fastboot.Connect();
Console.WriteLine("Connected.");
fastboot.Boot("//temp/boot.img"); // this sends the boot.img and boots it
var fastboot = new Fastboot();
fastboot.Connect();
Console.WriteLine("Connected.");
fastboot.Flash("//temp/system.img","system_a"); // this sends the system.img and and flashes it to the partition: system_a
var fastboot = new Fastboot();
fastboot.Connect();
Console.WriteLine("Connected.");
fastboot.ResumeBoot(); // this is the equivalent of fastboot continue