aboutsummaryrefslogtreecommitdiffstats
path: root/updater
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Treat already-renamed files as having no problems.Michael Runge2014-10-231-0/+3
| |/ | | | | | | | | | | | | | | This should help with reentrant OTAs. Bug: 18079773 Change-Id: I102fd738e3b450483ecd4471384c12e89fc586e2
* | support for version 2 of block image diffsDoug Zongker2014-09-251-45/+209
|/ | | | | | | | | | | | | | | | | | | In version 2 of block image diffs, we support a new command to load data from the image and store it in the "stash table" and then subsequently use entries in the stash table to fill in missing bits of source data we're not allowed to read when doing move/bsdiff/imgdiff commands. This leads to smaller update packages because we can break cycles in the ordering of how pieces are updated by storing data away and using it later, rather than not using the data as input to the patch system at all. This comes at the cost of the RAM or scratch disk needed to store the data. The implementation is backwards compatible; it can still handle the existing version 1 of the transfer file format. Change-Id: I4559bfd76d5403859637aeac832f3a5e9e13b63a
* Merge "fix comment in blockimg updater code" into lmp-devDoug Zongker2014-09-041-3/+3
|\
| * fix comment in blockimg updater codeDoug Zongker2014-09-041-3/+3
| | | | | | | | | | | | The comment for the DEBUG_ERASE setting is exactly backwards. Change-Id: I98ab5828365894217fc78976817a131e7d22d5c1
* | use lseek64 instead of lseekAndrew Boie2014-09-041-11/+11
|/ | | | | | | | Otherwise, overflow problems can occur with images larger than 2G since the offsets will overflow a 32-bit off_t. Change-Id: I05951a38ebeae83ad2cb938594e8d8adb323e2aa Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
* remove code for original block OTA mechanismDoug Zongker2014-08-262-209/+6
| | | | | | | Superseded by newer code. Bug: 16984795 Change-Id: I842299f6a02af7ccf51ef2ca174d813ca53deef1
* fix two bugs in block image updaterDoug Zongker2014-08-211-18/+32
| | | | | | | | | The computation of file offsets was overflowing for partitions larger than 2 GB. The parsing of the transfer file could fail at the end if the data happened to not be properly null-terminated. Bug: 16984795 Change-Id: I3ce6eb3e54ab7b55aa9bbed252da5a7eacd3317a
* installer for new block OTA systemDoug Zongker2014-08-196-1/+662
| | | | | | | (Cherry-pick back from master.) Bug: 16984795 Change-Id: Ifa3d8345c5e2a0be86fb28faa080ca82592a96b4
* remove spurious parens from error messageDoug Zongker2014-08-061-4/+3
| | | | | | | | These error messages include empty parens after each string substition. Ill-advised cut and paste, probably. Bug: 16467401 Change-Id: Ib623172d6228354afdcc2e33442cc53a07f0ecbc
* Auto create parent directories for rename supportMichael Runge2014-07-212-3/+7
| | | | | | | | | Sometimes renames will move a file into a directory that does not yet exist. This will create the parent directories, using the same symlink logic, to ensure that there is a valid destination. Change-Id: Iaa005a12ce800c39f4db20f7c25a2a68cb40a52d
* Support F2FS for the data partitionJP Abgrall2014-06-161-2/+35
| | | | | | | | | | | | This adds F2FS support - for wiping a device - for the install "format" command. Note: crypto data in "footer" with a default/negative length is not supported, unlike with "ext4". Change-Id: I8d141a0d4d14df9fe84d3b131484e9696fcd8870 Signed-off-by: JP Abgrall <jpa@google.com>
* advance progress bar during block OTA installationsDoug Zongker2014-06-091-2/+23
| | | | | | | | | While executing syspatch and package_extract_file() calls with don't care maps (both of which are used to rewrite the system image in incremental and full block OTAs, respectively), pass a progress callback in and use it to update the visible progress bar. Change-Id: I1d3742d167c1bb2130571eb5103b7795c65ff371
* disable async reboot during package installationDoug Zongker2014-05-231-0/+11
| | | | | | | | | | The default recovery UI will reboot the device when the power key is pressed 7 times in a row, regardless of what recovery is doing. Disable this feature during package installation, to minimize the chance of corrupting the device due to a mid-install reboot. (Debug packages can explicitly request that the feature be reenabled.) Change-Id: I20f3ec240ecd344615d452005ff26d8dd7775acf
* Allow lines without = signs.Michael Runge2014-05-011-5/+3
| | | | | | | | | The new build.prop for Sprout includes lines of the format: import xxx.prop These can be safely ignored when reading the property file. Change-Id: Ia84a138e71461ffe8e591e88143b9787873def29
* am 4b6de1ba: am 026ebe02: Merge "Recovery 64-bit compile issues"Mark Salyzyn2014-03-141-2/+2
|\ | | | | | | | | * commit '4b6de1ba1ce0fff95c18a8abb7ba6e5762006d49': Recovery 64-bit compile issues
| * am 026ebe02: Merge "Recovery 64-bit compile issues"Mark Salyzyn2014-03-141-2/+2
| |\ | | | | | | | | | | | | * commit '026ebe0214d6c1c9b3ddc22c35e9ac37e5f622bc': Recovery 64-bit compile issues
| | * Recovery 64-bit compile issuesMark Salyzyn2014-03-141-2/+2
| | | | | | | | | | | | Change-Id: I92d5abd1a628feab3b0246924fab7f97ba3b9d34
* | | support don't-care maps when writing the system imageDoug Zongker2014-02-241-62/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make package_extract_file() take an optional third argument which is the pathname (in the package zip) of a map of don't-care regions to skip over when writing the file. Modify syspatch() to take source and target don't-care maps and use them when patching the system partition. Add the wipe_block_device() function to do a discard of all data on the partition. Change-Id: I8c856054edfb6aab2f3e5177f16d9d78add20be4
* | | add flag for GPL licenseDoug Zongker2014-02-202-0/+339
| | | | | | | | | | | | | | | | | | | | | updater now depends on the GPL'd libraries libsyspatch and libxdelta3, so be careful when taking code from this directory. Change-Id: Ib6f8c50ce7052912b9d81ff96d095f778bf9a3d0
* | | Merge "clean up some warnings when building recovery"Doug Zongker2014-02-183-5/+5
|\ \ \
| * | | clean up some warnings when building recoveryDoug Zongker2014-02-133-5/+5
| | | | | | | | | | | | | | | | Change-Id: I1541534ee6978ddf8d548433986679ce9507d508
* | | | remove remaining libminelf referencesDoug Zongker2014-02-131-1/+0
|/ / / | | | | | | | | | Change-Id: Id38b08607829bccc031693cc03e60e849903b6f8
* | | remove 'retouch' ASLR supportDoug Zongker2014-02-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Older versions of android supported an ASLR system where binaries were randomly twiddled at OTA install time. Remove support for this; we now use the ASLR support in the linux kernel. Change-Id: I8348eb0d6424692668dc1a00e2416fbef6c158a2
* | | add syspatch support to updaterDoug Zongker2014-02-132-14/+115
| | | | | | | | | | | | | | | | | | | | | Add the syspatch() function, which can apply xdelta3+xz patches using the libsyspatch library. Change-Id: Idc1921e449020923bcaf425a1983bec0833e47ed
* | | do verification and extraction on memory, not filesDoug Zongker2014-01-161-4/+11
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | am f9dd42de: Merge "Don\'t abort on read_file if the file is missing." into ↵Michael Runge2013-12-261-5/+3
|\ \ | | | | | | | | | | | | | | | | | | klp-dev * commit 'f9dd42de6034ab09f9fa649ed1fbea25bc05e598': Don't abort on read_file if the file is missing.
| * | Don't abort on read_file if the file is missing.Michael Runge2013-12-131-5/+3
| | | | | | | | | | | | Change-Id: I85726bf736203d602428114145c3b98692580656
* | | am c87bab10: add the functions for multi-stage packages to updaterDoug Zongker2013-11-271-1/+106
|\ \ \ | |/ / | | / | |/ |/| * commit 'c87bab101893e8322b49d7c8600e3367b20ab50a': add the functions for multi-stage packages to updater
| * add the functions for multi-stage packages to updaterDoug Zongker2013-11-261-1/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to support multi-stage recovery packages, we add the set_stage() and get_stage() functions, which store a short string somewhere it can be accessed across invocations of recovery. We also add reboot_now() which updater can invoke to immediately reboot the device, without doing normal recovery cleanup. (It can also choose whether to boot off the boot or recovery partition.) If the stage string is of the form "#/#", recovery's UI will be augmented with a simple indicator of what stage you're in, so it doesn't look like a reboot loop. Change-Id: I62f7ff0bc802b549c9bcf3cc154a6bad99f94603
* | am c64e76c7: Merge "Enable incremental builder to find files that moved, and ↵Michael Runge2013-11-071-0/+35
|\ \ | |/ | | | | | | | | | | try to process them via patch + rename, instead of delete + add." into klp-dev * commit 'c64e76c75088b951f61a7f7bacf8af6eccd2ccfa': Enable incremental builder to find files that moved, and try to process them via patch + rename, instead of delete + add.
| * Enable incremental builder to find files that moved, andMichael Runge2013-11-071-0/+35
| | | | | | | | | | | | | | | | | | try to process them via patch + rename, instead of delete + add. b/11437930 Change-Id: I984349fbc9a8dac4379e00c0d66fc7d22c4eb834
* | updater: Delete dead codeNick Kralevich2013-09-171-87/+0
|/ | | | | | | | set_perm and set_perm_recursive are no longer used. Delete. (cherry picked from commit 08ef9a957027183dcf55e432441e8fb0d5299aba) Change-Id: I1bcc90ae19af9df4f0705496c5876987159f75ac
* Don't apply permission changes to symlink.Nick Kralevich2013-09-101-0/+5
| | | | | | | Bug: 10183961 Bug: 10186213 Bug: 8985290 Change-Id: I57cb14af59682c5f25f1e091564548bdbf20f74e
* updater: introduce and set_metadata and set_metadata_recursiveNick Kralevich2013-09-101-0/+274
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce two new updater functions: * set_metadata * set_metadata_recursive Long term, these functions are intended to be more flexible replacements for the following methods: * set_perm * set_perm_recursive Usage: set_metadata("filename", "key1", "value1", "key2", "value2", ...) set_metadata_recursive("dirname", "key1", "value1", "key2", "value2", ...) Description: set_metadata() and set_metadata_recursive() set the attributes on a file/directory according to the key/value pairs provided. Today, the following keys are supported: * uid * gid * mode (set_perm_extd only) * fmode (set_perm_extd_recursive only) * dmode (set_perm_extd_recursive only) * selabel * capabilities Unknown keys are logged as warnings, but are not fatal errors. Examples: * set_metadata("/system/bin/netcfg", "selabel", "u:object_r:system_file:s0"); This sets the SELinux label of /system/bin/netcfg to u:object_r:system_file:s0. No other changes occur. * set_metadata("/system/bin/netcfg", "uid", 0, "gid", 3003, "mode", 02750, "selabel", "u:object_r:system_file:s0", "capabilities", 0x0); This sets /system/bin/netcfg to uid=0, gid=3003, mode=02750, selinux label=u:object_r:system_file:s0, and clears the capabilities associated with the file. * set_metadata_recursive("/system", "uid", 0, "gid", 0, "fmode", 0644, "dmode", 0755, "selabel", "u:object_r:system_file:s0", "capabilities", 0x0); All files and directories under /system are set to uid=0, gid=0, and selinux label=u:object_r:system_file:s0. Directories are set to mode=0755. Files are set to mode=0644 and all capabilities are cleared. Bug: 10183961 Bug: 10186213 Bug: 8985290 Change-Id: Ifdcf186a7ed45265511dc493c4036e1ac5e3d0af
* Revert "Update OTA installer to understand SELinux filesystem labels"Nick Kralevich2013-09-091-24/+5
| | | | | | | This reverts commit 627eb30f73c29257acaeb6568f3da38880784f7c. Bug: 10183961 Bug: 10186213
* Update OTA installer to understand SELinux filesystem labelsNick Kralevich2013-07-181-5/+24
| | | | | | | | | | | | | | | | | | 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
* recovery: move log output to stdoutDoug Zongker2013-07-092-48/+48
| | | | | | | | Recovery currently has a random mix of messages printed to stdout and messages printed to stderr, which can make logs hard to read. Move everything to stdout. Change-Id: Ie33bd4a9e1272e731302569cdec918e0534c48a6
* Merge "verifier: update to support certificates using SHA-256"Doug Zongker2013-04-111-1/+1
|\
| * verifier: update to support certificates using SHA-256Doug Zongker2013-04-101-1/+1
| | | | | | | | Change-Id: Ifd5a29d459acf101311fa1c220f728c3d0ac2e4e
* | Add liblogYing Wang2013-04-091-1/+1
|/ | | | | Bug: 8580410 Change-Id: Ie60dade81c06589cb0daee431611ded34adef8e6
* resolved conflicts for merge of 78afed1c to jb-mr1-dev-plus-aospKenny Root2012-10-164-16/+1
|\ | | | | | | Change-Id: I861e3a6aa07c448909b2ae54618bba178bd6e457
| * Remove HAVE_SELINUX guardsKenny Root2012-10-164-16/+1
| | | | | | | | Change-Id: Ia96201f20f7838d7d9e8926208977d3f8318ced4
* | add bonus data feature to imgdiff/imgpatch/applypatchDoug Zongker2012-08-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The bonus data option lets you give an additional blob of uncompressed data to be used when constructing a patch for chunk #1 of an image. The same blob must be available at patch time, and can be passed to the command-line applypatch tool (this feature is not accessible from edify scripts). This will be used to reduce the size of recovery-from-boot patches by storing parts of the recovery ramdisk (the UI images) on the system partition. Change-Id: Iac1959cdf7f5e4582f8d434e83456e483b64c02c
* | am 3733d218: Merge changes I664f8dc7,I4154db06,I5e1df90fJoe Onorato2012-08-171-1/+4
|\ \ | |/ | | | | | | | | | | * commit '3733d2185bbcedd9ef626907f1f32628986cc0f5': Use the static version of libsparse Multiple modules with the same name are going away. host modules don't need LOCAL_MODULE_TAGS
| * Use the static version of libsparseJoe Onorato2012-07-231-1/+1
| | | | | | | | Change-Id: I664f8dc7939f8f902e4775eaaf6476fcd4ab8ed2
| * Multiple modules with the same name are going away.Joe Onorato2012-07-211-1/+4
| | | | | | | | Change-Id: I4154db066865d6031caa3c2c3b94064b2f28076e
* | fix the symlink() command to create directories if neededDoug Zongker2012-08-061-3/+29
|/ | | | | | | | | | | Full OTAs currently fail if the build contains a directory containing only symlinks, because nothing creates that directory. Change the symlink() command to create any ancestor directories that don't exist. They're created as owner root perms 0700 because we assume that in practice subsequent set_perm_recursive() calls will fix up their ownership and permissions. Change-Id: I4681cbc85863d9778e36b924f0532b2b3ef14310
* Link against libsparseColin Cross2012-07-171-1/+1
| | | | | | libext4_utils requires libsparse, link against it as well. Change-Id: I4d6aec0e5edcf1ed42118b7b77adcded2858d3dd
* am 6d60667d: Merge "Use a dependency file to replace the list file."Ying Wang2012-06-111-10/+14
|\ | | | | | | | | * commit '6d60667de6b8e6bd8a54fb4031901e2935743308': Use a dependency file to replace the list file.
| * Use a dependency file to replace the list file.Ying Wang2012-06-111-10/+14
| | | | | | | | | | | | instead of creating the list file whenever loading the Android.mk Change-Id: I78e4820754399dff3993a863eede8b75da9f6d29