I have a virtual serial port installed on my Windows 10 system, which sets up a bridge between virtual ports named COM2 and COM3. I wrote a test application for desktop to see whether the bridge works and there was no problem. The data sent from COM2 was correctly received in COM3. So the ports seem to be fine.
Now I want to run the android emulator connected to one of these virtual ports. The command I wrote is this:
emulator.exe -avd android6 -partition-size 512 -qemu -serial COM2
First, the configuration panel for the serial port appeared:
but after confirming the port config, the following error message appears and the emulator never starts:
HAX is working and emulator runs in fast virt mode.
c:\Program Files (x86)\Android\android-sdk\tools\..\emulator\qemu\windows-x86_64\qemu-system-i386.exe: -serial COM2: Failed SetCommState
c:\Program Files (x86)\Android\android-sdk\tools\..\emulator\qemu\windows-x86_64\qemu-system-i386.exe: -serial COM2: could not connect serial device to character backend 'COM2'
Now the irony is, if I change COM2
to COM1
which is an actual serial port, the emulator starts without any problems and connects to that port after showing the port-configuration window. So I think the issue here has something to do with COM2
being virtual.
I tried everything I could and searched fruitlessly for hours to figure out what's wrong, which led to nothing useful (including this totally irrelevant question)