-
Notifications
You must be signed in to change notification settings - Fork 31
Description
Summary
Add AdbRunner class to Xamarin.Android.Tools.AndroidSdk to wrap adb CLI operations for device management.
Background
The MAUI DevTools CLI and IDE extensions need to list connected devices, start/stop the ADB server, and query device state. This functionality should live in the shared android-tools package.
Reference implementation exists in android-platform-support (internal) Mono.AndroidTools.Adb.
Proposed API Surface
`csharp
public class AdbRunner
{
Task<IReadOnlyList> GetDevicesAsync(CancellationToken ct = default);
Task StartServerAsync(CancellationToken ct = default);
Task KillServerAsync(CancellationToken ct = default);
Task WaitForDeviceAsync(string serial, CancellationToken ct = default);
}
public record AndroidDeviceInfo(string Serial, DeviceState State, string? Model, string? Product, TransportType Transport);
public enum DeviceState { Unknown, Offline, Device, NoDevice, Recovery, Sideload, Unauthorized }
public enum TransportType { Unknown, Usb, Emulator }
`
Consumer
- MAUI DevTools CLI (
maui android devices) — see MAUI DevTools Spec PR - VS/VS Code extensions for device picker
Related
- Add SDK bootstrap and sdkmanager wrapper (move from android-platform-support) #271 (SDK bootstrap)
- MAUI DevTools spec §6.8: Shared Libraries & Code Reuse