summaryrefslogtreecommitdiff
path: root/fastboot/usb_linux.cpp
diff options
context:
space:
mode:
authorSpencer Low <CompareAndSwap@gmail.com>2015-05-22 16:48:31 -0700
committerSpencer Low <CompareAndSwap@gmail.com>2015-06-08 17:41:53 -0700
commitb7dfb79b53c516e54a8964ba66e207a3bb4db9ee (patch)
tree957d7d46ea9d6d8be7368c9640ae2200db0bc0a3 /fastboot/usb_linux.cpp
parent6af8e11f4cbb2ba895399dc0371471ff79f25665 (diff)
adb: win32: fix exec-in and exec-out to use binary mode
adb exec-in and exec-out are designed to read/write binary data according to the commit description at: https://android.googlesource.com/platform/system/core/+/5d9d434%5E!/ On Windows, when adb_read and adb_write are used, they are always in binary mode (because sysdeps_win32.cpp calls Windows APIs direct). But unix_read, unix_write, fread, fwrite, read, write use the text translation mode of the C Runtime file descriptor, which is by default textmode. adb exec-in and exec-out use copy_to_file() which uses unix_read() and fwrite() when reading/writing stdin and stdout, thus, copy_to_file() should switch to binary mode for those cases (it already uses binary mode for file descriptors other than stdin and stdout). copy_to_file() is also called by adb backup, adb restore, and adb install-multiple, but those do not use stdin or stdout, so those codepaths should not be affected by this change. Change-Id: I3446d9b363d20a2c2f6be2b96e55b653d99df2f9 Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
Diffstat (limited to 'fastboot/usb_linux.cpp')
0 files changed, 0 insertions, 0 deletions