Skip to content

Instantly share code, notes, and snippets.

@lagz0ne
Created December 12, 2022 10:24
Show Gist options
  • Save lagz0ne/6254a0da99719b650f5c6cf4548a1e6f to your computer and use it in GitHub Desktop.
Save lagz0ne/6254a0da99719b650f5c6cf4548a1e6f to your computer and use it in GitHub Desktop.
Getting WSA to work with expo debug

Install React-Native dependencies

Visit react-native to refer to their list. React-Native requires Android SDK to be installed, including adb

Install WSA on Windows, assume that you are on Windows 11

  • Install Amazon App Store, it'll ask you to install Windows Subsystem for Android
  • Once installation is done, go ahead and open Windows Subsystem for Android on Windows. This is the app to control Android settings.
  • Uncheck Advanced Networking. You may not be able to connect to server hosted in WSL from Android in this mode (similar to WSL trying to connect to application running in Windows). This put Android in non-magic WSL networking
  • Turn off WSA (there's button to do that). Optional: Set System resources to Continuos so the Android is left running when all apps are closed
  • Visit Developer tab to access Manage developer settings. This to trigger Android app to start again.
  • Look for search box, type in ip, it would help you to get the IP of the WSA, take it
  • From WSL, use adb connect <ip above>:58526 to etablish connection to expo. You only need this for expo to install expo-go app, so IP is not that important
  • Once you are done, you are good to go dev

Get it to the flow

  • Go
  • Start with expo start on react-native, it'll show the barcode as well as the expo:// URL, copy that url
  • You can open Windows, search for Expo Go, you should be able to access Expo Go app in Android directly
  • Paste in the expo:// you copied, should be good to go from there

How does it work?

  • To get expo to work, we'll need 2 things.
  • Expo-Go client that'll pull bundle from
  • Expo server, which will be started at port 19000 as we go with expo start
  • Because both WSL and WSA are in mesh networking, it can access each other via IP. With advanced networking, WSA cannot see server on WSL, as such, it'll fail to pull bundles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment