Android framework version
net11.0-android, Microsoft.Android.Sdk.Darwin 36.99.0-preview.5.308
Affected platform version
.NET SDK 11.0.100-preview.5.26302.115 (.NET 11 Preview 5), VS Code .NET MAUI extension 1.16.53
Description
dotnet build -t:Run with Fast Deployment enabled (the default for Debug) fails with XA0126 when deploying to an AOSP (default tag) arm64 emulator. The app is never installed. The same project builds and runs once EmbedAssembliesIntoApk=true is set, which disables Fast Deployment. -p:_FastDeploymentDiagnosticLogging=true shows the underlying cause: the run-as step reports the package is unknown, and the subsequent push into the app-private files/.__tools__ directory is denied.
Steps to Reproduce
-
dotnet new maui -n DogfoodApp
-
Boot an AOSP system image emulator: API 34, default/arm64-v8a tag (created via avdmanager, not a google_apis image).
-
Ensure the app is not already installed: adb uninstall com.companyname.dogfoodapp
-
Build and run with Fast Deployment and diagnostic logging:
dotnet build -t:Run -p:Configuration=Debug -f net11.0-android -p:AdbTarget="-s emulator-5554" -p:EmbedAssembliesIntoApk=false -p:_FastDeploymentDiagnosticLogging=true -bl:fastdeploy.binlog
Did you find any workaround?
Yes. Set EmbedAssembliesIntoApk=true for Debug Android, which disables Fast Deployment. The app then deploys and runs:
<PropertyGroup Condition="'$(Configuration)' == 'Debug' And $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
</PropertyGroup>
Relevant log output
Fast Deployment diagnostic output (_FastDeploymentDiagnosticLogging=true):
RunShellCommand emulator-5554 "run-as" "com.companyname.dogfoodapp" "pwd"
pwd returned: run-as: unknown package: com.companyname.dogfoodapp
RunShellCommand emulator-5554 "run-as" "com.companyname.dogfoodapp" "cat" "files/.__tools__/version"
cat returned: cat: files/.__tools__/version: No such file or directory
RunShellCommand emulator-5554 "run-as" "com.companyname.dogfoodapp" "mkdir" "-p" "files/.__tools__"
Installing FastDev Tool files/.__tools__/xamarin.find for arm64-v8a
Failed to push xamarin.find to files/.__tools__/xamarin.find. Mono.AndroidTools.AdbException: couldn't create file: Permission denied
deploy.error.code: XA0126
Error:
Xamarin.Android.Common.Debugging.targets(333,5): error XA0126: Unable to copy Fast Deployment tools to 'files/.__tools__/xamarin.find' on the target device. This device might not be compatible with Fast Deployment.
Full binlog attached: fastdeploy.binlog.
Environment
| Component |
Version |
| Host |
macOS (Darwin), arm64 |
| .NET SDK |
11.0.100-preview.5.26302.115 |
| Android SDK pack |
Microsoft.Android.Sdk.Darwin 36.99.0-preview.5.308 |
| Emulator |
36.5.10.0 |
| adb |
1.0.41 |
| AVD |
API 34 (Android 14, UpsideDownCake), default/arm64-v8a |
Analysis
Fast Deployment pushes its helper tools into the app-private files/ directory via run-as. On this AOSP (default tag) arm64 image, run-as returns unknown package and the push into files/.__tools__ fails with Permission denied, so xamarin.find is never installed and the build aborts with XA0126. The package is never installed by the run, so this is not a stale-install issue. It reproduces specifically on the default (AOSP) system image; google_apis images may behave differently.
Android framework version
net11.0-android, Microsoft.Android.Sdk.Darwin 36.99.0-preview.5.308
Affected platform version
.NET SDK 11.0.100-preview.5.26302.115 (.NET 11 Preview 5), VS Code .NET MAUI extension 1.16.53
Description
dotnet build -t:Runwith Fast Deployment enabled (the default for Debug) fails withXA0126when deploying to an AOSP (defaulttag) arm64 emulator. The app is never installed. The same project builds and runs onceEmbedAssembliesIntoApk=trueis set, which disables Fast Deployment.-p:_FastDeploymentDiagnosticLogging=trueshows the underlying cause: therun-asstep reports the package is unknown, and the subsequent push into the app-privatefiles/.__tools__directory is denied.Steps to Reproduce
dotnet new maui -n DogfoodAppBoot an AOSP system image emulator: API 34,
default/arm64-v8atag (created viaavdmanager, not agoogle_apisimage).Ensure the app is not already installed:
adb uninstall com.companyname.dogfoodappBuild and run with Fast Deployment and diagnostic logging:
Did you find any workaround?
Yes. Set
EmbedAssembliesIntoApk=truefor Debug Android, which disables Fast Deployment. The app then deploys and runs:Relevant log output
Fast Deployment diagnostic output (
_FastDeploymentDiagnosticLogging=true):Error:
Full binlog attached:
fastdeploy.binlog.Environment
default/arm64-v8aAnalysis
Fast Deployment pushes its helper tools into the app-private
files/directory viarun-as. On this AOSP (defaulttag) arm64 image,run-asreturnsunknown packageand the push intofiles/.__tools__fails withPermission denied, soxamarin.findis never installed and the build aborts withXA0126. The package is never installed by the run, so this is not a stale-install issue. It reproduces specifically on thedefault(AOSP) system image;google_apisimages may behave differently.