Using the Android emulator on Windows 10 with WSL2

The Android Device Manager installed with Visual Studio 2019.
# JDK
if [[ -e /usr/lib/jvm/java-8-openjdk-amd64 ]]; then
export JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64"
export PATH="$PATH:$JAVA_HOME/bin"
fi
# Android tools
if [[ -e $HOME/android-sdk-tools ]]; then
export PATH="$HOME/android-sdk-tools:$HOME/android-sdk-tools/bin:$PATH"
export PATH="$HOME/.android/platform-tools:$PATH"
export ANDROID_HOME="$HOME/.android"
export ANDROID_SDK_ROOT="$HOME/.android"
export REPO_OS_OVERRIDE="linux"
adb kill-server 2> /dev/null
export ADB_SERVER_SOCKET=tcp:$(cat /etc/resolv.conf | grep nameserver | cut -d' ' -f2):5037
fi

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store