Skip to content

Feature Request: Fully Support AoT Compilation & CIL Stripping for Android #44855

@jxbrenner

Description

@jxbrenner

Provide AoT compilation and CIL stripping when targeting Android, and fully support in Visual Studio starting with .NET 6. At a minimum, this request is for static compilation to armeabi-v7a and arm64-v8a architectures and CIL stripping to reduce assemblies to nothing but metadata.

The primary motivation for the request is that APKs containing IL are trivial to unpack and decompile (bundled or not), presenting unnecessary risks to security and IP. Secondary motivation is performance related.

Alternative mobile app development frameworks such as Kotlin and Flutter provide static compilation. This request is an opportunity for Microsoft to keep up with the status-quo and appeal to businesses that wish to use MAUI for risk-conscious, closed-source mobile app development efforts.

The current state of affairs with Xamarin and CIL stripping can be found in dotnet/android#1218. In summary, CIL stripping for armeabi-v7a once worked but has since been broken in regressions, and currently only works for arm64-v8a targets. The feature is undocumented and has only experimental support. As it stands, Xamarin Android forces us to choose between the armeabi-v7a user base and packages from which our original source code cannot be obtained.

Tagging @akoeplinger as per the docs.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions