since the struct is now used for other purposes. Also add some
comparator functions to the struct to simplify zip_archive.cc.
This is a follow-up CL for f1d3d3b247.
Bug: 21957428
Change-Id: I60d4171eeacc561d59226d946e9eb5f9c96d80cf
Windows' tmpfile(3) implementation requires administrator rights because
it creates temporary files in the root directory. Write an alternative
that uses the user's temporary directory instead.
Bug: http://b/21558406
Change-Id: Ic9aece5c69429797a332a97681a76b76ac3551bf
Also add -Wunreachable-code to the set of compiler flags, otherwise
noreturn becomes considerably less useful.
bug: https://code.google.com/p/android/issues/detail?id=171099
Change-Id: I9a95d45633c731c7046d4e4a39844d9cebfd1718
(cherrypick of 241bcf05e0e394bbf2681f359f52646dd6c707f6.)
unzip_to_file reports failures itself these days, so there's it's unhelpful
of the caller to just guess what might have gone wrong.
Bug: http://b/21558406
Change-Id: I1e3d06c6cf902b8c6ef333dc60fd8f49680a493b
We're already linking against libbase but we'll have to add
a libbase dependency to every target that includes libziparchive
as a STATIC_LIBRARY dependency, given that there's no way to
express that what we want (except by adding a LOCAL_WHOLE_STATIC_LIBRARY
dependency on libbase to libziparchive but that seems bad too)
Change-Id: I294ad389a9c61a1134a7bc323da25b0004a8f1e0
libc++.so is not widely available on the host, so we compile against
one built as part of the platform. This causes problems for adb and
fastboot, which are distributed through a number of channels - the
sdk, distro packages, downloaded from the build server, or manually
copied. Instead of forcing all users to handle libc++.so too,
statically link against libc++.
Change-Id: I51b75258653a23558c8b598802005f6c1166a439
Rather than malloc, ExtractToMemory, and write.
Also fix the tmpfile error check (tmpfile returns NULL on failure),
and improve error reporting.
Bug: 19765860
Change-Id: I236923e883128083377607f1519bb2e27b8f03f8
If you don't have android-info.txt in your zip file, you're probably
not using a current fastboot binary anyway.
Change-Id: Ic721dc5f068f704c6792493d1e99f05f907678ba
sparse_file_write_block calls functions that might failed. This patch
makes sparse_file_write_block catch the error code and propagate it.
Without this patch, fastboot crashes on a segmentation fault if
usb_write() fail during a sparse file image flashing.
Change-Id: If9c0e8dfac8fa380628a2504e13abe8cf7d62726
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
This matches the more general adb syntax, though the fastboot
protocol doesn't support rebooting into the recovery image.
Change-Id: I6d93d4c63d4a9b81c71e681e7a7bf76867fba019
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
When enumerating USB 3.x devices, an extra 6-byte SuperSpeed
companion descriptor follows each standard endpoint descriptor.
The loop parsing the descriptors will stumble if they're not
handled. Since they're not needed once the bulk endpoints are
identified, we can simply skip over them.
Change-Id: I7e73bcf9135f23c3059cd7c55b432557b28cb6ef
This was caught by clang 3.6's -Wpointer-bool-conversion. The device_path
field is a char[256], and thus never NULL. The intention for this code was
to check whether or not there is a named path at all. Checking whether this
is an empty string matches the original intent.
Change-Id: I5ccedc03167e6a457e472089de26130aff7f96e3
This is useful for writing Windows GUIs that want to parse the output of
fastboot before it exits.
Change-Id: Ic0171fe379fc4db7b65b1501e5f2e771ac7c62c4
Signed-off-by: Florian Bäuerle <florian.bae@gmail.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
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
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
With USB3.0 SS support the max packet size supported by USB protocol
is 1024 bytes. When connected to a USB device in SuperSpeed, if only
512 bytes are sent at a time the device would interpret each transfer
as a short packet and slows down overall throughput. To accommodate
for SuperSpeed USB bulk endpoints, increase the buffer size to 1024.
Change-Id: I4f447fe38045bc0008e2d6dd3f36c2d6819d6c15
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