Issue
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)
Solution
Upon further investigation, I found out that some virtual port software just don't support connecting to the emulator. After that I installed the Virtual Serial Port Driver by Eltima and it just works fine.
DISCLAIMER: This is not a promotion and I don't have any kind of affiliation with Eltima. I added the answer only because it might save some others from a lot of trouble and headache. The only valid conclusion from this answer is Eltima's software works with emulator, while others seemingly don't function properly.
Answered By - polfosol ఠ_ఠ
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.