-
Notifications
You must be signed in to change notification settings - Fork 580
Add ADB wrapper (adb CLI) #12071
Copy link
Copy link
Open
Labels
android-toolsIssues migrated from dotnet/android-tools / relates to the xamarin-android-tools subtreeIssues migrated from dotnet/android-tools / relates to the xamarin-android-tools subtreeneeds-triageIssues that need to be assigned.Issues that need to be assigned.
Milestone
Description
Activity
Metadata
Metadata
Assignees
Labels
android-toolsIssues migrated from dotnet/android-tools / relates to the xamarin-android-tools subtreeIssues migrated from dotnet/android-tools / relates to the xamarin-android-tools subtreeneeds-triageIssues that need to be assigned.Issues that need to be assigned.
Summary
Add
AdbRunnerclass toXamarin.Android.Tools.AndroidSdkto wrapadbCLI 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-toolspackage.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 android devices) — see MAUI DevTools Spec PRRelated