| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove O_SYNC from mzExtractRecursive() and PackageExtractFileFn().
These functions deal with extracting whole files from the update
package onto a filesystem. If run on ext4 on a rotating disk, for
example, the O_SYNC flag will cause serious performance problems
and the extraction proecss can take over 30 minutes, with no
obvious benefits.
This API function already calls fsync(fd) after each file is
extracted to ensure data and metadata is written to the underlying
block device, so the O_SYNC calls should be superfluous and safely
removable.
This change does not affect the OTA patch paths or any modification
of the bootloader partition or writes to other 'emmc' partitions.
Signed-off-by: Alistair Strachan <alistair.strachan@imgtec.com>
Change-Id: I9cbb98a98e6278bf5c0d7efaae340773d1fbfcd2
|
|
|
|
|
| |
Bug: http://b/27764900
Change-Id: Ib62a59edcb13054f40f514c404d32b87b14ed5f1
|
|
|
|
|
|
| |
Change-Id: I45d9fab8739cc6fa8a0bacaca9238896118d9d7f
Signed-off-by: diruomeng <di.ruomeng@zte.com.cn>
Signed-off-by: caozhiyuan <cao.zhiyuan@zte.com.cn>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
For fatal errors, use LOGE to show messages.
Bug: 22236461
Change-Id: I2b7d761576894ac37fcbadcba690ae14affe8f07
(cherry picked from commit d7d0f7503456c3d275a49f90be35e03f02c51bbd)
|
|
|
|
|
|
| |
Also turn on -Werror and remove a dead function.
Change-Id: I436f0a91c40e36db985190b3b98b0a4527cf0eeb
|
|
|
|
|
|
| |
And a few trival fixes to suppress warnings.
Change-Id: I38734b5f4434643e85feab25f4807b46a45d8d65
|
|
|
|
|
|
|
| |
Also add missing TEMP_FAILURE_RETRYs on read, write, and lseek.
Bug: http://b/20625546
Change-Id: I03b198e11c1921b35518ee2dd005a7cfcf4fd94b
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|\
| |
| |
| |
| | |
* commit '829d392a75f536861adfddefc21ec635f3460144':
Delete unused functions from minzip.
|
| |
| |
| |
| |
| |
| |
| |
| | |
This is in preparation of replacing it with libziparchive and
providing shim wrappers.
bug: 19472796
Change-Id: I1f2fb59ee7a41434e794e4ed15b754aa2b74a11d
|
|\|
| |
| |
| |
| | |
* commit '99e084ca8012bc7af52ae2fb9e72ab7180177daf':
Remove dead/unused code and realign some of the comments to make it more cleaner and easier to read
|
| |
| |
| |
| |
| |
| |
| | |
to make it more cleaner and easier to read
Change-Id: If536d482c0ed645368084e76d8ec060f05d89137
Signed-off-by: Nanik Tolaram <nanikjava@gmail.com>
|
|/
|
|
|
|
|
| |
Some files appear to be missing their sync to disk.
Bug: 18145574
Change-Id: Ic858624a4dd65bbfc54d30f3a13c607078270345
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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
|
|\
| |
| |
| |
| | |
* commit '2739ed9628f72813d213b7a429c4c1b8dcebe5fc':
recovery: fix building with pointer-to-int errors turned on
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Change-Id: Ia96201f20f7838d7d9e8926208977d3f8318ced4
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Remove the memory alignment that mysteriously made OTA installs work,
in anticipation of a kernel that fixes the actual problem. Handle
EINTR properly.
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|