summaryrefslogtreecommitdiffstats
path: root/minzip (follow)
Commit message (Collapse)AuthorAgeFilesLines
* SELinux can be assumed for Android 4.4+Matt Mower2017-01-181-6/+0
| | | | Change-Id: I7410a0c8e439eec90a955ee9201efd9a92bb9635
* Update to 7.0Ethan Yonker2016-08-245-59/+102
|\ | | | | | | Change-Id: I621cc47352f7ac552d9602485825ae3a6f9ae516
| * resolve merge conflicts of e5d3d15cd2 to nyc-devYabin Cui2016-02-231-15/+52
| |\ | | | | | | | | | Change-Id: Ie8b30e6b114b648e8c03866456c64cf8b740d1e3
| | * Fix integer overflows in recovery procedure.Yabin Cui2016-02-221-15/+54
| | | | | | | | | | | | | | | | | | Bug: 26960931 Change-Id: Ieae45caccfb4728fcf514f0d920976585d8e6caf (cherry picked from commit a029c9a45888141a2fa382e0b1868e55db1f36d2)
| * | Clean up LOG functions.Tao Bao2015-07-163-20/+20
| | | | | | | | | | | | | | | | | | | | | For fatal errors, use LOGE to show messages. Bug: 22236461 Change-Id: Ie2ce7ec769f4502d732fbb53fb7b303c0cf9ed68
| * | recovery: Switch applypatch/ and updater/ to cpp.Tao Bao2015-07-141-0/+8
| | | | | | | | | | | | | | | | | | | | | Mostly trivial changes to make cpp compiler happy. Change-Id: I1b0481465c67c3bbca35a839d0764190d84ff34e (cherry picked from commit ba9a42aa7e10686de186636fe9fecbf8c4cc7c19)
| * | Just use fstat in sysMapFile.Elliott Hughes2015-06-233-71/+24
| | | | | | | | | | | | | | | | | | Also turn on -Werror and remove a dead function. Change-Id: I436f0a91c40e36db985190b3b98b0a4527cf0eeb
| * | recovery: Switch to clangTao Bao2015-06-032-2/+2
| | | | | | | | | | | | | | | | | | And a few trival fixes to suppress warnings. Change-Id: I38734b5f4434643e85feab25f4807b46a45d8d65
| * | Check all lseek calls succeed.Elliott Hughes2015-04-302-8/+8
| | | | | | | | | | | | | | | | | | | | | Also add missing TEMP_FAILURE_RETRYs on read, write, and lseek. Bug: http://b/20625546 Change-Id: I03b198e11c1921b35518ee2dd005a7cfcf4fd94b
* | | minzip: Add support for >2GB zipfilenkk712016-01-223-10/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | normal zip limit is 4GB, but due to signed variables it will only access 2GB (32bit signed integer is from -2GB to +2GB). these changes allow for a theoretical limit of 4GB zips to be flashed. RAM restrictions still apply, and on a 32bit system it's likely to max out at approx 2.8GB flashable zip, above that mmap will probably fail. Note: the flashable zip also needs a compatible update-binary which include these changes. (this also applies to both aroma installer if it's being used). Change-Id: Ib3af2945c9bd4890a2e6dc45acfc2b80ec55473b
* | | minzip: Fixup libselinux includesMatt Mower2015-12-221-3/+7
| | | | | | | | | | | | Change-Id: Ic68f307a33e36437b9d21c442265c506b592129c
* | | Revert :Force sync files written by minzipmaxwen2015-10-251-8/+2
| | | | | | | | | | | | | | | | | | | | | forward port from 5.x https://gerrit.omnirom.org/#/c/12524/ Change-Id: I303662cf28278bd9dd3799b3d0b5a07f96169416
* | | Improve error handling for zip installthat2015-10-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - minzip: don't crash with corrupted zips (e.g. 4096 null bytes) - twinstall: output error when zip doesn't contain update-binary - twinstall: add strerror(errno) to system-level errors - twinstall: correct message if /file_contexts could not be extracted - twinstall: use TWFunc::Wait_For_Child for better waitpid errors - twinstall: minor code cleanup Change-Id: I53b156b0ec08755af2742bb71d1523ae38f4a82e
* | | Merge up to AOSP marshmallow-releaseEthan Yonker2015-10-095-241/+81
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to maintain compatibility with older trees, we now have minadbd.old and minui.old. I had to use a TARGET_GLOBAL_CFLAG to handle ifdef issues in minui/minui.d because healthd includes minui/minui.h and there was no other alternative to make minui.h compatible with older trees without having to modify healthd rules which is outside of TWRP. Note that the new minui does not currently have support for qcom overlay graphics. Support for this graphics mode will likely be added in a later patch set. If you are building in a 6.0 tree and have a device that needs qcom overlay graphics, be warned, as off mode charging may not work properly. A dead battery in this case could potentially brick your device if it is unable to charge as healthd handles charging duties. Update rules for building toolbox and add rules for making toybox Use permissive.sh in init.rc which will follow symlinks so we do not have to worry about what binary is supplying the setenforce functionality (toolbox, toybox, or busybox). Fix a few warnings in the main recovery binary source code. Fix a few includes that were missing that prevented compiling in 6.0 Change-Id: Ia67aa2107d260883da5e365475a19bea538e8b97
| * | Check all lseek calls succeed.Elliott Hughes2015-04-302-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)
| * Remove a couple of unused inlines from minzip/Zip.h.Elliott Hughes2015-04-081-10/+0
| | | | | | | | Change-Id: I805883e3863673416898bdef39c5703ca33f18e0
| * Remove more dead code from minzip.Narayan Kamath2015-02-272-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
| * am 829d392a: Merge "Delete unused functions from minzip."Narayan Kamath2015-02-242-93/+1
| |\ | | | | | | | | | | | | * commit '829d392a75f536861adfddefc21ec635f3460144': Delete unused functions from minzip.
| | * Delete unused functions from minzip.Narayan Kamath2015-02-232-93/+1
| | | | | | | | | | | | | | | | | | | | | | | | This is in preparation of replacing it with libziparchive and providing shim wrappers. bug: 19472796 Change-Id: I1f2fb59ee7a41434e794e4ed15b754aa2b74a11d
| * | am 99e084ca: Merge "Remove dead/unused code and realign some of the comments to make it more cleaner and easier to read"Nick Kralevich2015-02-083-23/+8
| |\| | | | | | | | | | | | | * commit '99e084ca8012bc7af52ae2fb9e72ab7180177daf': Remove dead/unused code and realign some of the comments to make it more cleaner and easier to read
| | * Remove dead/unused code and realign some of the commentsNanik Tolaram2015-02-083-23/+8
| | | | | | | | | | | | | | | | | | | | | to make it more cleaner and easier to read Change-Id: If536d482c0ed645368084e76d8ec060f05d89137 Signed-off-by: Nanik Tolaram <nanikjava@gmail.com>
| * | Force sync files written by minzip.Michael Runge2014-10-291-2/+8
| |/ | | | | | | | | | | | | Some files appear to be missing their sync to disk. Bug: 18145574 Change-Id: Ic858624a4dd65bbfc54d30f3a13c607078270345
* | Revert "Force sync files written by minzip."Andrew Dodd2015-03-131-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This has been causing significant performance degradation when flashing updates for the entirety of 5.0. I was originally hesitant to do this since we don't want unsynced files on an update, however - Our updater-script unmounts /system at the end of installation, which will force a sync. As a result the issue Google was trying to fix won't be present for our ZIPs. This reverts commit a6c142f2a579ea5e7cdfbc88e6a061c55029265a. Change-Id: I89b22e2677c4eda4d3e6338adc0046bf754d43b2
* | Use one mizip for allEthan Yonker2014-12-102-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | The new minzip did not compile in older trees due to needing mmap64. For older trees we will just use mmap instead. Remove all files and code pertaining to minzipold. Updater should now build properly in older trees as well. Eliminate use of PLATFORM_VERSION in favor of PLATFORM_SDK_VERSION which should be more consistent and reliable. Change-Id: I38d2b604a73d1b17a2072c7d60e990b81ece0c10
* | Merge in lollipop and attempt to fix merge conflictsEthan Yonker2014-11-066-328/+215
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will probably not compile and may need additional work. For tracking purposes so we know what might still need looking at as none of this has been compiled and tested, here is a list of the merge conflicts that I attempted to fix before pushing this set of changes: git pull aosp lollipop-release remote: Finding sources: 100% (992/992) remote: Total 992 (delta 473), reused 992 (delta 473) Receiving objects: 100% (992/992), 1.51 MiB | 516.00 KiB/s, done. Resolving deltas: 100% (473/473), completed with 42 local objects. From https://android.googlesource.com/platform/bootable/recovery * branch lollipop-release -> FETCH_HEAD * [new branch] lollipop-release -> aosp/lollipop-release Auto-merging verifier_test.cpp CONFLICT (content): Merge conflict in verifier_test.cpp Auto-merging verifier.h CONFLICT (content): Merge conflict in verifier.h Auto-merging verifier.cpp CONFLICT (content): Merge conflict in verifier.cpp Auto-merging updater/updater.c Auto-merging updater/install.c CONFLICT (content): Merge conflict in updater/install.c Auto-merging updater/Android.mk CONFLICT (content): Merge conflict in updater/Android.mk Auto-merging uncrypt/Android.mk CONFLICT (content): Merge conflict in uncrypt/Android.mk Auto-merging ui.cpp CONFLICT (content): Merge conflict in ui.cpp Auto-merging screen_ui.cpp Auto-merging roots.cpp CONFLICT (content): Merge conflict in roots.cpp CONFLICT (rename/delete): res-hdpi/images/progress_fill.png deleted in HEAD and renamed in cddb68b5eafbeba696d5276bda1f1a9f70bbde42. Version cddb68b5eafbeba696d5276bda1f1a9f70bbde42 of res-hdpi/images/progress_fill.png left in tree. CONFLICT (rename/delete): res-hdpi/images/progress_empty.png deleted in HEAD and renamed in cddb68b5eafbeba696d5276bda1f1a9f70bbde42. Version cddb68b5eafbeba696d5276bda1f1a9f70bbde42 of res-hdpi/images/progress_empty.png left in tree. CONFLICT (rename/delete): res-hdpi/images/icon_error.png deleted in HEAD and renamed in cddb68b5eafbeba696d5276bda1f1a9f70bbde42. Version cddb68b5eafbeba696d5276bda1f1a9f70bbde42 of res-hdpi/images/icon_error.png left in tree. Auto-merging recovery.cpp CONFLICT (content): Merge conflict in recovery.cpp Auto-merging minui/resources.c CONFLICT (content): Merge conflict in minui/resources.c Auto-merging minui/minui.h CONFLICT (content): Merge conflict in minui/minui.h Auto-merging minui/graphics.c CONFLICT (content): Merge conflict in minui/graphics.c Auto-merging minui/Android.mk CONFLICT (content): Merge conflict in minui/Android.mk Removing minelf/Retouch.h Removing minelf/Retouch.c Auto-merging minadbd/usb_linux_client.c CONFLICT (content): Merge conflict in minadbd/usb_linux_client.c Auto-merging minadbd/adb.h CONFLICT (content): Merge conflict in minadbd/adb.h Auto-merging minadbd/adb.c CONFLICT (content): Merge conflict in minadbd/adb.c Auto-merging minadbd/Android.mk CONFLICT (content): Merge conflict in minadbd/Android.mk Removing make-overlay.py Auto-merging install.h CONFLICT (content): Merge conflict in install.h Auto-merging etc/init.rc CONFLICT (content): Merge conflict in etc/init.rc Auto-merging bootloader.h Auto-merging applypatch/applypatch.c Auto-merging applypatch/Android.mk CONFLICT (content): Merge conflict in applypatch/Android.mk Auto-merging adb_install.cpp CONFLICT (content): Merge conflict in adb_install.cpp Auto-merging Android.mk CONFLICT (content): Merge conflict in Android.mk Automatic merge failed; fix conflicts and then commit the result. Change-Id: I3e0e03e48ad8550912111c7a5c9a140ed0267e2c
| * | Force sync files written by minzip.Michael Runge2014-10-291-2/+8
| |/ | | | | | | | | | | | | Some files appear to be missing their sync to disk. Bug: 18145574 Change-Id: Ic858624a4dd65bbfc54d30f3a13c607078270345
| * Allow 0-byte files in full OTAs.Michael Runge2014-05-091-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
| * minzip: 64 bit build issueMark Salyzyn2014-03-181-1/+1
| | | | | | | | | | | | | | Regression - verification and extraction on memory, not files Bug: 12188746 Change-Id: Ib6facc4aff6be3a31a7d184ef1c493fdd4012c21
| * add mzGetStoredEntry functionDoug Zongker2014-02-132-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
| * am 2739ed96: am a5d105e2: Merge "recovery: fix building with pointer-to-int errors turned on"Colin Cross2014-02-061-2/+2
| |\ | | | | | | | | | | | | * commit '2739ed9628f72813d213b7a429c4c1b8dcebe5fc': recovery: fix building with pointer-to-int errors turned on
| | * recovery: fix building with pointer-to-int errors turned onColin Cross2014-02-061-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
| | * updater: Delete dead codeNick Kralevich2013-09-172-66/+0
| | | | | | | | | | | | | | | | | | | | | | | | set_perm and set_perm_recursive are no longer used. Delete. (cherry picked from commit 08ef9a957027183dcf55e432441e8fb0d5299aba) Change-Id: I1bcc90ae19af9df4f0705496c5876987159f75ac
| * | log extra info for debuggingDoug Zongker2014-01-211-0/+2
| | | | | | | | | | | | | | | | | | | | | Make recovery log its PID, and when we use a block map file, log how many ranges it contains. Change-Id: I1b4299f8163af68a770b48c029ae25e6cb45d26b
| * | do verification and extraction on memory, not filesDoug Zongker2014-01-164-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
| * | remove dead code from minzipDoug Zongker2014-01-132-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
| * | updater: Delete dead codeNick Kralevich2013-09-112-66/+0
| |/ | | | | | | | | | | set_perm and set_perm_recursive are no longer used. Delete. Change-Id: I3bb40b934b6c093b24b88aa4ed6f3c7de2bb52f0
| * Revert "Update OTA installer to understand SELinux filesystem labels"Nick Kralevich2013-09-092-8/+3
| | | | | | | | | | | | | | This reverts commit 627eb30f73c29257acaeb6568f3da38880784f7c. Bug: 10183961 Bug: 10186213
| * Update OTA installer to understand SELinux filesystem labelsNick Kralevich2013-07-192-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
* | Make SELinux automatic if presentDees Troy2013-09-121-1/+1
| |
* | Update to latest AOSP masterDees_Troy2013-09-046-28/+11
|\| | | | | | | Merge in latest commits from AOSP master and fix merge conflicts
| * am 9028fb4d: Merge "Pass the correct pointer to munmap on failure."Elliott Hughes2012-12-171-4/+4
| |\ | | | | | | | | | | | | * commit '9028fb4d4ceed040c7d3ae9b1ceaa5a7472856ba': Pass the correct pointer to munmap on failure.
| | * Pass the correct pointer to munmap on failure.Elliott Hughes2012-12-171-4/+4
| | | | | | | | | | | | | | | | | | | | | This won't ever happen, and you're probably screwed anyway if it does, but that's no excuse... Change-Id: I2c56f607e351e84308a72b41b834d13aaa98fc62
| * | reduce some recovery loggingDoug Zongker2012-10-191-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
| * Remove HAVE_SELINUX guardsKenny Root2012-10-165-23/+2
| | | | | | | | Change-Id: Ia96201f20f7838d7d9e8926208977d3f8318ced4
* | Fix building of updater binaryDees_Troy2013-04-111-0/+27
| |
* | Move all AOSP code out of recovery binaryDees_Troy2013-04-041-1/+2
|/ | | | | | Improves license compatibility between GPL and Apache Change-Id: I2b165aa575bb6213af6b07936f99610c113443f0
* Fix multiple defined symbol errorsEdwin Vane2012-08-211-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>
* resolved conflicts for merge of 0b1fee1b to masterKenny Root2012-03-315-7/+67
|\ | | | | | | Change-Id: I2e8298ff5988a96754f56f80a5186c9605ad9928
| * Extend recovery and updater to support setting file security contexts.Stephen Smalley2012-03-305-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
* | turn recovery into a C++ binaryDoug Zongker2011-10-312-0/+16
|/ | | | Change-Id: I423a23581048d451d53eef46e5f5eac485b77555
* add a one-argument version of package_extract_fileDoug Zongker2010-02-012-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
* undo temporary alignment hackDoug Zongker2009-05-082-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.
* align data passed to write() on 32k boundariesDoug Zongker2009-05-062-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).
* handle short writes when unzipping filesDoug Zongker2009-04-301-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.
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-0413-0/+3118
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-0413-3118/+0
|
* Initial ContributionThe Android Open Source Project2008-10-2113-0/+3118