Uh oh!
There was an error while loading. Please reload this page.
[FastDeploy2] Copy staged files into private storage - #12417
Closed
simonrozsival wants to merge 1 commit into
Closed
[FastDeploy2] Copy staged files into private storage#12417simonrozsival wants to merge 1 commit into
simonrozsival wants to merge 1 commit into
Conversation
Use transient adb-writable staging, copy changed files into the app-private override directory with run-as, and remove staging after every deployment attempt. This replaces persistent symlinks and avoids needing orphan staging cleanup. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6229e450-fd9b-4a58-b016-d8218995998c
Contributor
There was a problem hiding this comment.
Pull request overview
This PR changes the FastDeploy2 implementation to stage updated files under /data/local/tmp/fastdeploy2/<package>/<user> and then copy them into the app-private override directory using run-as cp -p, removing the previous symlink/copy mode split. It also ensures staging is removed after every deployment attempt and invalidates the prior configuration-cache shape so existing symlink-based installs are safely recreated as regular private files.
Changes:
- Switch FastDeploy2 from symlink-based override updates to copying regular files into app-private storage and always cleaning up transient staging.
- Remove the
_AndroidFastDeployAppFileTransferModeproperty surface area (targets, task parameter, tests, and docs) and update the configuration-cache key accordingly. - Update device/integration tests and documentation to reflect the new “regular file” override behavior and transient staging lifecycle.
Show a summary per file
| File | Description |
|---|---|
| tests/MSBuildDeviceIntegration/Tests/FastDevTest.cs | Update device integration assertions from symlink to regular files; validate transient staging directory is removed after installs. |
| src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/DebuggingTasksTests.cs | Adjust FastDeploy2 warm-state probe parsing tests to match removed remote-staging hash tagging. |
| src/Xamarin.Android.Build.Debugging.Tasks/Xamarin.Android.Common.Debugging.targets | Remove transfer-mode property/validation, update configuration-cache shape, and pass ResetOverrideDirectory into FastDeploy2. |
| src/Xamarin.Android.Build.Debugging.Tasks/Tasks/FastDeploy2.WarmState.cs | Remove remote-staging marker checks from the warm-state probe and associated parsed state. |
| src/Xamarin.Android.Build.Debugging.Tasks/Tasks/FastDeploy2.Manifest.cs | Rework deployment flow to always reset transient staging, copy into private override storage, and remove staging in a finally cleanup. |
| src/Xamarin.Android.Build.Debugging.Tasks/Tasks/FastDeploy2.cs | Remove transfer-mode plumbing and simplify override update logic to “delete then cp -p” for changed files plus manifest marker handling. |
| Documentation/release-notes/11795.md | Update release notes to reflect removal of the transfer-mode property and the new copy-to-private approach. |
| Documentation/guides/FastDeploy2.md | Update guide for transient staging + private copy flow and revise marker/configuration behavior and command compatibility notes. |
Review details
- Files reviewed: 8/8 changed files
- Comments generated: 0
- Review effort level: Lite
simonrozsival
marked this pull request as draft
August 18, 2026 15:20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Alternative to #12310:
/data/local/tmp/fastdeploy2/<package>/<user>stagingrun-as cp -pExisting destination files are removed before copying so
cpcannot follow symlinks left by an older FastDeploy2 deployment.Performance
Head-to-head measurements on
emulator-5554(arm64-v8a), alternating implementation order:The corresponding median
FastDeploy2task times increased by 220 ms for an assembly-only update and 356 ms for a full redeploy. This is the cost of the additional private copy and staging cleanup commands.Validation
dotnet build src/Xamarin.Android.Build.Debugging.Tasks/Xamarin.Android.Build.Debugging.Tasks.csprojdotnet test bin/TestDebug/net10.0/Xamarin.Android.Build.Tests.dll --filter 'Name~FastDeploy2'— 2 passedFastDeploy2RemovesRemoteStagingDirectorydevice test — passedFastDeploymentStrategyCanBeChangeddevice test — passedgit diff --check