Hello, how can I connect to the chrome in the phone via usb or emulator android on hyper-v?
For both real devices via USB and emulators via AVD Manager you need to forward the port 9222:
adb forward tcp:9222 localabstract:chrome_devtools_remote
Then use localhost:9222 as usual.
Possible to use a multi connection to two or more virtual machines?
You need one instance for each virtual machine.
i run two emulator
after command
"adb forward tcp:9222 localabstract:chrome_devtools_remote"
message: "error: more then one device/emulator"
That happens because you need to specify the target device with the -s <specific device> option. From adb help:
directs command to the device or emulator with the given serial number or qualifier. Overrides ANDROID_SERIAL environment variable.
- List your devices:
$ adb devices
List of devices attached
emulator-5556 device
emulator-5554 device
$ adb -s emulator-5556 forward tcp:9222 localabstract:chrome_devtools_remote
$ adb -s emulator-5554 forward tcp:9222 localabstract:chrome_devtools_remote
I've written a Node module that can help with this, https://github.com/auchenberg/adb-devtools-devices
Most helpful comment
I've written a Node module that can help with this, https://github.com/auchenberg/adb-devtools-devices