Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: dotnet/android
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 51a08d74f3
Choose a base ref
...
head repository: dotnet/android
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: f90e889aa8
Choose a head ref
  • 5 commits
  • 13 files changed
  • 5 contributors

Commits on Oct 13, 2025

  1. [release/10.0.1xx] Update dependencies from dotnet/dotnet (#10529)

    This pull request updates the following dependencies
    
    ## From https://github.com/dotnet/dotnet
    - **Subscription**: [e03b5b1d-315d-470a-ace2-7afe9c8b5586](https://maestro.dot.net/subscriptions?search=e03b5b1d-315d-470a-ace2-7afe9c8b5586)
    - **Build**: [20251012.2](https://dev.azure.com/dnceng/internal/_build/results?buildId=2814080) ([286686](https://maestro.dot.net/channel/5173/github:dotnet:dotnet/build/286686))
    - **Date Produced**: October 12, 2025 11:22:00 PM UTC
    - **Commit**: [0b60d265d30d96c827b73dbce74cb78f600d3c92](dotnet/dotnet@0b60d26)
    - **Branch**: [release/10.0.1xx](https://github.com/dotnet/dotnet/tree/release/10.0.1xx)
    
    
    - **Updates**:
      - From [10.0.0-beta.25476.104 to 10.0.0-beta.25512.102][2]
         - Microsoft.DotNet.Build.Tasks.Feed
      - From [0.11.5-alpha.25476.104 to 0.11.5-alpha.25512.102][2]
         - Microsoft.DotNet.Cecil
      - From [10.0.0-rtm.25476.104 to 10.0.0-rtm.25512.102][2]
         - Microsoft.NET.ILLink.Tasks
         - Microsoft.NETCore.App.Ref
      - From [10.0.100-rtm.25476.104 to 10.0.100-rtm.25512.102][2]
         - Microsoft.NET.Sdk
         - Microsoft.TemplateEngine.Authoring.Tasks
    
    [2]: dotnet/dotnet@e1eaf1b...0b60d26
    dotnet-maestro[bot] authored Oct 13, 2025
    Configuration menu
    Copy the full SHA
    442dd28 View commit details
    Browse the repository at this point in the history

Commits on Oct 16, 2025

  1. Bump external/xamarin-android-tools from 2609c38 to 8722663 (#10540)

    Bumps [external/xamarin-android-tools](https://github.com/dotnet/android-tools) from `2609c38` to `8722663`.
    - [Commits](dotnet/android-tools@2609c38...8722663)
    
    ---
    updated-dependencies:
    - dependency-name: external/xamarin-android-tools
      dependency-version: 87226632ff5eaa27461a30bda4dda37642491415
      dependency-type: direct:production
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored and jonathanpeppers committed Oct 16, 2025
    Configuration menu
    Copy the full SHA
    a556aa7 View commit details
    Browse the repository at this point in the history
  2. [nativeaot] Correctly handle file path that contains spaces (#10537)

    Otherwise, the linker step will fail because path can contain spaces, for example:
    
        C:\Program Files\dotnet\packs\Microsoft.Android.Runtime.NativeAOT.36.android-x64\36.0.0-rc.2.332\runtimes\android-x64\native\libnaot-android.debug-static-debug.a
    hez2010 authored and jonathanpeppers committed Oct 16, 2025
    Configuration menu
    Copy the full SHA
    8e9acd6 View commit details
    Browse the repository at this point in the history
  3. [xabt] pass in $(SupportedOSPlatformVersion) to <Aapt2Link/> (#10538

    )
    
    Context: #10194
    Context: https://discord.com/channels/732297728826277939/732297837953679412/1427681737957441577
    Fixes: #6739
    
    PR #10194 was originally meant to fix #6739, but did not when testing
    a sample project. The test written in #10194 passed even without the
    fixes, so we did not have a proper test case.
    
    After reviewing the failing project, I noticed `<Aapt2Link/>` was passed:
    
        AndroidManifestFile = D:\Downloads\test_sdk26\AndroidManifest.xml
    
    This is the developer's `AndroidManifest.xml` in their project, which
    should completely omit `<uses-sdk/>` in favor of the
    `$(SupportedOSPlatformVersion)` MSBuild property. I suspect the fix
    for #10194 would have worked if `<uses-sdk/>` was present.
    
    `<Aapt2Link/>` can run quite early, before we have generated the final
    `AndroidManifest.xml` file. So, a solution here is to pass in
    `$(SupportedOSPlatformVersion)` to `<Aapt2Link/>`.
    
    I also updated the test so it properly tests this scenario.
    jonathanpeppers committed Oct 16, 2025
    Configuration menu
    Copy the full SHA
    4860105 View commit details
    Browse the repository at this point in the history

Commits on Oct 17, 2025

  1. [native] Fix JNI preload cache generation (#10547)

    Fixes: #10544
    Context: 1a62af3
    Context: cba39dc
    
    cba39dc introduced code to preload at startup native libraries which use JNI, 
    to work around an issue in Android which prevents such libraries from being 
    properly loaded at the later time of application life.
    
    Part of the workaround was support for updating handle of such a library in
    our shared library cache. Since every library has different entries in the 
    cache (because we search the array using xxHash generated from various forms
    of the library name), after preloading it we had to update every entry in the
    DSO cache with the correct handle, so that the library is never loaded again.
    
    The code which generates the caches and indexes at application build time worked
    fine in my testing (using `dotnet build`) but it turns out that using `dotnet publish`
    instead breaks the code in a subtle, but nasty way. 
    
    The issue is that the code which generated the index of shared libraries to preload
    reused an array which stored the indexes, while generating code for different RIDs.
    This resulted in the very first RID to process to contain valid indexes, the
    second one would **append** its own indexes to the preceding RID's data, the third
    RID would further append its own data etc.
    
    This would result in the following index code generated for the subsequend RIDs:
    
    ```
    ; android-arm
    ; Indices into dso_cache[] of DSO libraries to preload because of JNI use
    @dso_jni_preloads_idx = dso_local local_unnamed_addr constant [4 x i32] [
            i32 15, ; libSystem.Security.Cryptography.Native.Android.so
            i32 0, ; libSystem.Security.Cryptography.Native.Android
            i32 7, ; System.Security.Cryptography.Native.Android.so
            i32 8 ; System.Security.Cryptography.Native.Android
    ], align 4
    ```
    
    ```
    ; android-arm64
    ; Indices into dso_cache[] of DSO libraries to preload because of JNI use
    @dso_jni_preloads_idx = dso_local local_unnamed_addr constant [8 x i32] [
            i32 15, ; libSystem.Security.Cryptography.Native.Android.so
            i32 0, ; libSystem.Security.Cryptography.Native.Android
            i32 7, ; System.Security.Cryptography.Native.Android.so
            i32 8, ; System.Security.Cryptography.Native.Android
            i32 10, ; Invalid index 4
            i32 0, ; Invalid index 5
            i32 1, ; Invalid index 6
            i32 14 ; Invalid index 7
    ], align 4
    ```
    
    ```
    ; android-x64
    ; Indices into dso_cache[] of DSO libraries to preload because of JNI use
    @dso_jni_preloads_idx = dso_local local_unnamed_addr constant [12 x i32] [
            i32 15, ; libSystem.Security.Cryptography.Native.Android.so
            i32 0, ; libSystem.Security.Cryptography.Native.Android
            i32 7, ; System.Security.Cryptography.Native.Android.so
            i32 8, ; System.Security.Cryptography.Native.Android
            i32 10, ; Invalid index 4
            i32 0, ; Invalid index 5
            i32 1, ; Invalid index 6
            i32 14, ; Invalid index 7
            i32 10, ; Invalid index 8
            i32 0, ; Invalid index 9
            i32 1, ; Invalid index 10
            i32 14 ; Invalid index 11
    ], align 16
    ```
    
    In effect, when running on an arm64 device, we would try to load, and cache the
    handle, of an entirely different shared library, leading to further problems to
    find a requested symbol:
    
    ```
    10-17 11:25:18.062 27900 27900 F monodroid-assembly: Failed to load symbol 'AndroidCryptoNative_EcKeyCreateByKeyParameters' from shared library 'libSystem.Security.Cryptography.Native.Android'
    10-17 11:25:18.110  1444  4298 I ActivityManager: Process com.companyname.test_jwt (pid 27900) has died: fg  TOP 
    10-17 11:25:18.110  1444  1712 I libprocessgroup: Removed cgroup /sys/fs/cgroup/apps/uid_10361/pid_27900
    10-17 11:25:18.111   913   913 I Zygote  : Process 27900 exited cleanly (0)
    ```
    
    Native code attempted to load the symbol from a library that happened to be
    stored at the index valid for `android-arm` but not for e.g. `android-arm64`,
    which was not `libSystem.Security.Cryptography.Native.Android`, leading to
    the above red herring error.
    
    Note: if **all** of RIDs enabled for the application are 32-bit or **all**
    of them are 64-bit, things would work even though the generated code would
    be technically incorrect. This is because all of the hashes and, thus, sort
    order of the `dso_cache` entries would be the same.
    
    Fix this by making sure that the index array is not shared between different
    RIDs when generating the DSO cache code.
    grendello authored and jonathanpeppers committed Oct 17, 2025
    Configuration menu
    Copy the full SHA
    f90e889 View commit details
    Browse the repository at this point in the history
Loading