summaryrefslogtreecommitdiffstats
path: root/minzip (unfollow)
Commit message (Collapse)AuthorFilesLines
2016-03-21Fix: full ota package larger than 2GB fails to upgradecaozhiyuan2-12/+14
Change-Id: I45d9fab8739cc6fa8a0bacaca9238896118d9d7f Signed-off-by: diruomeng <di.ruomeng@zte.com.cn> Signed-off-by: caozhiyuan <cao.zhiyuan@zte.com.cn>
2016-02-23Surpress warnings in minzip/Zip.cTianjie Xu1-4/+1
bootable/recovery/minzip/Zip.c:514:5: warning: Value stored to 'compRemaining' is never read compRemaining = pEntry->compLen; ^ ~~~~~~~~~~~~~~~ bootable/recovery/minzip/Zip.c:778:9: warning: Null pointer argument in call to memory copy function memcpy(p, helper->targetDir, helper->targetDirLen); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Bug: 27229894 Change-Id: I0482bac3a4fcddc191783d1e5b5a83cf29fa4e85
2016-02-11Fix some memory leaks.Yabin Cui2-42/+21
Bug: 26906328 Change-Id: Iebaf03db0cb3054f91715f8c849be6087d01b27b
2015-11-16DO NOT MERGE recovery: Switch applypatch/ and updater/ to cpp.Tao Bao1-0/+8
Mostly trivial changes to make cpp compiler happy. Change-Id: I69bd1d96fcccf506007f6144faf37e11cfba1270 (cherry picked from commit ba9a42aa7e10686de186636fe9fecbf8c4cc7c19)
2015-11-16recovery: Switch to clangTao Bao2-2/+2
And a few trival fixes to suppress warnings. Change-Id: Id28e3581aaca4bda59826afa80c0c1cdfb0442fc (cherry picked from commit 80e46e08de5f65702fa7f7cd3ef83f905d919bbc)
2015-07-17Clean up LOG functions.Tao Bao3-20/+20
For fatal errors, use LOGE to show messages. Bug: 22236461 Change-Id: I2b7d761576894ac37fcbadcba690ae14affe8f07 (cherry picked from commit d7d0f7503456c3d275a49f90be35e03f02c51bbd)
2015-07-14recovery: Switch applypatch/ and updater/ to cpp.Tao Bao1-0/+8
Mostly trivial changes to make cpp compiler happy. Change-Id: I69bd1d96fcccf506007f6144faf37e11cfba1270
2015-06-23Just use fstat in sysMapFile.Elliott Hughes3-71/+24
Also turn on -Werror and remove a dead function. Change-Id: I436f0a91c40e36db985190b3b98b0a4527cf0eeb
2015-06-03recovery: Switch to clangTao Bao2-2/+2
And a few trival fixes to suppress warnings. Change-Id: I38734b5f4434643e85feab25f4807b46a45d8d65
2015-04-30Check all lseek calls succeed.Elliott Hughes2-8/+8
Also add missing TEMP_FAILURE_RETRYs on read, write, and lseek. Bug: http://b/20625546 Change-Id: I03b198e11c1921b35518ee2dd005a7cfcf4fd94b (cherry picked from commit 7bad7c4646ee8fd8d6e6ed0ffd3ddbb0c1b41a2f)
2015-04-30Check all lseek calls succeed.Elliott Hughes2-8/+8
Also add missing TEMP_FAILURE_RETRYs on read, write, and lseek. Bug: http://b/20625546 Change-Id: I03b198e11c1921b35518ee2dd005a7cfcf4fd94b
2015-04-08Remove a couple of unused inlines from minzip/Zip.h.Elliott Hughes1-10/+0
Change-Id: I805883e3863673416898bdef39c5703ca33f18e0
2015-02-27Remove more dead code from minzip.Narayan Kamath2-107/+58
I've added explanatory comments to mzExtractRecursive because that function will live on as a utility even after we move the zip format related logic to libziparchive. bug: 19472796 Change-Id: Id69db859b9b90c13429134d40ba72c1d7c17aa8e
2015-02-27Remove more dead code from minzip.Narayan Kamath2-113/+64
I've added explanatory comments to mzExtractRecursive because that function will live on as a utility even after we move the zip format related logic to libziparchive. bug: 19472796 (cherry-picked from commit c9ccdfd7a42de08c47ab771b94dc5b9d1f957b95) Change-Id: I8b7fb6fa3eafb2e7ac080ef7a7eceb691b252d8a
2015-02-23Delete unused functions from minzip.Narayan Kamath2-93/+1
This is in preparation of replacing it with libziparchive and providing shim wrappers. bug: 19472796 Change-Id: I1f2fb59ee7a41434e794e4ed15b754aa2b74a11d
2015-02-08Remove dead/unused code and realign some of the commentsNanik Tolaram3-23/+8
to make it more cleaner and easier to read Change-Id: If536d482c0ed645368084e76d8ec060f05d89137 Signed-off-by: Nanik Tolaram <nanikjava@gmail.com>
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-03-18minzip: 64 bit build issueMark Salyzyn1-1/+1
Regression - verification and extraction on memory, not files Bug: 12188746 Change-Id: Ib6facc4aff6be3a31a7d184ef1c493fdd4012c21
2014-02-13add mzGetStoredEntry functionDoug Zongker2-2/+30
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-21log extra info for debuggingDoug Zongker1-0/+2
Make recovery log its PID, and when we use a block map file, log how many ranges it contains. Change-Id: I1b4299f8163af68a770b48c029ae25e6cb45d26b
2014-01-16do verification and extraction on memory, not filesDoug Zongker4-137/+186
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
2014-01-13remove dead code from minzipDoug Zongker2-134/+0
minzip had some features that were used when reading APKs, but APK handling now uses libziparchive instead of minzip. Remove these unused functions. Change-Id: Iead89209a716bfe9e3d339bf85b3e97e33a41f35
2013-09-17updater: Delete dead codeNick Kralevich2-66/+0
set_perm and set_perm_recursive are no longer used. Delete. (cherry picked from commit 08ef9a957027183dcf55e432441e8fb0d5299aba) Change-Id: I1bcc90ae19af9df4f0705496c5876987159f75ac
2013-09-11updater: Delete dead codeNick Kralevich2-66/+0
set_perm and set_perm_recursive are no longer used. Delete. Change-Id: I3bb40b934b6c093b24b88aa4ed6f3c7de2bb52f0
2013-09-09Revert "Update OTA installer to understand SELinux filesystem labels"Nick Kralevich2-8/+3
This reverts commit 627eb30f73c29257acaeb6568f3da38880784f7c. Bug: 10183961 Bug: 10186213
2013-07-19Update OTA installer to understand SELinux filesystem labelsNick Kralevich2-3/+8
Modify the OTA installer to understand SELinux filesystem labels. We do this by introducing new set_perm2 / set_perm2_recursive calls, which understand SELinux filesystem labels. These filesystem labels are applied at the same time that we apply the UID / GID / permission changes. For compatibility, we preserve the behavior of the existing set_perm / set_perm_recursive calls. If the destination kernel doesn't support security labels, don't fail. SELinux isn't enabled on all kernels. Bug: 8985290 Change-Id: I99800499f01784199e4918a82e3e2db1089cf25b
2012-12-17Pass the correct pointer to munmap on failure.Elliott Hughes1-4/+4
This won't ever happen, and you're probably screwed anyway if it does, but that's no excuse... Change-Id: I2c56f607e351e84308a72b41b834d13aaa98fc62
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 Root5-23/+2
Change-Id: Ia96201f20f7838d7d9e8926208977d3f8318ced4
2012-08-21Fix multiple defined symbol errorsEdwin Vane1-1/+1
Use of __inline__ by projects in bootable/* was causing problems with clang. Following the BKM and replaced use of __inline__ with __attribute((__gnu_inline)). Change-Id: If4ccfded685bb2c9d9c23c9b92ee052208399ef0 Author: Edwin Vane <edwin.vane@intel.com> Reviewed-by: Kevin P Schoedel <kevin.p.schoedel@intel.com>
2012-03-30Extend recovery and updater to support setting file security contexts.Stephen Smalley5-7/+67
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
2011-10-31turn recovery into a C++ binaryDoug Zongker2-0/+16
Change-Id: I423a23581048d451d53eef46e5f5eac485b77555
2011-10-28turn recovery into a C++ binaryDoug Zongker2-0/+16
Change-Id: I68a67a4c8edec9a74463b3d4766005ce27b51316
2010-02-01add a one-argument version of package_extract_fileDoug Zongker2-0/+44
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 Zongker2-48/+8
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 Zongker2-17/+55
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 Project13-0/+3118
2009-03-04auto import from //depot/cupcake/@135843The Android Open Source Project13-3118/+0