adb: win32: fix start-server to properly display UTF-8 on the console

fwrite() is a macro that maps to adb_fwrite(), which can write UTF-8 to
the console. Use it to write the output that comes from the subprocess
adb server.

To do this, dup the stdout/stderr file descriptor and make a duplicate
FILE* stream, in binary mode (since we're reading raw bytes from the
subprocess), and unbuffered.

Change-Id: I480761bae0bd576dc9e03fa4d31266f4e49635ed
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
1 file changed