Skip to content

[dotnet-dsrouter] update docs around $ANDROID_SDK_ROOT #47567

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

Merged
merged 3 commits into from
Jul 25, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/core/diagnostics/dotnet-dsrouter.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ dotnet-dsrouter client-server

- **`-fp, --forward-port <forwardPort>`**

Enables port forwarding. The values are `Android` or `iOS` for `TcpClient`, and only `Android` for `TcpServer`. Make sure to set `ANDROID_SDK_ROOT` before using this option on Android.
Enables port forwarding. The values are `Android` or `iOS` for `TcpClient`, and only `Android` for `TcpServer`. For Android, optionally set `$ANDROID_HOME` to a valid Android SDK path.

## dotnet-dsrouter server-server

Expand Down Expand Up @@ -126,7 +126,7 @@ dotnet-dsrouter server-server

- **`-fp, --forward-port <forwardPort>`**

Enables port forwarding. The values are `Android` or `iOS` for `TcpClient`, and only `Android` for `TcpServer`. Make sure to set `ANDROID_SDK_ROOT` before using this option on Android.
Enables port forwarding. The values are `Android` or `iOS` for `TcpClient`, and only `Android` for `TcpServer`. For Android, optionally set `$ANDROID_HOME` to a valid Android SDK path.

## dotnet-dsrouter server-client

Expand Down Expand Up @@ -163,7 +163,7 @@ dotnet-dsrouter server-client

- **`-fp, --forward-port <forwardPort>`**

Enables port forwarding. The values are `Android` or `iOS` for `TcpClient`, and only `Android` for `TcpServer`. Make sure to set `ANDROID_SDK_ROOT` before using this option on Android.
Enables port forwarding. The values are `Android` or `iOS` for `TcpClient`, and only `Android` for `TcpServer`. For Android, optionally set `$ANDROID_HOME` to a valid Android SDK path.

## dotnet-dsrouter client-client

Expand Down Expand Up @@ -200,11 +200,11 @@ dotnet-dsrouter client-client

- **`-fp, --forward-port <forwardPort>`**

Enables port forwarding. The values are `Android` or `iOS` for `TcpClient`, and only `Android` for `TcpServer`. Make sure to set `ANDROID_SDK_ROOT` before using this option on Android.
Enables port forwarding. The values are `Android` or `iOS` for `TcpClient`, and only `Android` for `TcpServer`. For Android, optionally set `$ANDROID_HOME` to a valid Android SDK path.

## Collect a startup trace using dotnet-trace from a .NET application running on Android

Sometimes it may be useful to collect a trace of an application from its startup. The following steps illustrate the process of doing so targeting a .NET application running on Android. Since `dotnet-dsrouter` is run using port forwarding, the same scenario works against applications running on a local emulator and on a physical device attached over USB. Make sure to set `ANDROID_SDK_ROOT` before using this option or `dotnet-dsrouter` won't be able to find `adb` needed to set up port forwarding.
Sometimes it may be useful to collect a trace of an application from its startup. The following steps illustrate the process of doing so targeting a .NET application running on Android. Since `dotnet-dsrouter` is run using port forwarding, the same scenario works against applications running on a local emulator and on a physical device attached over USB. `dotnet-dsrouter` attempts to automatically locate the Android SDK and `adb` needed to set up port forwarding. Optionally set `$ANDROID_HOME` to specify an Android SDK path.

- Launch dotnet-dsrouter in server-server mode:

Expand Down