Using ADB with WSL2

Adrien Pellegrini
1 min readJan 13, 2020

--

In a Windows 10 environment, in order to use the Android emulator in Windows and starting a React-Native app in WSL2; here are the required steps I need to configure the computer to use ADB (Android Debug Bridge).

Computer specifications:

  • Windows 10 Pro Insider — build 19541
  • WSL 2 — Ubuntu 18.04.3 LTS
  • ADB — version 1.0.41 (29.0.5–5949299)

What the script does:

  • remove any previous port mapping on port 5037 (default port of ADB)
  • start the ADB server
  • add port mapping for 0.0.0.0:5037 to 127.0.0.1:5037
  • start WSL (to ensure the virtual interface is created; see below)
  • disable the firewall for the virtual interface “vEthernet (WSL)”

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Responses (2)

Write a response