Created
August 22, 2020 04:59
-
-
Save pythoninthegrass/ef083621350a52a0a9f42d96365dea53 to your computer and use it in GitHub Desktop.
Share ADB server with WSL 2 guest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# SOURCE: https://github.com/microsoft/WSL/issues/4619#issuecomment-596990676 | |
# On Windows host run: | |
# adb -a -P 5037 nodaemon server | |
ip_addr=$(cat /etc/resolv.conf | tail -n1 | cut -d " " -f 2) | |
adb kill-server | |
export ADB_SERVER_SOCKET=tcp:${ip_addr} | |
adb devices | awk 'NR>1{print $1}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment