Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[android] Update internal documentation on CoreCLR on Android experimental support #112034

Merged
merged 11 commits into from
Feb 12, 2025

Conversation

ivanpovazan
Copy link
Member

@ivanpovazan ivanpovazan commented Jan 31, 2025

Description

This pull request updates the internal documentation with instructions for:

  • Building CoreCLR for Android
  • Building and running an Android sample application on CoreCLR
  • Debugging the sample application and the runtime

This is intended for developers working on CoreCLR's support for Android.

NOTE: As the support is experimental, the documentation covers only currently supported scenarios, and will be updated in the future as we expand our support.


Fixes #111955

@ivanpovazan ivanpovazan added NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) NO-REVIEW Experimental/testing PR, do NOT review it labels Jan 31, 2025
@ivanpovazan ivanpovazan added this to the 10.0.0 milestone Jan 31, 2025
@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jan 31, 2025
@ivanpovazan ivanpovazan changed the title WIP: Update internal documentation on CoreCLR on Android experimental support [android] Update internal documentation on CoreCLR on Android experimental support Feb 10, 2025
@ivanpovazan ivanpovazan added os-android area-Infrastructure-mono and removed NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) NO-REVIEW Experimental/testing PR, do NOT review it needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Feb 10, 2025
@ivanpovazan
Copy link
Member Author

After discussion with @janvorli, we agreed to remove the outdated Linux documentation and to refer to MacOS one.

@ivanpovazan ivanpovazan marked this pull request as ready for review February 10, 2025 11:06
2. In Windows, create and start an emulator
3. In WSL, swap the `adb` from the Android SDK in WSL2 with that from Windows
- `mv $ANDROID_SDK_ROOT/platform-tools/adb $ANDROID_SDK_ROOT/platform-tools/adb-orig`
- `ln -s /mnt/<path-to-adb-on-host> $ANDROID_SDK_ROOT/platform-tools/adb`
Copy link
Member

Choose a reason for hiding this comment

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

do you really need to symlink or would it be enough to set xharness ADB_EXE_PATH to /mnt/<path-to-adb-on-host> ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

I had to symlink it somewhere. It didn't necessarily need to be the path from the Android SDK in WSL2, but I found that convenient for just using adb from the command line in WSL.

When I directly set ADB_EXE_PATH=/mnt/<path-to-adb-on-host>, running with xharness would fail with:

Exit code: 1
Std out:
Performing Streamed Install
        
Std err:
adb: failed to stat /home/elinor/runtime/artifacts/bin/AndroidSampleApp/x64/Release/android-x64/Bundle//bin/HelloAndroid.apk: No such file or directory

I admittedly didn't really spend time looking into why.

Directly running /mnt/<path-to-adb-on-host> install <path-to-apk-in-wsl> from my WSL terminal works fine, so I guess it may be something with how it gets launched with xharness?

@ivanpovazan
Copy link
Member Author

@kotlarmilos could you include a note about the problem you were having with Cannot invoke "String.length()" because "<parameter1>" is null , and how you resolved it?

@ivanpovazan
Copy link
Member Author

/ba-g wasm jobs not affected

@ivanpovazan ivanpovazan merged commit 5cae518 into dotnet:main Feb 12, 2025
82 of 87 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[android] Update internal documentation about experimental CoreCLR builds for Android
6 participants