|
| 1 | +--- |
| 2 | +title: How to connect Android devices to a dev box |
| 3 | +description: Learn how to connect Android devices to a dev box for efficient testing and debugging, enhancing your app development workflow and productivity. |
| 4 | +author: RoseHJM |
| 5 | +ms.author: rosemalcolm |
| 6 | +ms.service: dev-box |
| 7 | +ms.topic: how-to |
| 8 | +ms.date: 12/11/2024 |
| 9 | + |
| 10 | +#customer intent: As a developer, I want to connect Android devices to my dev box so that I can develop apps for Android. |
| 11 | + |
| 12 | +--- |
| 13 | + |
| 14 | +# Connect Android devices to a dev box |
| 15 | + |
| 16 | +Connecting Android devices to a dev box enhances your app development process by allowing you to test and debug directly on physical devices. This article provides step-by-step instructions to help you connect your Android devices to a dev box, streamlining your development workflow. |
| 17 | + |
| 18 | +## Prerequisites |
| 19 | + |
| 20 | +- Access to a dev box |
| 21 | +- A client computer to connect to the dev box from |
| 22 | + |
| 23 | +## Prepare your client computer |
| 24 | + |
| 25 | +To connect Android devices to your dev box, you first connect the devices to client computer you use to connect to the dev box. |
| 26 | + |
| 27 | +### Connect Android devices |
| 28 | + |
| 29 | +Connect your Android device to the client computer you'll use to connect to your dev box. |
| 30 | + |
| 31 | +1. To open Device Manager, from the search box on the taskbar, run `devmgmt.msc`. |
| 32 | +1. Check that your device displays like one of the following options: |
| 33 | + - Device name: Universal Serial Bus / Pixel 6 |
| 34 | + - Android Device / Android Composite Android Debug Bridge (ADB) Interface |
| 35 | +1. Uninstall nonstandard devices and drivers and restart your computer. |
| 36 | +1. In Device manager, verify your Android device displays. |
| 37 | + |
| 38 | +> [!CAUTION] |
| 39 | +> Some devices like Samsung might not connect if the ADB interface device exists on the computer you connect from. To resolve this issue, uninstall the device. |
| 40 | +
|
| 41 | +### Configure USB redirection |
| 42 | + |
| 43 | +Configure following Local Group Policy settings to allow USB redirection on your client computer. |
| 44 | + |
| 45 | +1. To open Local Group Policy Editor, from a cmd window, run `gpedit.msc`. |
| 46 | +1. Navigate to **Computer Configuration\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Connection Client\RemoteFX USB Redirection**. |
| 47 | +1. Enable **Allow RDP redirection of other supported RemoteFX USB devices from this computer** for **Administrators and Users**. |
| 48 | +1. To apply the policy changes, from a cmd window, run `gpupdate /force`. |
| 49 | +1. Restart your computer. |
| 50 | + |
| 51 | +## Prepare your dev box |
| 52 | + |
| 53 | +When your Android devices are connected to your client computer, you can configure your dev box to access them by enabling USB redirection. |
| 54 | + |
| 55 | +### Configure USB redirection |
| 56 | + |
| 57 | +Configure following Local Group Policy settings to allow USB redirection on your dev box. |
| 58 | + |
| 59 | +1. To open Local Group Policy Editor, from a cmd window, run `gpedit.msc`. |
| 60 | +1. Open **Computer Configuration\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Device and Resource Redirection**. |
| 61 | +1. Set **Do not allow supported Plug and Play device redirection** to **Disabled**. |
| 62 | +1. Navigate to **Computer Configuration\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Connection Client\RemoteFX USB Device Redirection**. |
| 63 | +1. Enable **Allow RDP redirection of other supported RemoteFX USB devices from this computer** for **Administrators and Users**. |
| 64 | +1. To apply the policy changes, from a cmd window, run `gpupdate /force`. |
| 65 | +1. Restart your computer. |
| 66 | + |
| 67 | +## Troubleshoot ADB Connection Issues |
| 68 | + |
| 69 | +If the Android device isn't accessible to ADB, check the latest device drivers are installed and the device displays in Device Manager. |
| 70 | + |
| 71 | +Perform the following steps on your dev box: |
| 72 | + |
| 73 | +1. To open Device Manager, from the search box on the taskbar, run `devmgmt.msc`. |
| 74 | +1. Ensure the Google USB driver is installed and the device appears as [**Android Device \ Android Composite ADB Interface**](https://developer.android.com/studio/run/win-usb). |
| 75 | + - Devices from other manufacturers might not display in Device manager. |
| 76 | + - If your device is from another manufacturer, check [Install a USB driver](https://developer.android.com/studio/run/oem-usb#InstallingDriver) for manufacturer specific drivers. The goal is to make the ADB interface device show up in Device Manager. |
| 77 | + - The device name can vary from manufacturer to manufacturer, such as "Samsung Android Phone \ Samsung Android ADB Interface" or "Android Device \ Android Composite ADB Interface". |
| 78 | +1. Restart your computer. |
| 79 | + |
| 80 | +## Related content |
| 81 | + |
| 82 | +- [Microsoft Dev Box: Frequently asked questions](dev-box-faq.yml) |
0 commit comments