| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Attempt to reboot using older methods in case the recovery that we
are updating does not support init reboots
Ticket: CYNGNOS-1242
Change-Id: I9d6ec23c65291221e99d67b2361a2bd150319eee
|
|
|
|
|
|
|
|
|
| |
* This adds support for LZMA compressed blockimages. The space savings
from doing this is significant and will reduce our CDN costs by quite
a bit.
* I'll spend the saved $$$ on beer.
Change-Id: I6679220aaa29592fe6bbccd4136f0c239e45e2ae
|
|
|
|
|
|
|
| |
* On some devices TRIM is disabled for security reasons. Don't fail
flashing the ROM because discard isn't possible in this case.
Change-Id: I044619c3e0b01a496d967ef136501d0190240ad4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Multiple fstab lines (supported in android) cause recovery to fail
to mount partitions if the fs type is not the same as the first
fstab entry. So when we attempt to find an fstab entry that matches
a path for an f2fs, ext4 or vfat type, check it against blkid's
determination of what filesystem type it is. If there is a discrepancy,
query fs_mgr for the next possible entry that matches that path until
either we find one that is good, or run out of fstab entries.
* Also attempt to autodetect the filesystem type for mounting from
update.zips.
Change-Id: Ib6f4535dd88ef714ae1ca6fb0ffae1c7dac0f7ce
|
|
|
|
|
|
| |
* Fix reboot_now comments to reflect actual usage.
Change-Id: I692d626185af24620382f7b318c2b77f643ccfb8
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use board define BOARD_RECOVERY_BLDRMSG_OFFSET with a decimal integer
to define a custom offset where the bootloader message should be
read/written.
Edify commands get_stage and set_stage need to be aware of the
custom bootloader msg offset because they write the stage directly
to the BCB.
Change-Id: Id13a23dd41bb7d907b96d657b8e21eb839dfeaa9
|
|
|
|
| |
Change-Id: I63f28b3b4ba4185c23b972fc8f93517295b1672a
|
|
|
|
|
|
|
|
|
|
| |
Currently the fsync() inside write_all() may be called multiple times
when performing a command. Move that to the outer loop and call it
only after completing the command.
Also remove the O_SYNC flag when writing a stash.
Change-Id: I71e51d76051a2f7f504eef1aa585d2cb7a000d80
|
|
|
|
|
|
| |
And a few trival fixes to suppress warnings.
Change-Id: I38734b5f4434643e85feab25f4807b46a45d8d65
|
|
|
|
| |
Change-Id: I66ae21a25a25fa3c70837bc54a7d406182d4cf37
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Although stdout and stderr are both redirected to log file with no
buffering, we are seeing some outputs are mixed in random order.
This is because ui_print commands from the updater are passed to the
recovery binary via a pipe, which may interleave with other outputs
that go to stderr directly.
In recovery, adding ui::PrintOnScreenOnly() function to handle
ui_print command, which skips printing to stdout. Meanwhile, updater
prints the contents to stderr in addition to piping them to recovery.
Change-Id: Idda93ea940d2e23a0276bb8ead4aa70a3cb97700
|
|
|
|
|
|
|
|
| |
These are already getting libc++, so it isn't necessary. If any of the
other static libraries (such as adb) use new or delete from libc++,
there will be symbol collisions.
Change-Id: I55e43ec60006d3c2403122fa1174bde06f18e09f
|
|
|
|
|
|
|
|
|
|
|
| |
Only trusted input is passed to parse_range, but check for invalid
input to catch possible problems in transfer lists.
Bug: 21033983
Bug: 21034030
Bug: 21034172
Bug: 21034406
Change-Id: Ia17537a2d23d5f701522fbc42ed38924e1ee3366
|
|
|
|
|
|
| |
* Fix compilation on yaffs targets
Change-Id: Icd571dce3ee8c232b13ae199df6e0a4feeb7fb68
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We now support upgrading from 32 to 64 bit builds.
The check for device to package compatibility now
takes into account if the product name on the device
vs the product name on the upgrade build differs
only by the _32 or _64 trailing chars. In addition
we also force compile the updater binary as 32 bit
executable so that it can run on the 32 bit build
we are upgrading from.
Change-Id: Iebe6107e55719141fbcc496efa0c60ef1f9368c8
|
|
|
|
|
|
|
|
| |
We need to ensure the renamed filename reaches the underlying storage.
Bug: 22840552
Change-Id: I824b6e9d8a9c5966035be7b42a73678d07376342
(cherry picked from commit dc3922622a94af4f6412fd68e8f075f839ab2348)
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit b65f0272c860771f2105668accd175be1ed95ae9.
It slows down the update too much on some devices (e.g. increased
from 8 mins to 40 mins to take a full OTA update).
Bug: 22129621
Change-Id: I4e8d4f6734967caf4f0d19c734027f7b6c107370
|
|
|
|
|
|
|
|
|
| |
A RangeSet has half-closed half-open bounds. For example, "3,5" contains
blocks 3 and 4. So "3,5" and "5,7" are actually not overlapped.
Bug: 22098085
Change-Id: I362d259f8b5d62478858ad0422b635bc5068698d
(cherry picked from commit c0f56ad76680df555689d4a2397487ef8c16b1a6)
|
|
|
|
|
|
|
|
|
|
|
| |
Due to observed BLKDISCARD flakiness, overwrite blocks that we want
to discard with zeros first to avoid later issues with dm-verity if
BLKDISCARD is not successful.
Bug: 20614277
Bug: 20881595
Change-Id: I4f6f2db39db990879ff10468c9db41606497bd6f
(cherry picked from commit a3c75e3ea60d61df93461f5c356befe825c429d2)
|
|
|
|
|
|
| |
This reverts commit 604c583c9dd3d47906b1a57c14a7e9650df7471e.
Change-Id: I2b0b283dc3f44bae55c5e9f7231d7c712630c2b5
|
|
|
|
|
|
|
|
|
|
|
| |
Due to observed BLKDISCARD flakiness, overwrite blocks that we want
to discard with zeros first to avoid later issues with dm-verity if
BLKDISCARD is not successful.
Bug: 20614277
Bug: 20881595
Change-Id: I0280fe115b020dcab35f49041fb55b7f8e793da3
(cherry picked from commit 96392b97f6bf1670d478494fb6df89a3410e53fa)
|
|
|
|
|
|
|
|
| |
I missed one last time.
Bug: http://b/20501816
Change-Id: I9896ee2704237d61ee169f898680761e946e0a56
(cherry picked from commit b3ac676192a093c561b7f15064cbd67733407b12)
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the block updater, if BLKDISCARD fails, the error is silently
ignored and some of the blocks may not be erased. This means the
target partition will have inconsistent contents.
If the ioctl fails, return an error and abort the update.
Bug: 20614277
Change-Id: I33867ba9337c514de8ffae59f28584b285324067
(cherry picked from commit cc2428c8181d18c9a88db908fa4eabd2db5601ad)
|
|
|
|
|
|
| |
Bug: http://b/20501816
Change-Id: I35efcd8dcec7a6492ba70602d380d9980cdda31f
(cherry picked from commit b47afedb42866e85b76822736d915afd371ef5f0)
|
|
|
|
|
|
|
|
| |
Also add missing TEMP_FAILURE_RETRYs on read, write, and lseek.
Bug: http://b/20625546
Change-Id: I03b198e11c1921b35518ee2dd005a7cfcf4fd94b
(cherry picked from commit 7bad7c4646ee8fd8d6e6ed0ffd3ddbb0c1b41a2f)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When automatically stashing overlapping blocks, should the stash
file already exist due to an explicit stash command, it's not safe
to remove the stash file after the command has completed.
Note that it is safe to assume that the stash file will remain in
place during the execution of the next command, so we don't have
take other measures to preserve overlapping blocks.
The stash file itself will be removed by a free command when it's
no longer needed.
Bug: 20297065
Change-Id: I8ff1a798b94086adff183c5aac03260eb947ae2c
|
|
|
|
| |
Change-Id: I7009959043150fabf5853a43ee2448c7fbea176e
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Change-Id: I480c02ffedd811f4dda9940ef979a05ff54f1435
Bug: 19410117
|
|\
| |
| |
| |
| | |
* commit '42b09d255afdb47bc0546183cbc68e86147baaab':
There's no GPL code in 'updater'.
|
| |\
| | |
| | |
| | |
| | | |
* commit '6a0d2fbcaa1740da7bb0e7a0ef8280e8b7b9bb05':
There's no GPL code in 'updater'.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This notice was added for libsyspatch and libxdelta3, but that code
has been removed since.
Change-Id: I4008878ded56ca1d5094a8208728f8c02fe1fe03
|
|\ \ \
| |/ /
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add support for transfer list version 3, which allows us to
verify the status of each command and resume an interrupted
block based OTA update. Notes on the changes:
- Move the previous BlockImageUpdateFn to a shorter and
reusable PerformBlockImageUpdate, which can be used also
in BlockImageVerifyFn for verification.
- Split individual transfer list commands into separate
functions with unified parameters for clarity, and use
a hash table to locate them during execution.
- Move common block reading and writing to ReadBlocks and
WriteBlocks to reduce code duplication, and rename the
readblock and writeblock to less confusing read_all and
write_all.
The coding style of the new functions follows the existing
style in the updater/edify code.
Needs matching changes from
Ia5c56379f570047f10f0aa7373a1025439495c98
Bug: 18262110
Change-Id: I1e752464134aeb2d396946348e6041acabe13942
|
|\ \ \
| |/ /
|/| /
| |/
| | |
* commit 'aeecac5444ce55d2e82ee1b2aa35ff61a038c14e':
Add missing includes.
|
| |
| |
| |
| | |
Change-Id: I06ea08400efa511e627be37a4fd70fbdfadea2e6
|
|\ \
| |/
| |
| |
| | |
* commit 'c43b17f0adac1092e221ce6166ca8bc464090525':
Fix recovery image build for 32p
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When building for 32p, we need to be explicit that we wish to build
the 32bit version of the binaries that will be placed in the recovery
image. The recovery image doesn't actually care... but if we are not
explicit in this, the makefiles will ask for the 64bit binaries but the
Android.mk for the binaries will supply the 32bit images (causing the
build to fail).
Change-Id: Iea2d5f412740c082795da4358765751138a4b167
|
|\ \
| | |
| | |
| | |
| | | |
* commit 'b278c252e148798346f85fc92eeea6afeb33fbf0':
Add support for tune2fs file operations
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This allows tune2fs to be executed from within OTA scripts,
allowing for file system modifications without formatting the
partition
Bug: 18430740
Change-Id: I0c2e05b5ef4a81ecea043e9b7b99b545d18fe5e6
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* commit '5ddf4293df45a051c7900eeb62fb5ec4950b6cb6':
Log mount/unmount errors to UI
|
| | |
| | |
| | |
| | |
| | | |
Bug: 18092022
Change-Id: I6c42038ebeb1cfc1e7ca0d3e12310fdce1b990b0
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* commit '688024169df70336cc128ea8cc929174c53a501e':
unconditionally apply SELinux labels to symlinks
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
At the end of the OTA script, we walk through /system, updating
all the permissions on the filesystem, including the UID, GID,
standard UNIX permissions, capabilities, and SELinux labels.
In the case of a symbolic link, however, we want to skip most of
those operations. The UID, GID, UNIX permissions, and capabilities
don't meaningfully apply to symbolic links.
However, that's not true with SELinux labels. The SELinux label on
a symbolic link is important. We need to make sure the label on the
symbolic link is always updated, even if none of the other attributes
are updated.
This change unconditionally updates the SELinux label on the symbolic
link itself. lsetfilecon() is used, so that the link itself is updated,
not what it's pointing to.
In addition, drop the ENOTSUP special case. SELinux has been a
requirement since Android 4.4. Running without filesystem extended
attributes is no longer supported, and we shouldn't even try to handle
non-SELinux updates anymore. (Note: this could be problematic if
these scripts are ever used to produce OTA images for 4.2 devices)
Bug: 18079773
Change-Id: I87f99a1c88fe02bb2914f1884cac23ce1b385f91
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* commit '168f77787700f0e9f66675beef33c593a777e64e':
Allow passing of mount args to mountFn
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Bug: 18079773
Bug: 18092222
Change-Id: Ifc3f3e123de729dfbb2f49414b3207afa96268d5
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* commit '473967d87ff9fc7a541c16ebdc56364c285d2862':
Log to UI any metadata setting errors
|
| |\ \ |
|
| | |/
| | |
| | |
| | |
| | | |
Bug: 18079773
Change-Id: Ic6fddbcbcb6ddb9e1cbd1698df98387c0033ae15
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* commit '2f0ef73029fc51c6404121f338b034c8b516652c':
Treat already-renamed files as having no problems.
|