summaryrefslogtreecommitdiffstats
path: root/adb/sysdeps_win32.c
Commit message (Collapse)AuthorAgeFilesLines
* adb shell: Win32: fix Ctrl-C, tab completion, line editing, server echoSpencer Low2015-03-261-0/+903
| | | | | | | | | | | | | | | | | | | | | | | | | | | The 'adb shell' command on Windows has had problems: * Ctrl-C killed the local Windows adb.exe process instead of sending the Ctrl-C to the Android device. * Local echo was enabled, causing everything typed to be displayed twice. * Line input was enabled, so the Android device only received input after hitting enter. This meant that tab completion did not work because the tab wasn't seen by the shell until pressing enter. * The usual input line editing keys did not work (Ctrl-A to go to the beginning of the line, etc.). This commit fixes these issues by reconfiguring the Win32 console and then translating input into what Gnome Terminal would send, in effect somewhat emulating a Unix terminal. This does not fix all Win32 console issues, but is designed to be better than what we had before, and to make the common day-to-day usage much more comfortable and usable. Change-Id: Idb10e0b634e27002804fa99c09a64e7176cf7c09 Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
* File header cleanup.Dan Albert2015-03-191-3/+23
| | | | | | | | | * sysdeps.h should always be included first. * TRACE_TAG needs to be defined before anything is included. * Some files were missing copyright headers. * Save precious bytes on my SSD by removing useless whitespace. Change-Id: I88980e6e00b5be1093806cf286740d9e4a033b94
* adb: Win32: set socket buffer sizes properlySpencer Low2015-01-261-6/+10
| | | | | | | | | | | | | | | | | | On Windows, adb_socket_setbufsize() was taking a file descriptor value from the compatibility layer in sysdeps_win32.c (namely, an index into the _win32_fhs array) and passing it to the Winsock setsockopt() call, which wants a Winsock SOCKET handle. Basically, adb_socket_setbufsize() was passing `fd` instead of `_fh_from_int(fd)->fh_socket`, resulting in adb effectively setting a socket buffer size on a random socket in the process. The fix is to introduce adb_setsockopt() which just calls setsockopt() on non-Win32, and which uses the Winsock SOCKET handle on Win32. The change also moves Win32 disable_tcp_nagle() to a header and adds an extra sanity check to adb_shutdown(). Change-Id: I4354e818d27538f7ff5b0e70b28bdb6300e1b98b Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
* Fix adb/fastboot windows compilations.Christopher Ferris2014-12-091-0/+1
| | | | | | | | | Many of the windows files where not including stdlib.h even though they are using malloc/free calls. (cherry-pick of ae7bf0959bd3f79afbf365e41f015ed1c304afdc.) Change-Id: If6959df9909d9d9928e9f4a2a96018166361cf3c
* Fix windows-specific error without messing up Makefile flags.Stephen Hines2014-10-011-1/+1
| | | | | | | | | Bug: 14416410 The proper fix for the error/warning we encountered is to move winsock2.h in front of windows.h. Change-Id: I29504ba3a184a85c6636d06c2ad900828fdb5436
* Remove obsolete reference to ddk; Fixes for -WerrorAndrew Hsieh2014-09-301-1/+1
| | | | | | | | | | | | | | | | Bug: 14416410 1. The new mingw-w64 toolchain x86_64-w64-mingw32-4.8 has ddk in x86_64-w64-mingw32/include/ddk 2. Add -Wno-error=cpp to suppress a warning that turns into error thanks to -Werror: Please include winsock2.h before windows.h 3. Cast GetLastError() return type DWORD to "int" 4. Include direct.h for _mkdir 5. Include stdint.h for uint8_t on Windows Change-Id: I4bec0587f6573692f08c760da6c98ae551b8b5eb
* Fix win32 undefined reference to `_socket_network_client_timeout'.Elliott Hughes2014-05-201-0/+7
| | | | Change-Id: I063213957b8452f4690da0f64872075f7c27b4cd
* adb: turn on -WerrorMark Salyzyn2014-05-051-2/+2
| | | | | | - Deal with some -Wunused issues Change-Id: Idfd1a114e68ae637978b52fde5144d0dca0ec79f
* Windows adb: initialize on to 1 in disable_tcp_nagleRay Donnelly2013-01-111-1/+1
|
* adb: Use bionic's strtok_r() for WindowsScott Anderson2012-06-051-0/+78
| | | | | | | | | | A recent change use strtok_r which broke the Windows build. Clear this potential landmine by adding adb_strtok_r to sysdeps.h in the typical fashion. For Windows, the actual implementation in sysdeps_win32.c was copied from bionic/libc/string/strtok.c. Change-Id: Ibb71555bc429f7058c07c3d39e0b62859c79635c Signed-off-by: Scott Anderson <saa@android.com>
* Fixes ADB crash on Windows due to large number of connections. do not merge.Vladimir Chtchetkine2011-12-051-15/+190
| | | | | | | | | | | | The reason for the crash is that ADB on Windows uses WaitForMultipleObjects to wait on connection events. When number of connections exceeds 64, ADB crashes, because WaitForMultipleObjects API doesn't support more than 64 handles. This CL contains a fixer routine that allows waiting on an arbitrary number of handles. (cherry picked from commit ac52833e48f46dfd9f7c8f86236ee8b437850c0a) Change-Id: I8ad264765e5b38d01a31e42b445f97ea86e49948
* adb: Add "adb disconnect" command for disconnecting TCP/IP devices.Mike Lockwood2009-10-111-0/+14
| | | | | | | Also check that device is not already connected in "adb connect" Change-Id: I5f84b56b63d8c6932f23791cac319fd6bc39d36c Signed-off-by: Mike Lockwood <lockwood@android.com>
* Cleaning up whitespace in adb sources. Nothing more, nothing less.David 'Digit' Turner2009-05-181-5/+5
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+1953
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-1953/+0
|
* Code drop from //branches/cupcake/...@124589The Android Open Source Project2008-12-171-58/+58
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+1953