问题
I need to prototype an Android application which communicates to external hardware using serial I/O. Can the emulator send and receive serial data over a PC's com port?
回答1:
The Android emulator itself supports this feature, I see people use "emulator -qemu -serial COM1" on Windows PC
or
"emulatro -qemu -serial /dev/ttyS0" on Linux PC
I have not tried it by myself yet, but that is the way in the big picture.
回答2:
I came across this: http://code.google.com/p/android-serialport-api/
this library will let you use Java to access the serial port on your Android device
来源:https://stackoverflow.com/questions/5246094/android-emulator-pc-serial-port