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

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

Open
1 of 2 tasks
pan8664716 opened this issue Mar 30, 2024 · 7 comments
Open
1 of 2 tasks

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

pan8664716 opened this issue Mar 30, 2024 · 7 comments
Labels

Comments

@pan8664716
Copy link

pan8664716 commented Mar 30, 2024

Windows Version

Microsoft Windows [Version 10.0.22631.3296]

WSL Version

2.1.5.0

Are you using WSL 1 or WSL 2?

  • 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

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

Tasks

Preview Give feedback
No tasks being tracked yet.
Copy link

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs

Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The scipt will output the path of the log file once done.

Once completed please upload the output files to this Github issue.

Click here for more info on logging
If you choose to email these logs instead of attaching to the bug, please send them to [email protected] with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

@pan8664716
Copy link
Author

here is log file:

WslLogs-2024-03-30_10-46-28.zip

Copy link

The log file doesn't contain any WSL traces. Please make sure that you reproduced the issue while the log collection was running.

Diagnostic information
.wslconfig found
Detected appx version: 2.1.5.0
Found no WSL traces in the logs

@pan8664716
Copy link
Author

there is all logs;

@chanpreetdhanjal
Copy link

Hi. Can you please collect networking logs by following the instructions below?
https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#collect-wsl-logs-for-networking-issues

@AliSananS
Copy link

I'm having the same or similar issue when networking mode is set to mirrored. In my case adb server takes too long to respond (2 to 3 mins).

This is the networking log file I created while the server was trying to run: WslNetworkingLogs-2024-12-07_15-42-28.zip

@AliSananS
Copy link

AliSananS commented Dec 7, 2024

Current workaround:

  • Remove adb from wsl: sudo apt remove android-tools.
  • Install adb on Windows.
  • Make a symlink of adb.exe to adb.

Try this if you don't know where adb is on Windows.

eval "ln -s $(which adb.exe) $(dirname $(which adb.exe))/adb"

Now run adb start-server in wsl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants