| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| | |
am: 704d818ec1
Change-Id: Ic1ab5e824dcc2b6a78e8ceb29732185ad5da1987
|
| |
| |
| |
| |
| |
| | |
Noticed on b/30765660.
Change-Id: I1a98f83fef02a7368bdc2e1f8f24a0771eebe468
|
|\|
| |
| |
| | |
Change-Id: I5a7faca3249f0c038914540b1dd29edf0084c0e1
|
| |
| |
| |
| | |
Change-Id: I6f0df9046b848ee8b841ae0a608a6adc981788e7
|
|\|
| |
| |
| |
| |
| |
| |
| |
| | |
am: e641a2f
* commit 'e641a2fa619c29dc25c329520ea300c21f908dcc':
Fix google-explicit-constructor warnings.
Change-Id: I461fe586fd8d23fa5abbe94859e609c29fbe889a
|
| |
| |
| |
| |
| | |
Bug: 28341362
Change-Id: I5d1988efc1563efbdb25c867713c54f41439a82a
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Also use ReadFully to replace read, because read can
return reading bytes less than requested. And use
WriteFully to replace write.
Bug: 26962895
Change-Id: Iff0b2bc6d925619a537f7fef682c2a7ad89a2dc2
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ag/880725 modified ReadAtOffset to seek then read from the open
file descriptor. Previously pread64 was used to provide atomic
behaviour.
This causes races when multiple threads are trying to access data from
the file. This is supported, so this change reverts the relevant parts
of the above CL to restore the old behaviour.
Bug:27563413
Change-Id: I7bffd78da8c558745dfc3c072ba9691b1b15bb5b
|
|/
|
|
|
|
|
|
|
|
| |
Also use ReadFully to replace read, because read can
return reading bytes less than requested. And use
WriteFully to replace write.
Bug: 26962895
Change-Id: Iff0b2bc6d925619a537f7fef682c2a7ad89a2dc2
(cherry picked from commit 8e6f7227641e05dccfc29dad62e29e730ff8f5ca)
|
|
|
|
|
|
|
|
|
| |
The current code only allows the creation of an entry that is 32 bit
aligned.
Bug: 25446938
Change-Id: I6c924df12ef2bc067b3de7789257af7e3db7e904
|
|
|
|
|
|
|
|
|
| |
This allows someone to stream the data out of a zip archive
instead of extracting to a file or to memory.
Included in this change is a small cleanup of the makefile.
Change-Id: I8b679a679c3502ff4ea0bc4f9e918303657fa424
|
|
|
|
| |
Change-Id: Idf9444fece4aa89c93e15640de59a91f6e758ccf
|
|
|
|
|
|
|
|
|
| |
The code does not handle an edge case where writing a compressed
image can overflow the avail_out data when doing a flush. Add a
loop to keep writing the data while deflate indicates that it doesn't
have enough space to write out the compressed data during the flush.
Change-Id: I1f1d1646457ed9b67ed24f6582688c300186c23c
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Misunderstood that disk numbers were 1 index based.
Change-Id: I0c1f43436f1c5e9394818ad12164f6d7b982cbd8
|
|\| |
|
| |
| |
| |
| |
| |
| | |
Use zlib to deflate compress data into the zip file.
Change-Id: If094b926a67e199be976c3190781cd0101dd66e1
|
|/
|
|
|
|
|
|
| |
Take mod_date into account as well, and fixes the issue where
all entries had creation dates in 1979.
Signed-off-by: beonit <beonit@gmail.com>
Change-Id: Id101794fa08218d15f2d1ba4e4a313c1807ea7aa
|
|
|
|
|
|
|
|
| |
The ZipWriter implementation exposes a stateful interface that allows
bytes of data to be streamed in as they arrive. ZipEntries can be
compressed and/or aligned on a 32-bit boundary for mmapping at runtime.
Change-Id: I43ac9e661aa5022f00d9e12b247c4314d61c441c
|
|
|
|
|
|
|
|
| |
CYGWIN is not supported, USE_MINGW and HOST_OS==windows are being
replaced with LOCAL_..._windows variables.
Bug: 23566667
Change-Id: I3e4a1e4097dc994cf5abdce6939e83a91758fd75
|
|
|
|
|
|
|
|
| |
Linking against both libziparchive-host and libz-host results in
libz loaded twice (because it is also linked statically in
libziparchive).
Change-Id: Ib34eef60200a702c2d7fbca3589b324992e78eab
|
|
|
|
|
|
|
|
|
|
| |
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 f1d3d3b2477a813805b71099c60e07d36dbb225a.
Bug: 21957428
Change-Id: I60d4171eeacc561d59226d946e9eb5f9c96d80cf
|
|
|
|
|
|
|
|
|
|
| |
so that PackageManagerService can iterate over files with a
specific file extension like ".so".
(cherry picked from commit a4a80693d9687982461decdcf86920b3e76bb41a)
Bug: 21957428
Change-Id: I36ba3c33a8b366a65f67cb6d156067c5caca1151
|
|
|
|
| |
Change-Id: I949317deaf782fea18b5c38b22dfd41811608276
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The objective of fallocate call seems to be to
make sure that we have enough enough space left
in the disk to house the uncompressed file.
But, fallocate is only supported in the following
file systems:
btrfs, ext4, ocfs2, and xfs
Return error only when fallocate fails due to
lack of space. The immediate ftruncate call is
going to take of the majority of other errors.
Bug: 21561449
Change-Id: I7083f3c7e5d745bd6e8a190ac9020297d638d9d4
|
|
|
|
|
|
|
|
| |
Fails build on Mac.
This reverts commit 2148a1243ea9bfe2df491d39f63bd6d813dda252.
Change-Id: Ib4f0ba0b0a42500f20b7d73ca91363477fe3d093
|
|
|
|
|
|
|
|
|
|
| |
Linking against both libziparchive-host and libz-host results in
libz loaded twice (because it is also linked statically in
libziparchive).
bug: 21365909
Change-Id: Ie924e0b38e4c0811daff06e7c0bfed048e7ca82f
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Change-Id: I69105a9cde05b182f65c7e574282bb4b48b66e95
Signed-off-by: Greg Hackmann <ghackmann@google.com>
|
|
|
|
|
|
|
| |
It's unnecessary, and causes issues when the uncompressed
output is large.
Change-Id: I99cfb3933b094c2826c7e6c6de9aab03478fcc53
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There were crashes when android failed to extract
zip archives due to out of free space on disk, with stacks like:
#00 pc 00000000000156b0 /system/lib64/libc.so (memcpy+176)
#01 pc 000000000002e5b8 /system/lib64/libandroidfw.so
#02 pc 000000000002f488 /system/lib64/libandroidfw.so (ExtractToMemory+328)
#03 pc 000000000002f5c8 /system/lib64/libandroidfw.so (ExtractEntryToFile+268)
#04 pc 00000000000287d8 /system/lib64/libandroidfw.so (android::ZipFileRO::\
uncompressEntry(void*, int) const+12)
Space for the file is now allocated using fallocate rather than
ftruncate, since ftruncate dont actually reserve space on disk. When writes
to the mmaped pointer fails to be realized due to out of space SIGBUS
is the result. With this change we make sure that there is space available
before mmaping the pointer.
Change-Id: Ic5e8c33dbe729edb57919dacff73811b34cc2dc2
|
|
|
|
| |
Change-Id: I4afc3729a1b2c06a6621cb8c9742fc94b5a665f5
|
|
|
|
| |
Change-Id: I720b8ef1050da45a7833adef8219b6acb2cf3a38
|
|
|
|
|
|
|
| |
Bug: 19888174
Change-Id: I33a577909ced522d46223e2182e0bb18c291af27
Signed-off-by: Greg Hackmann <ghackmann@google.com>
|
|
|
|
|
|
|
|
|
| |
libziparchive fails to iterate some bootanimation archives
reporting invalid offset error. This is caused by failure
to process a directory with one file
(when name_offset + file_name_length == cd_offset).
Change-Id: I2733e7f782c14a6fadd5491bb94318ac968df206
|
|
|
|
| |
Change-Id: I96c8a50e8987e8ea77d0766ccf3c619f60377864
|
|
|
|
| |
Change-Id: I9c4b3a5aecf4011653933b051e67605a6feb123f
|
|
|
|
|
|
|
| |
Added pragmas to disable checks for the method
using libz.h macros.
Change-Id: I25aa1adf09f3ecff61d8fea6306b24b37990ab46
|
|
|
|
|
|
| |
libz.h has macros using old-style-cast.
Change-Id: I48f7d85805c7c34e1453c863da3c9e734a57d479
|
|
|
|
| |
Change-Id: I0e162c8e0a700940f4302786b8523e5b2f5e5c27
|
|
|
|
| |
Change-Id: I6e17fd993557cbf78ade787f112794358aee39c8
|
|
|
|
| |
Change-Id: I97bb72b9edeee5b3eff4ffd21a761a1af472a3b5
|
|
|
|
|
|
|
|
|
| |
Nobody ever called acquire() so release() was always
equivalent to delete. Just use delete instead so that
people can use unique_ptr directly (or shared_ptr if
they really want refcounts).
Change-Id: I9e3ad5e0f6a4fcc4e02e5a2ff7ef9514fe234415
|
|
|
|
|
|
| |
* We should be able to keep fd alive after CloseArchive()
Change-Id: I1aa2c039bb2a590ae72f256acc9ba5401c2c59b1
|
|\ |
|
| |
| |
| |
| |
| | |
bug: 18584205
Change-Id: Iaf3e8211dab6a1e3923f7fee6ea7fc693972dba3
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Removed LOCAL_C_INCLUDES which are no longer necessary as zlib
now uses the LOCAL_EXPORT_C_INCLUDE_DIRS mechanism.
Removed a couple of redundant LOCAL_MODULE entries
Tested compiling some of the projects that make use of libziparchive
and libziparchive-host using a clean out dir with aosp_flounder-userdebug
aosp_arm-eng targets
make -j3 libziparchive libandroidfw libartd libart libjavacore libjavacoretests aapt
Change-Id: I2988f1b3a62d1df2b5eada4ad39a9246ac1184fb
|
|
|
|
|
|
| |
For build-system CFLAGS clean-up, remove unused variable.
Change-Id: Icc33cf5d0a5fe9a77c277b100de01b70164cc351
|
|
|
|
|
| |
Bug: 18397613
Change-Id: I3990bd0f95cf38c5a9229180a1ddc699941892fc
|
|\
| |
| |
| |
| | |
* commit '7a92d20ec845c07472eaea7cf14fd0e69df836ef':
Clean up some test makefiles.
|