Skip to content

Support 32-bit ARM Android via a separate Mono bundle#2340

Draft
myieye wants to merge 5 commits into
developfrom
support-older-cpus
Draft

Support 32-bit ARM Android via a separate Mono bundle#2340
myieye wants to merge 5 commits into
developfrom
support-older-cpus

Conversation

@myieye

@myieye myieye commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

.NET 10 defaults Android to CoreCLR, whose runtime packs are 64-bit-only, so the published AAB dropped armeabi-v7a and 32-bit devices show up as "incompatible". This change builds a second Mono / armeabi-v7a bundle alongside the CoreCLR 64-bit one and ships both to a single Play listing. The two bundles are version-code-banded (CoreCLR above Mono) so 64-bit devices resolve to the CoreCLR bundle and only 32-bit-only devices fall through to Mono. A process-architecture readout is added to the Troubleshoot dialog.

Caveats reviewers must know

  1. ⚠️ Play multi-AAB ABI routing is UNVERIFIED. Before relying on this, validate on a closed/internal track that the Play Console device catalog / App Bundle Explorer routes a 64-bit device to the CoreCLR bundle and a 32-bit-only device to the Mono bundle. This is a lightly-documented path; the fallback is an all-Mono single bundle or a sideloaded arm32 APK.
  2. arm32 / Mono is a time-boxed target. The MAUI team is "still reviewing whether to support Android arm32" in .NET 11 (source)
  3. Operational: both AABs must be uploaded together every release (CoreCLR versionCode banded above Mono). The Troubleshoot dialog now shows Arm / Arm64 so you can confirm in the field which bundle a device actually installed.

.NET 10 defaults Android to the CoreCLR runtime, which only ships 64-bit
runtime packs, so the published AAB dropped armeabi-v7a and 32-bit devices
became "incompatible" on the Play Store. Build a second Mono/armeabi-v7a
bundle alongside the CoreCLR 64-bit one; both go to a single Play listing,
version-code-banded (CoreCLR above Mono) so 64-bit devices -- which also
report armeabi-v7a support -- always resolve to CoreCLR and only 32-bit-only
devices fall through to Mono.

- fw-lite.yaml: publish-android is now a coreclr/mono build matrix;
  create-release stages both bundles under per-arch asset names.
- FwLiteMaui.csproj: default RuntimeIdentifiers trimmed to the 64-bit set
  CoreCLR supports; arm32 builds with -p:UseMonoRuntime=true
  -p:RuntimeIdentifiers=android-arm.
- Troubleshooting dialog shows the process architecture (Arm/Arm64) so you
  can confirm which bundle a device installed.
- Add install-maui-android-release-arm32 task for on-device testing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 4903bfcc-d4e1-4a72-bf36-3804e5e66244

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch support-older-cpus

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added the 💻 FW Lite issues related to the fw lite application, not miniLcm or crdt related label Jun 8, 2026
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

UI unit Tests

  1 files   62 suites   29s ⏱️
186 tests 186 ✅ 0 💤 0 ❌
258 runs  258 ✅ 0 💤 0 ❌

Results for commit 8ccd3a3.

♻️ This comment has been updated with latest results.

The Troubleshoot dialog's $t`Architecture` is a new translatable message; CI
fails the build if `pnpm i18n:extract` would add any msgid, so run it and commit
the resulting catalog entries (English fallback in en.po, empty in the others).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@argos-ci

argos-ci Bot commented Jun 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - Jun 8, 2026, 1:35 PM

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

C# Unit Tests

165 tests   165 ✅  18s ⏱️
 23 suites    0 💤
  1 files      0 ❌

Results for commit 8ccd3a3.

♻️ This comment has been updated with latest results.

myieye and others added 3 commits June 8, 2026 14:52
… dialog spacing

The Mono/arm32 size-optimizing trimmer can reduce SqlTransparentExpression's
static ctor to a no-op (nop/ret) before the patcher runs -- the exact shape the
patcher itself produces -- which tripped its "stsfld _ctor required" guard and
broke the build.

- Linq2DbCctorPatcher: accept a no-op cctor as already-neutralised instead of
  failing; guard the _ctor field directly (the real hazard) and still replace
  Quote() with a throw in all accepted shapes. Makes the patcher idempotent.
- install-maui-android-release-arm32: use -t:Run (full build -> install -> launch
  graph, targets the USB device) instead of -t:SignAndroidPackage.
- TroubleshootDialog: lay the version/Platform/Architecture rows out as flex
  children (gap-1) so their spacing is uniform.

Known related issue (not fixed here, clean builds unaffected): stale
.cctor-patched sentinels can make the MSBuild patch target skip a regenerated
dll on dirty incremental builds, letting an unpatched dll reach AOT.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…iers

The publish-android matrix passed -p:RuntimeIdentifiers on the command line,
which is a global property and broke the SDK's per-RID fan-out:
- coreclr leg: the ';' in android-arm64;android-x64 was read as a property
  separator -> MSB1006 "Switch: android-x64".
- mono leg: dependency projects didn't get the singular RuntimeIdentifier ->
  MSB3030 missing release_android-arm/<dep>.dll.

Move the RID list into FwLiteMaui.csproj keyed on UseMonoRuntime, and have CI
pass only the runtime flag. Also tighten Troubleshoot dialog row spacing
(the CopyButton was inflating the version row height).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The cctor-patcher tolerance for a trimmer-neutralised (no-op) cctor only
mattered for polluted incremental builds. Clean builds (CI) take the normal
stsfld path -- the CI failures were always the RID issue (MSB1006/MSB3030),
never the patcher -- so the original deliberately-loud guard is fine as-is.

Also trim/dedupe the comments added for the arm32 work (the RID/fan-out
rationale now lives once, in FwLiteMaui.csproj).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@hahn-kev

Copy link
Copy Markdown
Collaborator

I'm not sure why this makes the app work on your tablet. But according to the google play store our app currently supports armeabi-v7a and it has since before we upgraded to dotnet 10.
In the description you state:

.NET 10 defaults Android to CoreCLR, whose runtime packs are 64-bit-only

however according to the docs that's not true, it is possible to opt in, but it's not the default.

according to their docs you can even open up the apk and look in libs, if there's a libmono then it's mono, and if there's a libcoreclr then it's coreCLR.

As a last check, I just confirmed that both of the apps output in this PR uses libmono.

So I'm not sure why this fixed anything on your tablet.

The Mac App Store will NOT accept apps with ONLY maccatalyst-arm64 indicated;
either BOTH runtimes must be indicated or ONLY macatalyst-x64. -->
<!-- For example: <RuntimeIdentifiers>maccatalyst-x64;maccatalyst-arm64</RuntimeIdentifiers> -->
<RuntimeIdentifiers Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">android-arm;android-arm64;android-x86;android-x64</RuntimeIdentifiers>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you mean to drop android-x86?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💻 FW Lite issues related to the fw lite application, not miniLcm or crdt related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants