Uh oh!
There was an error while loading. Please reload this page.
Hook up more integrations to NativeAOT with Android RIDs - #10402
Hook up more integrations to NativeAOT with Android RIDs#10402jkoritzinsky wants to merge 5 commits into
Conversation
jonathanpeppers
commented
Aug 11, 2025
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
| os-bridge.cc | ||
| runtime-util.cc | ||
| typemap.cc | ||
| xamarin_getifaddrs.cc |
There was a problem hiding this comment.
This will produce conflict with #10385. Not a big deal, just wanted to avoid dragging unused code into newly supported runtimes.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I'll need to dig a bit deeper but the ...and even if it tried to link to the native library we are still missing some bits: UPD: Nvm, I was missing |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I have a heavily hacked up build locally that was able to pass startup of our app: ![]() Aside from all the comments above and solving general linking breakage / undefined symbols, we will need to embrace GCUserPeerable because NativeAOT builds use different interop generation mode (XAJavaInterop1 vs JavaInterop1). The garbage collection part seems to work but for some reason it's triggered way too often to the point of feeling like running all the time. It will need to be investigated, the startup takes literally minute[s] because of all the triggered collections. (UPD: |
filipnavara
commented
Aug 13, 2025
Here's a rough commit with the changes I have locally to get this working: filipnavara@4a59c50 It still needs a lot of cleanup. We also need updated runtime packs to get it working end-to-end. |
jonathanpeppers
commented
Aug 13, 2025
@jkoritzinsky FYI the latest Maestro bump, it seems like we need to make changes like: This allows the NativeAOT runtime packs (with proper Android RIDs!) to work. Do we need to add the two Android RIDs to this line: That made things work for me locally, but CI is ongoing. |
jonathanpeppers
commented
Aug 13, 2025
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
akoeplinger
commented
Aug 15, 2025
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
jkoritzinsky
commented
Aug 15, 2025
I'm looking at the NAOT failures and it looks like it can't find the native files in the package even though they are present in the NativeAOT runtime package. I did notice that the runtime package is built with a |
jonathanpeppers
commented
Aug 20, 2025
I tried to push a change (says I can't push to |
jkoritzinsky
commented
Aug 20, 2025
You should be able to push to my fork (I have the "allow edits by maintainers" checkbox checked), weird. Thanks for looking into this for me. |
jonathanpeppers
commented
Aug 21, 2025
#10432 is good but may not fully fix this -- basically nothing broke when I removed the x86 and arm packs. So, I'll try building this locally when I can. |
Uh oh!
There was an error while loading. Please reload this page.
Remove dead code from the NativeAOT runtime logic
89ac2ea to
1191f5cCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
grendello
commented
Sep 15, 2025
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Uh oh!
There was an error while loading. Please reload this page.
| namespace Microsoft.Android.Runtime; | ||
| struct DiagnosticSettings { |
There was a problem hiding this comment.
So, I think we'll want to restore the GrefLog and LrefLog logs or we'll have no way to get these in NativeAOT.
Long term, we were going to use some EventSource API, but maybe we can just leave the simple thing in here for now.
There was a problem hiding this comment.
Here is the issue about it:
There was a problem hiding this comment.
Removing this infra is basically the last part of this PR that wasn't subsumed by the other PR that already went in.
I'll close this PR as there's really nothing in it at this point.
| static LogcatTextWriter () | ||
| { | ||
| Console.SetOut (new LogcatTextWriter (AndroidLogLevel.Info)); | ||
| Console.SetError (new LogcatTextWriter (AndroidLogLevel.Error)); | ||
| } |
There was a problem hiding this comment.
@jkoritzinsky I think this part is useful, so maybe I can do this part in a different PR.
This was here originally, because Console.WriteLine() didn't output to logcat.


Try hooking up the Android crypto stack, GC integration, and logging to NativeAOT correctly.
cc: @filipnavara@jtschuster