From 0e61d853316935a7b9c6e38fe20147ab97cc659a Mon Sep 17 00:00:00 2001 From: Engincan VESKE Date: Mon, 16 Mar 2026 18:01:50 +0300 Subject: [PATCH] Update maui document to mention adb tool --- docs/en/framework/ui/maui/index.md | 20 +++++++++++++++++--- docs/en/images/adb-command-prompt.png | Bin 0 -> 14 bytes 2 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 docs/en/images/adb-command-prompt.png diff --git a/docs/en/framework/ui/maui/index.md b/docs/en/framework/ui/maui/index.md index 547617bcae..2622bdc7e0 100644 --- a/docs/en/framework/ui/maui/index.md +++ b/docs/en/framework/ui/maui/index.md @@ -42,15 +42,29 @@ You can examine the [Users Page](#users-page) or any other pre-defined page to s ### Android -If you get the following error when connecting to the emulator or a physical phone, you need to set up port mapping. +If you get the following error when connecting to the emulator or a physical phone, you need to set up port mapping using the `adb` tool: ``` Cannot connect to the backend on localhost. ``` -Open a command line terminal and run the `adb reverse` command to expose a port on your Android device to a port on your computer. For example: +**How to get and use `adb` tool:** -`adb reverse tcp:44305 tcp:44305` +- **Option 1: Install `adb` globally** + Download and install the [Android SDK Platform-Tools](https://developer.android.com/tools/releases/platform-tools) to get the [`adb`](https://developer.android.com/tools/adb) command-line tool. +- **Option 2: Use Visual Studio’s built-in `adb` command prompt** + If you are using Visual Studio, you can access the `adb` command prompt directly from the IDE: + ![Android Adb Command Prompt](../../../images/adb-command-prompt.png) + +> For more information on setting up your environment for Android development and debugging, refer to the [Microsoft MAUI Android device setup guide](https://learn.microsoft.com/en-us/dotnet/maui/android/device/setup). + +**Port mapping command:** + +Once `adb` is available, run the following command in your terminal (or Visual Studio's `adb` command prompt) to map the backend port to your Android device: + +```bash +adb reverse tcp:44305 tcp:44305 +``` > Replace `44305` with the port number your backend application is running on. > diff --git a/docs/en/images/adb-command-prompt.png b/docs/en/images/adb-command-prompt.png new file mode 100644 index 0000000000000000000000000000000000000000..19eb84b90fa6f76ba05ba4fe51f1c228f91b11d9 GIT binary patch literal 14 VcmaFAe{X=FJ1>_MFBby?0{|*r1DOB- literal 0 HcmV?d00001