summaryrefslogtreecommitdiffstats
path: root/minzip/Zip.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2014-10-29Force sync files written by minzip.Michael Runge1-2/+8
Some files appear to be missing their sync to disk. Bug: 18145574 Change-Id: Ic858624a4dd65bbfc54d30f3a13c607078270345
2014-05-09Allow 0-byte files in full OTAs.Michael Runge1-1/+3
Currently, the writeProcessFunction fails when there are zero bytes to write, potentially returning errno from a previous operation, or hanging indefinitely while it waits for a >0 result on a write of size 0. This happens when the output file is intended to be zero bytes in size. Change-Id: Ib3cfcaf66d82942bc89e5f5c64697862403b38da
2014-02-13add mzGetStoredEntry functionDoug Zongker1-2/+19
mzGetStoredEntry gives you a pointer and address to the data of a zip entry, assuming that entry is stored rather than deflated. Change-Id: Ifb39777c98d1d50475ef7de419cf28935f5f9965
2014-02-06recovery: fix building with pointer-to-int errors turned onColin Cross1-2/+2
Use intptr_t/uintptr_t to cast between pointer and int to allow building with -Werror=pointer-to-int-cast and Werror=int-to-pointer-cast turned on. Cast to char* instead of unsigned int for pointer arithmetic. Change-Id: Ia862306fdcca53866b330e8cf726f3d62f2248a0
2014-01-16do verification and extraction on memory, not filesDoug Zongker1-98/+23
Changes minzip and recovery's file signature verification to work on memory regions, rather than files. For packages which are regular files, install.cpp now mmap()s them into memory and then passes the mapped memory to the verifier and to the minzip library. Support for files which are raw block maps (which will be used when we have packages written to encrypted data partitions) is present but largely untested so far. Bug: 12188746 Change-Id: I12cc3e809834745a489dd9d4ceb558cbccdc3f71
2012-10-19reduce some recovery loggingDoug Zongker1-1/+5
Make minzip log only a count of files when extracting, not individual filenames. Make patching only chatter about free space if there's not enough and compact the other messages. Only the last 8k of the recovery log gets uploaded; this makes it more likely that we will get all of it. Change-Id: I529cb4947fe2185df82b9da5fae450a7480dcecd
2012-10-16Remove HAVE_SELINUX guardsKenny Root1-4/+0
Change-Id: Ia96201f20f7838d7d9e8926208977d3f8318ced4
2012-03-30Extend recovery and updater to support setting file security contexts.Stephen Smalley1-3/+22
Extend minzip, recovery, and updater to set the security context on files based on the file_contexts configuration included in the package. Change-Id: Ied379f266a16c64f2b4dca15dc39b98fcce16f29
2010-02-01add a one-argument version of package_extract_fileDoug Zongker1-0/+37
Add a version of package_extract_file that returns the file data as its return value (to be consumed by some other edify function that expects to receive a bunch of binary data as an argument). Lets us avoid having two copies of a big file in memory (extracting it into /tmp, which is a ramdisk, and then having something load it into memory) when doing things like radio updates. Change-Id: Ie26ece5fbae457eb0ddcd8a13d74d78a769fbc70
2009-05-08undo temporary alignment hackDoug Zongker1-39/+7
Remove the memory alignment that mysteriously made OTA installs work, in anticipation of a kernel that fixes the actual problem. Handle EINTR properly.
2009-05-06align data passed to write() on 32k boundariesDoug Zongker1-16/+46
In donut, OTA installation often encounters the write() system call doing short writes -- which is legal but unexpected -- or failing with ENOSPC when plenty of space is available. Passing aligned memory buffers to write() appears to prevent (or at least reduce the frequency) of these problems. b/1833052 has been filed to look at the underlying problem, but this change aligns buffers we use with write() so we can OTA for now (or see if this problem still occurs).
2009-04-30handle short writes when unzipping filesDoug Zongker1-11/+27
minzip fails if write() doesn't write all the data in one call. Apparently this was good enough before, but it causes OTAs to fail all the time now (maybe due to the recently-submitted kernel)? Change code to attempt continuing after short writes.
2009-03-04auto import from //depot/cupcake/@135843The Android Open Source Project1-0/+1098
2009-03-04auto import from //depot/cupcake/@135843The Android Open Source Project1-1098/+0