You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Migrate from the AndroidSdk + AndroidSdk.Adbd NuGet packages (v0.35.1, from redth/android-tools) to the official Xamarin.Android.Tools.AndroidSdk NuGet from dotnet/android-tools. This aligns MauiSherpa with the same Android tooling library used by the official maui CLI (dotnet/maui-labs).
Motivation
Single source of truth:dotnet/android-tools is the official Microsoft-maintained package used by dotnet/android and the maui CLI
Feature parity: The official package now includes SdkManager, AvdManagerRunner, EmulatorRunner, AdbRunner, JdkInfo, and JdkInstaller — covering all the functionality we currently get from the AndroidSdk NuGet
Workaround: Keep AndroidSdk.Adbd temporarily for just the watcher, OR poll AdbRunner.GetDevicesAsync() on a timer, OR reimplement the ~185-line ADB socket client
Phase 3: New Features (bonus)
Leverage new APIs not available in current AndroidSdk NuGet:
Summary
Migrate from the
AndroidSdk+AndroidSdk.AdbdNuGet packages (v0.35.1, fromredth/android-tools) to the officialXamarin.Android.Tools.AndroidSdkNuGet from dotnet/android-tools. This aligns MauiSherpa with the same Android tooling library used by the officialmauiCLI (dotnet/maui-labs).Motivation
dotnet/android-toolsis the official Microsoft-maintained package used by dotnet/android and the maui CLISdkManager,AvdManagerRunner,EmulatorRunner,AdbRunner,JdkInfo, andJdkInstaller— covering all the functionality we currently get from theAndroidSdkNuGetMigration Plan
Phase 1: Core NuGet Swap (no blocking issues)
Replace
AndroidSdkNuGet →Xamarin.Android.Tools.AndroidSdkinMauiSherpa.Core.csproj.Rewrite
AndroidSdkService.csto use the new API:AndroidSdk)Xamarin.Android.Tools.AndroidSdk)new AndroidSdkManager()new AndroidSdkInfo(sdkPath:, javaSdkPath:)+new SdkManager()sdkManager.SdkManager.List()SdkManager.ListAsync()→(Installed, Available)sdkManager.SdkManager.Install(pkg)SdkManager.InstallAsync([pkg])sdkManager.SdkManager.Uninstall(pkg)SdkManager.UninstallAsync([pkg])sdkManager.Adb.GetDevices()AdbRunner.GetDevicesAsync()sdkManager.Adb.EmuKill(serial)AdbRunner.StopEmulatorAsync(serial)sdkManager.AvdManager.ListAvds()AvdManagerRunner.GetAvdsAsync()sdkManager.AvdManager.Create(...)AvdManagerRunner.CreateAvdAsync(...)sdkManager.AvdManager.Delete(name)AvdManagerRunner.DeleteAvdAsync(name)sdkManager.Emulator.Start(avd, opts)EmulatorRunner.BootAsync(avd, EmulatorBootOptions)sdkManager.Acquire()SdkManager.BootstrapAsync(targetPath)Rewrite
OpenJdkSettingsService.cs:JdkLocator().LocateJdk()JdkInfo.GetKnownSystemJdkInfos()/GetSupportedJdkInfos()Model mapping:
SdkPackageInfoSdkPackage(same fields)DeviceInfo(Serial, State, Model, IsEmulator)AdbDeviceInfo(richer — has AvdName, Product, TransportId)AvdInfo(Name, Device, Path, Target, BasedOn, Properties)AvdInfo(Name, DeviceProfile, Path)(simpler)Phase 2: Handle Gaps (blocked on upstream issues)
Three features need upstream additions to
dotnet/android-tools:Device profile listing → Add AvdManagerRunner.ListDeviceProfilesAsync() for AVD device profile enumeration dotnet/android-tools#321
avdmanager list deviceoutput directly (same as maui-labs CLI does)Skin enumeration → Add AVD skin enumeration API dotnet/android-tools#322
\/skins/directoryReal-time ADB device tracking → Add ADB device tracking (host:track-devices) for real-time device monitoring dotnet/android-tools#323
AndroidSdk.Adbdtemporarily for just the watcher, OR pollAdbRunner.GetDevicesAsync()on a timer, OR reimplement the ~185-line ADB socket clientPhase 3: New Features (bonus)
Leverage new APIs not available in current
AndroidSdkNuGet:SdkManager.AcceptLicensesAsync())JdkInstaller)EmulatorBootResult(error classification)SdkManager.BootstrapAsync()with progress reportingFiles to Modify
src/MauiSherpa.Core/MauiSherpa.Core.csproj— swap package referencessrc/MauiSherpa.Core/Services/AndroidSdkService.cs— main rewrite (~600 lines)src/MauiSherpa.Core/Services/OpenJdkSettingsService.cs— JDK detection rewritesrc/MauiSherpa.Core/Services/AdbDeviceWatcherService.cs— depends on Phase 2 decisionsrc/MauiSherpa.Core/Interfaces.cs— update model records if neededsrc/MauiSherpa.Core/Handlers/Android/*.cs— update handler return type mappingsUpstream Issues