A sample for working with React Native using a VS Code Dev Container
- Windows Subsystem for Android
- WSA - Test and Debug using
adb
- Access localhost from Windows inside WSL
- From WSL Terminal, execute
adb connect "$(hostname).local":58526
to connect to windows host.
- From WSL Terminal, execute
- Install Android SDK in WSL:
sudo apt update && sudo apt install android-sdk -y
. Stack overflow post. - Add Android Home environment variable
- Run
source ~/.zshrc
(or source~/.bashrc
if using bash) to apply the update
- VS Code - Developing inside a container
- Updating PATH env variable for dev container
- Docker - Connecting to host from inside container
- Ensure WSA developer mode is enabled
- If adb device is being marked as unauthorized, go to WSA settings menu, in the developer mode area, click "manage developer settings" and a popup should appear to allow the RSA fingerprint. Once allowed, the adb device should be authorized.