0

Is there a way to configure

npx react-native run-android

to use a virtual Android device in another computer? I need this because for a given project I can run

npm start
npx react-native

from a docker container but I need to use an android simulator located inside the host but outside the container.

Thanks

Jose Cabrera Zuniga
  • 2,348
  • 3
  • 31
  • 56

1 Answers1

1

It's possible to connect a device with adb over the network

How can I connect to Android with ADB over TCP?

https://developer.android.com/studio/command-line/adb#wireless

So yes you could in theory have an emulator on the host and connect to its ip from your VM.

Set the target in your VM:

adb tcpip 5555

Connect to its IP:

adb connect device_ip_address
Blundell
  • 75,855
  • 30
  • 208
  • 233