Repository navigation
[AndroidSdk] Add explicit emulator process environment - #13467
Merged
simonrozsival merged 1 commit intoNov 11, 2026
Merged
simonrozsival merged 1 commit into
simonrozsival merged 1 commit into
Conversation
Copy caller-provided environment and working directory without changing existing constructor behavior. Cover list and launch settings, and consolidate launch argument checks to avoid short boot-timeout races. Co-authored-by: Copilot App <[email protected]>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are identified for the explicit process-environment support added to EmulatorRunner.
No open issues 🎉
What changed in this PR
Adds explicit process-environment support to EmulatorRunner, preparing BootAndroidEmulator for future multithreaded execution without enabling it or changing existing caller behavior.
Changes:
- Adds a factory that copies the supplied environment and working directory for emulator launch and AVD listing.
- Adds tests for copied and inherited process settings, and moves argument checks into the existing boot test instead of relying on short timeouts.
- Records the new factory in all three public API baselines.
| File | Description |
|---|---|
| tests/Xamarin.Android.Tools.AndroidSdk-Tests/EmulatorRunnerTests.cs | Tests process settings and consolidates boot argument checks. |
| src/Xamarin.Android.Tools.AndroidSdk/Runners/EmulatorRunner.cs | Copies and applies explicit process settings through a new factory. |
| src/Xamarin.Android.Tools.AndroidSdk/PublicAPI/netstandard2.0/PublicAPI.Unshipped.txt | Declares the factory for .NET Standard 2.0. |
| src/Xamarin.Android.Tools.AndroidSdk/PublicAPI/net11.0/PublicAPI.Unshipped.txt | Declares the factory for .NET 11. |
| src/Xamarin.Android.Tools.AndroidSdk/PublicAPI/net10.0/PublicAPI.Unshipped.txt | Declares the factory for .NET 10. |
Review effort: Balanced
simonrozsival
enabled auto-merge (squash)
November 11, 2026 06:12
simonrozsival
approved these changes
Nov 11, 2026
Member
Author
|
/backport to release/11.0.1xx |
Contributor
|
Started backporting to |
Contributor
|
@jonathanpeppers backporting to git am output$ git cherry-pick 660f039f92f3fdda5c0a3422477651bdd2680e18
Auto-merging src/Xamarin.Android.Tools.AndroidSdk/PublicAPI/net10.0/PublicAPI.Unshipped.txt
CONFLICT (content): Merge conflict in src/Xamarin.Android.Tools.AndroidSdk/PublicAPI/net10.0/PublicAPI.Unshipped.txt
Auto-merging src/Xamarin.Android.Tools.AndroidSdk/PublicAPI/net11.0/PublicAPI.Unshipped.txt
CONFLICT (content): Merge conflict in src/Xamarin.Android.Tools.AndroidSdk/PublicAPI/net11.0/PublicAPI.Unshipped.txt
Auto-merging src/Xamarin.Android.Tools.AndroidSdk/PublicAPI/netstandard2.0/PublicAPI.Unshipped.txt
CONFLICT (content): Merge conflict in src/Xamarin.Android.Tools.AndroidSdk/PublicAPI/netstandard2.0/PublicAPI.Unshipped.txt
Auto-merging tests/Xamarin.Android.Tools.AndroidSdk-Tests/EmulatorRunnerTests.cs
error: could not apply 660f039f9... [AndroidSdk] Add explicit emulator process environment (#13467)
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Applying: [AndroidSdk] Add explicit emulator process environment
Using index info to reconstruct a base tree...
M src/Xamarin.Android.Tools.AndroidSdk/PublicAPI/net10.0/PublicAPI.Unshipped.txt
M src/Xamarin.Android.Tools.AndroidSdk/PublicAPI/net11.0/PublicAPI.Unshipped.txt
M src/Xamarin.Android.Tools.AndroidSdk/PublicAPI/netstandard2.0/PublicAPI.Unshipped.txt
M tests/Xamarin.Android.Tools.AndroidSdk-Tests/EmulatorRunnerTests.cs
Falling back to patching base and 3-way merge...
Auto-merging src/Xamarin.Android.Tools.AndroidSdk/PublicAPI/net10.0/PublicAPI.Unshipped.txt
CONFLICT (content): Merge conflict in src/Xamarin.Android.Tools.AndroidSdk/PublicAPI/net10.0/PublicAPI.Unshipped.txt
Auto-merging src/Xamarin.Android.Tools.AndroidSdk/PublicAPI/net11.0/PublicAPI.Unshipped.txt
CONFLICT (content): Merge conflict in src/Xamarin.Android.Tools.AndroidSdk/PublicAPI/net11.0/PublicAPI.Unshipped.txt
Auto-merging src/Xamarin.Android.Tools.AndroidSdk/PublicAPI/netstandard2.0/PublicAPI.Unshipped.txt
CONFLICT (content): Merge conflict in src/Xamarin.Android.Tools.AndroidSdk/PublicAPI/netstandard2.0/PublicAPI.Unshipped.txt
Auto-merging tests/Xamarin.Android.Tools.AndroidSdk-Tests/EmulatorRunnerTests.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 [AndroidSdk] Add explicit emulator process environment
Error: The process '/usr/bin/git' failed with exit code 128 |
2 of 3 tasks
jonathanpeppers
added a commit
that referenced
this pull request
Nov 20, 2026
…ment (#13683) Backport of #13467. Add `EmulatorRunner.CreateWithProcessEnvironment` to copy a caller's complete process environment and working directory for emulator launch and AVD listing. Existing constructor behavior is unchanged. Resolve the PublicAPI conflicts by adding only the new declaration to the release branch's netstandard2.0, net10.0, and net11.0 unshipped baselines. Preserve all existing release declarations. No issue is linked; #13467 is the source PR. Co-authored-by: Copilot App <[email protected]>
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 free
to 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.
Let
EmulatorRunnercopy a caller's environment and working directory. This preparesBootAndroidEmulatorfor MT support without changing existing caller behavior or enabling MT.Move argument checks into the existing boot test instead of relying on 500 ms timeouts.
Tested on Windows:
dotnet test tests\Xamarin.Android.Tools.AndroidSdk-Tests\Xamarin.Android.Tools.AndroidSdk-Tests.csproj --no-build --no-restore --filter FullyQualifiedName~EmulatorRunnerTests -v minimal— 25 passed. The two Unix-only checks were skipped.