build(make): fix qemu Android install with EmbedAssembliesIntoApk

The qemu install path used to crash on startup with
'No assemblies found in files/.__override__/<rid>':
monodroid-glue.cc:757 / SIGABRT. Root cause: the .NET 10 Android
SDK defaults to Fast Deployment in Debug, which ships the APK
without managed assemblies and pushes them at runtime via adb —
not viable on the qemu emulator.

Fix:
- Replace the no-op -p:AndroidEnableFastDeployment=false flag
  (does not exist as an MSBuild property in the .NET 10 SDK) with
  -p:EmbedAssembliesIntoApk=true, which forces the build to
  cross-compile the managed assemblies into native lib_*.dll.so
  libraries for every ABI and pack them into the APK under
  lib/<arch>/. The Mono runtime then loads them directly,
  bypassing the Fast Deployment code path entirely.
- Add CONFIG variable passthrough so 'make qemu-install CONFIG=Release'
  builds an optimised APK for release smoke tests.
- qemu-build now consumes $(CONFIG) instead of hardcoded 'Debug'
  for the APK output path.

Side effect: the Debug APK balloons from ~13 MB (libs only) to
~160 MB (libs + AOT-compiled assemblies for all four supported
ABIs). That is acceptable for the local qemu install path; the
Forgejo release workflow builds Release APKs separately and is
unaffected.

Validated end-to-end on this machine: AVD boots in 109s, the
build produces an APK with lib_*.dll.so for x86_64 (125 MB),
uninstall + reinstall + am start no longer aborts at
monodroid-glue.cc:757 (next test will confirm the app actually
renders, this commit only fixes the Fast Deployment crash).

Also adds qemu-logcat-boot target from the previous edit
(unchanged, documented in this commit message for context).
This commit is contained in:
Paul Schneider 2026-08-22 05:47:31 +01:00
commit 15c95ad3d5
Signed by: notazof
GPG key ID: 1DD5D838E5343B06
2 changed files with 84 additions and 3 deletions

3
.gitignore vendored
View file

@ -39,3 +39,6 @@ DataDir/
*.tests.trx
*.tests.html
*.log