summaryrefslogtreecommitdiffstats
path: root/updater/Android.mk (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Use gtest_prod_headers.Elliott Hughes2021-04-201-1/+2
| | | | | | Bug: http://b/185916167 Test: treehugger Change-Id: I3407052df4f12b01acc4a75c6bd0759f7a4b2c4c
* [LSC] Add LOCAL_LICENSE_KINDS to bootable/recoveryBob Badour2021-02-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added SPDX-license-identifier-Apache-2.0 to: applypatch/Android.bp bootloader_message/Android.bp edify/Android.bp fuse_sideload/Android.bp install/Android.bp minadbd/Android.bp minui/Android.bp otautil/Android.bp recovery_ui/Android.bp recovery_utils/Android.bp tests/Android.bp tools/image_generator/Android.bp tools/recovery_l10n/Android.bp uncrypt/Android.bp update_verifier/Android.bp updater/Android.bp updater/Android.mk updater_sample/Android.bp updater_sample/tests/Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-MIT SPDX-license-identifier-OFL to: Android.bp Android.mk Bug: 68860345 Bug: 151177513 Bug: 151953481 Test: m all Exempt-From-Owner-Approval: janitorial work Change-Id: I3da761b525452838977297f773974000d4de7bd6
* Add libavb as a dependencyTianjie Xu2020-02-281-0/+1
| | | | | | | It's needed by libfec Test: mma Change-Id: Ic82671f6506e7718afa965a511261b1b329ea38f
* Convert update_host_simulator to Android.bpDan Willemsen2020-01-151-29/+0
| | | | | | Bug: 130696912 Test: m update_host_simulator Change-Id: I7b3c0217268a3edcf76548a5c83030050b2d17f3
* Use libcrypto_static instead of libcryptoColin Cross2019-09-231-2/+1
| | | | | | | | | | Replace libcrypto with libcrypto_static, which can be protected through visibility to ensure only modules that don't affect FIPS certification can use it. Bug: 141248879 Test: m checkbuild Change-Id: I0affaa292237bdbc772d3adc36086905ed6fbe9d
* Set LOCAL_INJECT_BSSL_HASH for updaterColin Cross2019-09-061-0/+1
| | | | | | | | | | updater is built in Make and statically links libcrypto, so it needs to set LOCAL_INJECT_BSSL_HASH to make the FIPS self test pass. Bug: 137267623 Test: m checkbuild Change-Id: Ib253c870090ac8026f5cbb005d6b0e935c73edd1
* Drop the device specific support for update host simulatorTianjie Xu2019-07-121-13/+2
| | | | | | | | | | | | | | The device specific libs prevent us from building an universal simulator to add to the otatools. Drop the support since there is currently no active users of the simulator extension; plus we will unlikely to implement the device specific simulator runtime. As a alternation, we will add the commandline arguments to skip certain unsupported functions, and move the simulator build to the bp file. Bug: 131911365 Test: mma Change-Id: I3ff0f45dbebe3ed72d5f4670a869b40e6cfd5a7c
* Implement the TargetFile and BuildInfoTianjie Xu2019-06-011-1/+2
| | | | | | | | | | | The TargetFile class parses a target-file and provides functions to read its contents. And the BuildInfo tries to simulate the device with files on host. Some work it does includes parsing the build properties, and extracting the image files for partitions specified in the fstab. Bug: 131911365 Test: unit tests pass, run simulator with cuttlefish, wear devices and from extracted TF. Change-Id: Iefe4a96d619d2e4b3d038e31480f11a0f9a70afa
* Disable building simulator for macTianjie Xu2019-05-301-0/+1
| | | | | | | | | Disable building the simulator and its support libraries to resolve the breakage on mac host targets. Because the simulator is not intended to use on mac anyway. Bug: 134047992 Test: mma Change-Id: I488ab50cab1282f03250010b5334f1895d44f98b
* Implement an update simulator to verify BB OTA packages on hostTianjie Xu2019-05-291-20/+65
| | | | | | | | | | | Implement the simulator runtime and build the updater simulator as a host executable. The code to parse the target-files and mocks the block devices will be submitted in the follow-up. Bug: 131911365 Test: unit tests pass Change-Id: Ib1ba939aec8333ca68a45139514d772ad7a27ad8
* Add Updater class and remove UpdaterInfoTianjie Xu2019-05-091-1/+1
| | | | | | | | | | | The UpdaterInfo class is merely a collection of pointers and POD types. We can replace it with a Updater class that has the ownership of the resources. This also makes this class extensible as we plan to add more functionality in the host simulator. Bug: 131911365 Test: unit tests pass, run an update on cuttlefish and check last_install Change-Id: I07ca5963bbee8ae3cb85ccc184464910aa73d4e4
* updater: add functions to modify dynamic partition metadataYifan Hong2019-01-141-0/+2
| | | | | | | | | | | | Test: sideload full OTA on cuttlefish Test: sideload incremental OTA on cuttlefish (that grows system, shrinks vendor, and move vendor to group foo) Test: verify that /cache/recovery/cc46ebfd04058569d0c6c1431c6af6c1328458e4 exists (sha1sum of "system") Bug: 111801737 Change-Id: Ibdf6565bc1b60f3665c01739b4c95a85f0261ae5
* Remove otafaultTianjie Xu2018-08-281-1/+0
| | | | | | | | | | Now it's less beneficial to inject I/O faults since we don't see many of them. Remove the library that mocks I/O failures. And switch to android::base I/O when possible. Bug: 113032079 Test: unit tests pass Change-Id: I9f2a92b7ba80f4da6ff9e2abc27f2680138f942c
* updater: Move libupdater to Soong.Tao Bao2018-08-131-31/+4
| | | | | | Test: mmma -j bootable/recovery Test: Run recovery_unit_test and recovery_component_test on marlin. Change-Id: I2617b87d13c585addf0ed2fbae8c3ce443ea7200
* Add an updater function to compute hash treeTianjie Xu2018-08-061-0/+1
| | | | | | | | | | | | | | | | The new command is part of the transfer.list and allows us to compute the hash tree on non-ab devices. The required arguments for the hash_tree computation are: hash_tree_ranges source_ranges hash_algorithm salt_hex root_hash Bug: 25170618 Test: unit tests pass; run simulator with compute_hash_tree Change-Id: I8ff0d582cc8adabb8a060db7845f38b35b28e62c
* updater: Add Command parsing codes.Tao Bao2018-06-251-0/+1
| | | | | | | | The added codes are not used in the updater yet. The switch will happen in subsequent CLs. Test: Run recovery_unit_test and recovery_component_test on marlin. Change-Id: I1ae8a233280f02c2171b43ef028bdccdacb39c59
* updater: Add Commmand class to manage BBOTA commands.Tao Bao2018-05-261-0/+1
| | | | | | | | | | | | Move the commands map parsing out of PerformBlockImageUpdate(), as this can be done more easily by the caller. The goal (not done in this CL) is to decouple command parsing logic from the performers. This allows (a) focusing on the command logic in the performer; and (b) extending BBOTA commands syntax separately. Test: Run recovery_unit_test and recovery_component_test. Change-Id: Ife202398a7660b152d84a3ba17b90f93d19c55f2
* Merge libmounts into libotautil.Tao Bao2018-04-281-7/+4
| | | | | | | | | Export its header (mounts.h) from there, and drop the dot dot dependency from libupdater / updater. Test: mmma bootable/recovery Test: recovery_component_test Change-Id: Ic26a6b9b78a34dbe1f178b138f3abaafffbec44c
* Drop -Wno-unused-parameter.Tao Bao2017-10-121-2/+0
| | | | | | | The only one left is libedify. Will handle that in a separate CL. Test: mmma bootable/recovery Change-Id: I732a5f85229da90fd767bee2e46c5c95f529c396
* Turn on -Wall for recovery modulesTianjie Xu2017-08-291-0/+2
| | | | | | | | | | | | | Turn on -Wall for all modules. Also remove the obsolete file_cmp() in apply_patch test and now() in wear_ui. The only exception is lib_edify due to the unused functions in the intermediate cpp files generated from the lex files. It will be handled in a seperate CL. Bug: 64939312 Test: mma, unit tests pass Change-Id: Ic53f76b60b6401ab20db3d98130d674c08e3702f
* Add support to decompress brotli compressed new dataTianjie Xu2017-07-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | Add a new writer that can decode the brotli-compressed system/vendor new data stored in the OTA zip. Brotli generally gives better compression rate at the cost of slightly increased time consumption. The patch.dat is already compressed by BZ; so there's no point to further compress it. For the given 1.9G bullhead system image: Size: 875M -> 787M; ~10% reduction of package size. Time: 147s -> 153s; ~4% increase of the block_image_update execution time. (I guess I/O takes much longer time than decompression.) Also it takes 4 minutes to compress the system image on my local machine, 3 more minutes than zip. Test: recovery tests pass && apply a full OTA with brotli compressed system/vendor.new.dat on bullhead Change-Id: I232335ebf662a9c55579ca073ad45265700a621e
* Fix updater include generation w/installcleanDan Willemsen2017-03-221-16/+4
| | | | | | | | | | | Since this was putting the intermediate file in obj/PACKAGING, every installclean was removing it and triggering updater to rebuild. Instead, use the standard generated-sources-dir. The dep file can also be removed now that ninja will re-run the generator if the command line changes. Test: m -j updater; m installclean; m -j updater Test: Only change to aosp_fugu updater before/after is the debug info Change-Id: I20928bd2049d4a3d4e21f83fd64d16cfdc541958
* Use bspatch from external/bsdiff.Sen Jiang2017-02-021-0/+1
| | | | | | | | | | Now ApplyBSDiffPatch() will stream the output to sink as we go instead of sinking everything at the end. Test: recovery_host_test Bug: 26982501 Change-Id: I05b6ed40d45e4b1b19ae72784cf705b731b976e3
* Remove '_static' suffix from libext2* references.Alex Deymo2017-01-241-1/+1
| | | | | | Bug: 34220783 Test: make checkbuild Change-Id: Iceea20e440a4bb6a3b254486a65a86401a2241ef
* Remove "_static" suffix from libsparseAlex Deymo2017-01-111-1/+1
| | | | | | Bug: 34220783 Change-Id: I358f931f0b29f5bd526e1475180e477e2e90b936
* Remove "_static" suffix from libext4_utils.Alex Deymo2017-01-111-1/+1
| | | | | Bug: 34220783 Change-Id: I34ccc3b11da0d1b48805967ad75b9ddade569930
* updater: Refactor set_stage() and get_stage() functions.Tao Bao2016-11-181-0/+2
| | | | | | | | | | | Add read_bootloader_message_from() and write_bootloader_message_to() to allow specifying the BCB device (/misc). Also add testcases for set_stage() and get_stage(). Test: recovery_component_test passes. Test: Build a recovery image and apply a two-step OTA package. Change-Id: If5ab06a1aaaea168d2a9e5dd63c07c0a3190e4ae
* Replace minzip with libziparchiveTianjie Xu2016-10-181-1/+3
| | | | | | | | | | | Clean up the duplicated codes that handle the zip files in bootable/recovery; and rename the library of the remaining utility functions to libotautil. Test: Update package installed successfully on angler. Bug: 19472796 Change-Id: Iea8962fcf3004473cb0322b6bb3a9ea3ca7f679e
* Refactor libupdater into a seperate module.Tao Bao2016-10-111-44/+67
| | | | | | | | | So that we can write native tests for updater functions. This CL adds a testcase for getprop() function. Test: mmma bootable/recovery; Run recovery_component_test on device. Change-Id: Iff4c1ff63c5c71aded2f9686fed6b71cc298c228
* Update the header path for ext4_utils.Tao Bao2016-10-091-1/+0
| | | | | Test: `mmma bootable/recovery` Change-Id: I70ccddb3ddf46bb012fdc5f632afc46ebdd5473e
* Turn on -Werror for recoveryTianjie Xu2016-09-301-1/+1
| | | | | | | | | | Also remove the 0xff comparison when validating the bootloader message fields. As the fields won't be erased to 0xff after we remove the MTD support. Bug: 28202046 Test: The recovery folder compiles for aosp_x86-eng Change-Id: Ibb30ea1b2b28676fb08c7e92a1e5f7b6ef3247ab
* Switch recovery to libbase loggingTianjie Xu2016-09-011-2/+3
| | | | | | | | Clean up the recovery image and switch to libbase logging. Bug: 28191554 Change-Id: Icd999c3cc832f0639f204b5c36cea8afe303ad35 Merged-In: Icd999c3cc832f0639f204b5c36cea8afe303ad35
* Fix references to libcrypto_utils_static.Josh Gao2016-08-061-2/+2
| | | | | Bug: http://b/30708454 Change-Id: I7a5048beff1d8b783a9683dcb4a79606a77f20ee
* Remove obsolete MTD support.Elliott Hughes2016-06-101-4/+1
| | | | | Bug: http://b/29250988 Change-Id: Ia97ba9082a165c37f74d6e1c3f71a367adc59945
* Convert recovery to use BoringSSL instead of mincrypt.Mattias Nissler2016-04-061-0/+1
| | | | | | | This changes the verification code in bootable/recovery to use BoringSSL instead of mincrypt. Change-Id: I37b37d84b22e81c32ac180cd1240c02150ddf3a7
* Fix the improper use of LOCAL_WHOLE_STATIC_LIBRARIES.Tao Bao2016-03-031-28/+38
| | | | | | | | | | | | | If two libraries both use LOCAL_WHOLE_STATIC_LIBRARIES and include a same library, there would be linking errors when generating a shared library (or executable) that depends on the two libraries both. Also clean up Android.mk files. Remove the "LOCAL_MODULE_TAGS := eng" line for the updater module. The module will then default to "optional" which won't be built until needed. Change-Id: I3ec227109b8aa744b7568e7f82f575aae3fe0e6f
* IO fault injection for OTA packagesJed Estep2016-02-101-1/+1
| | | | | | Bug: 25951086 Change-Id: I31c74c735eb7a975b7f41fe2b2eff042e5699c0c (cherry-picked from commit f1fc48c6e62cfee42d25ad12f443e22d50c15d0b)
* Switch from mincrypt to BoringSSL in applypatch and updater.Sen Jiang2016-02-041-1/+1
| | | | | Bug: 18790686 Change-Id: I7d2136fb39b2266f5ae5be24819c617b08a6c21e
* Error correction: Use libfec in blockimg.cpp for recoverySami Tolvanen2015-10-191-1/+2
| | | | | | | | | | | | Add block_image_recover function to rewrite corrupted blocks on the partition. This can be attempted if block_image_verify fails. Note that we cannot use libfec during block_image_update as it may overwrite blocks required for error correction. A separate recovery pass in case the image is corrupted is the only viable option. Bug: 21893453 Change-Id: I6ff25648fff68d5f50b41a601c95c509d1cc5bce
* updater: libapplypatch needs libbase now.Tao Bao2015-07-241-1/+1
| | | | | Change-Id: I18da9e6da64fccab495dc5a96e3efd95cc6d88bf (cherry picked from commit 1b1ea17d554d127a970afe1d6004dd4627cd596e)
* recovery: Switch applypatch/ and updater/ to cpp.Tao Bao2015-07-141-3/+15
| | | | | | Mostly trivial changes to make cpp compiler happy. Change-Id: I69bd1d96fcccf506007f6144faf37e11cfba1270
* recovery: Switch to clangTao Bao2015-06-031-0/+2
| | | | | | And a few trival fixes to suppress warnings. Change-Id: I38734b5f4434643e85feab25f4807b46a45d8d65
* Stop using libstdc++.Dan Albert2015-05-191-1/+1
| | | | | | | | 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
* am c43b17f0: Merge "Fix recovery image build for 32p"Ying Wang2014-12-021-1/+1
|\ | | | | | | | | * commit 'c43b17f0adac1092e221ce6166ca8bc464090525': Fix recovery image build for 32p
| * Fix recovery image build for 32pBruce Beare2014-12-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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
* | Add support for tune2fs file operationsMichael Runge2014-11-211-0/+10
|/ | | | | | | | | This allows tune2fs to be executed from within OTA scripts, allowing for file system modifications without formatting the partition Bug: 18430740 Change-Id: I0c2e05b5ef4a81ecea043e9b7b99b545d18fe5e6
* remove code for original block OTA mechanismDoug Zongker2014-08-261-2/+0
| | | | | | | Superseded by newer code. Bug: 16984795 Change-Id: I842299f6a02af7ccf51ef2ca174d813ca53deef1
* installer for new block OTA systemDoug Zongker2014-08-201-0/+1
| | | | | | | (Cherry-pick back from master.) Bug: 16984795 Change-Id: Ifa3d8345c5e2a0be86fb28faa080ca82592a96b4
* Merge "clean up some warnings when building recovery"Doug Zongker2014-02-181-0/+1
|\
| * clean up some warnings when building recoveryDoug Zongker2014-02-141-0/+1
| | | | | | | | Change-Id: I1541534ee6978ddf8d548433986679ce9507d508
* | remove remaining libminelf referencesDoug Zongker2014-02-141-1/+0
|/ | | | Change-Id: Id38b08607829bccc031693cc03e60e849903b6f8
* add syspatch support to updaterDoug Zongker2014-02-131-0/+2
| | | | | | | Add the syspatch() function, which can apply xdelta3+xz patches using the libsyspatch library. Change-Id: Idc1921e449020923bcaf425a1983bec0833e47ed
* Add liblogYing Wang2013-04-101-1/+1
| | | | | Bug: 8580410 Change-Id: Ie60dade81c06589cb0daee431611ded34adef8e6
* Remove HAVE_SELINUX guardsKenny Root2012-10-161-6/+1
| | | | Change-Id: Ia96201f20f7838d7d9e8926208977d3f8318ced4
* Use the static version of libsparseJoe Onorato2012-07-241-1/+1
| | | | Change-Id: I664f8dc7939f8f902e4775eaaf6476fcd4ab8ed2
* Multiple modules with the same name are going away.Joe Onorato2012-07-221-1/+4
| | | | Change-Id: I4154db066865d6031caa3c2c3b94064b2f28076e
* Link against libsparseColin Cross2012-07-181-1/+1
| | | | | | libext4_utils requires libsparse, link against it as well. Change-Id: I4d6aec0e5edcf1ed42118b7b77adcded2858d3dd
* 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
* Extend recovery and updater to support setting file security contexts.Stephen Smalley2012-03-301-1/+2
| | | | | | | 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 libselinux to LOCAL_STATIC_LIBRARIES wherever libext4_utils is used.Stephen Smalley2012-01-241-0/+5
| | | | | | | libext4_utils now calls libselinux in order to determine the file security context to set on files when creating ext4 images. Change-Id: I09fb9d563d22ee106bf100eacd4cd9c6300b1152
* Support multiple recovery updater extensions.Michael Ward2011-07-151-2/+2
| | | | Change-Id: I787c086223b674050c0a12fc575add9badb471af
* Working ASLR implementationHristo Bojinov2010-08-021-0/+1
| | | | | | | | | | Separate files for retouch functionality are in minelf/* ASLR for shared libraries is controlled by "-a" in ota_from_target_files. Binary files are self-contained. Retouch logic can recover from crashes. Signed-off-by: Hristo Bojinov <hristo@google.com> Change-Id: I76c596abf4febd68c14f9d807ac62e8751e0b1bd
* Mute unwanted error messageYing Wang2010-07-211-1/+1
| | | | | | | This CL removes the following line from the top of build logs: "diff: out/target/product/*/obj/PACKAGING/updater_extensions_intermediates/register.inc.list: No such file or directory" Change-Id: I79c15a69a0b1b0da0e45620b45a7a0fea5625250
* support for ext4/EMMC filesystems in updater binaryDoug Zongker2010-07-021-1/+7
| | | | | | | | | Make the mount and format functions take extra parameters describing the filesystem type and add support for mounting and formatting ext4 filesystems on EMMC. Change recovery to consistently use stdout for status messages instead of mixing stdout and stderr.
* am d8f7c9b8: Merge change 5545 into donutAndroid (Google) Code Review2009-06-301-1/+6
|\ | | | | | | | | | | | | Merge commit 'd8f7c9b85e25fab93fef2221a84b60edc2e7b837' * commit 'd8f7c9b85e25fab93fef2221a84b60edc2e7b837': remove updater from the user system image
| * remove updater from the user system imageDoug Zongker2009-06-261-1/+6
| | | | | | | | | | | | | | updater (which is only needed in OTA packages) is getting included in /system/bin, where it just takes up (quite a bit of) space. Use the hack of including it only in eng builds so it's not there for user builds.
* | add device extension mechanism to updaterDoug Zongker2009-06-221-1/+37
|/ | | | | | | Allow devices (in BoardConfig.mk) to define additional static libraries to be linked in to updater, to make device-specific functions available in edify scripts. Modify the updater makefile to arrange for device libraries to register their edify functions.
* edify extensions for OTA package installation, part 2Doug Zongker2009-06-121-1/+2
| | | | | | | | | | | | | | | | | | Adds more edify functions for OTAs: is_mounted getprop apply_patch apply_patch_check apply_patch_space write_raw_image write_firmware_image package_extract_file This allows us to install radios, hboots, boot images, and install incremental OTA packages. Fixes a couple of dumb bugs in edify itself: - we were doubling the size of the function table each time it was *not* full, rather than each time it was full - "no such function" errors weren't visible to the parser, so they didn't prevent execution of the script.
* edify extensions for OTA package installation, part 1Doug Zongker2009-06-121-0/+24
Adds the following edify functions: mount unmount format show_progress delete delete_recursive package_extract symlink set_perm set_perm_recursive This set is enough to extract and install the system part of a (full) OTA package. Adds the updater binary that extracts an edify script from the OTA package and then executes it. Minor changes to the edify core (adds a sleep() builtin for debugging, adds "." to the set of characters that can appear in an unquoted string).