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
Introduce the "adb keygen" command.
Usage: adb keygen <filename>
This command creates an adb public/private key pair in a user
specified file. This can be used to create new adb keys, or rotate
existing keys.
Modify adb's key generation routines to use the HOSTNAME/LOGNAME
environment variables if available. This allows someone to override
the username/hostname embedded within the adb public key file if
desired. Fallback to the old mechanisms if those environment
variables aren't available.
Bug: 18342715
Change-Id: Ibccee6088d4609aa05ad6687d3a1d8a8689d3e8a
(cherry picked from commit af782b9f2a)
Change-Id: Ic76ffc9412171dddc879af0bbf6e20fbe1a8f057
Change-Id: I5a350bfa5641365d7a0939d89c6f477c335e948a
Signed-off-by: Zhuang Jin Can <jin.can.zhuang@intel.com>
Signed-off-by: Robert Chiras <robert.chiras@intel.com>
Replace the use of CFStringGetCString with kCFStringEncodingASCII specified
with CFStringGetFileSystemRepresentation which will ensure the correct
character encoding is used to conver the CFString into a NULL terminated
char array suitable for use with POSIX APIs.
Change-Id: Ibab1dc05c4f4db8604d329a493b4241992b8e69d
Companion patch for change I2bf583a27f9a3f98ef006ea62b906a4f89960507.
Due to the use of USB class 0xff it's not possible to register a listener
which uses the OS methods for filtering notifications, so this patch
also introduces a check in the notification listener which checks the
class, subclass, and protocol for the interface each notification relates
to.
Change-Id: I380cc80f96addc5057660efb2179b35f9378886a
The previous implementation returned the path the executable was in instead
of returning the path including the executable (i.e. it returned ...bin
instead of ...bin/executable). This is not what the original methods did
and caused the process forking of adb to fail.
This patch corrects the implementation.
Change-Id: Ib58497cab35706041f170c1bc97c31fd5d965f90
It's time we switched to blacklisting any problematic devices rather than
slowly whitelisting the entire world. This seems to work for me, but let's
see how other people get on before coming back to actually remove the list.
We'll also need to find a Mac to test the equivalent Mac change.
Change-Id: I2bf583a27f9a3f98ef006ea62b906a4f89960507
Recent versions of XCode fail to compile the adb and fastboot binaries due to
two functions being deprecated in 10.9 (GetCurrentProcess and
ProcessInformationCopyDictionary), and the use of -Werrror.
This patch replaces the method implementations which use calls to methods
deprecated in the 10.9 SDK with versions which only call non-deprecated methods.
Change-Id: I855bf26aff45093ca9022924f3ecd1b80f2305a8
Bug: 14416410
The proper fix for the error/warning we encountered is to move winsock2.h
in front of windows.h.
Change-Id: I29504ba3a184a85c6636d06c2ad900828fdb5436
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
adbd was spinning between select & read (0 bytes) for an adb_auth
socket. The read documentation states: "On success, the number of
bytes read is returned (zero indicates end of file)" so the code has
been modified to close the connection (like the read error case).
BUG=17419868
Change-Id: I1d8fb70c8e1876225ba8d47ea0a2b6265a7d182b
strlen returns a size_t, but the * modifier in printf expects an int.
On arm64 size_t != int.
(cherry-picked from commit 6d6a898b0c)
Change-Id: I11e84a7b62c935162abc0aba910d14e63d11efd3
The sideload-host mode turns the host into a server capable of sending
the device various pieces of the file on request, rather than
downloading it all in one transfer. It's used to support sideloading
OTA packages to devices without the need for them to hold the whole
package in RAM.
If the connected device doesn't support sideload-host mode, we fall
back to the older sideload connection.
(cherry-picked from commit 71fe584a1a)
Change-Id: I5adaedd8243dc3b76414bba0149879ca2bbf35fa