microsoft / microsoft/WSL

In mirrored network mode, the adb devices command will be blocked

Open
#11,397 12 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

network
Dominant language
C++
Stars
33.7k
Forks
1.8k
Avg merge
3d 17h
Merged PRs (30d)
116

Description

### Windows Version

Microsoft Windows [Version 10.0.22631.3296]

### WSL Version

2.1.5.0

### Are you using WSL 1 or WSL 2?

- [X] WSL 2
- [ ] WSL 1

### Kernel Version

5.15.146.1-2

### Distro Version

Ubuntu 22.04

### Other Software

adb version:
Android Debug Bridge version 1.0.41
Version 31.0.2-7242960
Installed as /usr/lib/android-sdk/platform-tools/adb

adb.exe version
Android Debug Bridge version 1.0.41
Version 31.0.2-7242960
Installed as D:\Program Files (x86)\Android\SDK\platform-tools\adb.exe

![Snipaste_2024-03-30_10-00-03](https://github.com/microsoft/WSL/assets/10355764/b7ec7bd4-5cbf-47cb-9283-f2d471442343)

### Repro Steps

1. Turn on the computer, start wsl2
2. Use the `adb devices` command, it will be blocked
3. Use the` adb.exe devices` command, you can get the machine list
4. Use the `wsl --shutdown` command, kill wsl2
5. Reopen wsl2, use the `adb devices` command, you can get the machine list

Why do you have to restart once before you can use the adb devices command?

### Expected Behavior

the first time use `adb devices` , you can get the machine list

### Actual Behavior

the first time use `adb devices` , you can get the machine list

### Diagnostic Logs

_No response_
```[tasklist]
### Tasks
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported WSL 2 mirrored-network behavior with `adb devices` and `adb.exe devices`, following the listed startup and `wsl --shutdown` steps. Compare the first-run behavior before and after shutdown; done means `adb devices` lists the machines on the initial WSL launch, without requiring a restart.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, ubuntu
Domain
networking, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.