summaryrefslogtreecommitdiffstats
path: root/applypatch/Android.mk (unfollow)
Commit message (Collapse)AuthorFilesLines
2018-04-22applypatch: Fix bad AOSP mergeMichael Bestas1-30/+10
Change-Id: I5922c63af41268bfb3c17f1dcb4157785e46911f
2018-04-22applypatch: Remove obsolete pathmap changesMichael Bestas1-8/+0
* They are replaced by: LOCAL_C_INCLUDES := $(commands_recovery_local_path) * They didn't work anyway because they were overwritten with := Change-Id: I066d724df51a8c3f883f77da9da4d3bc6701d848
2017-10-12applypatch: Move to Soong.Tao Bao1-196/+0
Test: mmma bootable/recovery Change-Id: Ie163aff1c4c2b3b15bb705825779ada6bc38ad67
2017-10-11applypatch: Use shared lib for libbz.Tao Bao1-2/+2
We have shared lib target for libbz now (and libbz.so is already on device because of /system/bin/bzip2). Test: m applypatch Change-Id: I5fe2468a8d535840245f081a92d436240dddbf6b
2017-10-11Move rangeset.h and print_sha1.h into otautil.Tao Bao1-17/+17
Also drop the "bootable/recovery" path in LOCAL_C_INCLUDES from applypatch modules. Test: lunch aosp_{angler,bullhead,fugu,dragon,sailfish}-userdebug; mmma bootable/recovery Change-Id: Idd602a796894f971ee4f8fa3eafe36c42d9de986
2017-10-11applypatch: Use shared libs for libbase/libcrypto/liblog/libziparchive.Tao Bao1-6/+3
This reduces the size of /system/bin/applypatch by ~69KB (aosp_bullhead-userdebug). Also remove the unneeded libcutils dependency. Test: mmma bootable/recovery Test: Check that /system/bin/install-recovery.sh successfully installs the recovery image. Change-Id: I5063be9a9b7b8029d45ab5c2a7c45ef2cda81d26
2017-10-09edify: Export the header and move to Soong.Tao Bao1-0/+1
Also make matching changes to applypatch modules which include edify/expr.h. Test: mmma bootable/recovery Change-Id: Ia72be3caa010d7f56a70add2da345e631b306378
2017-10-09Revert "Revert "Move error_code.h into otautil.""Tao Bao1-0/+1
This reverts commit 26436d6d6010d5323349af7e119ff8f34f85c40c to re-land "Move error_code.h into otautil.". This way it stops requiring relative path ".." in LOCAL_C_INCLUDES (uncrypt and edify). Soong doesn't accept non-local ".." in "local_include_dirs". This CL needs to land with device-specific module changes (e.g. adding the dependency on libotautil). Test: lunch aosp_{angler,bullhead,dragon,fugu,sailfish}-userdebug; mmma bootable/recovery Change-Id: If193241801af2dae73eccd31ce57cd2b81c9fd96
2017-10-09applypatch: Forward declare struct Value.Tao Bao1-0/+2
And move '#include "edify/expr.h"' into .cpp files. This breaks the transitive dependency on libedify. Modules that include "applypatch/applypatch.h" don't need to add libedify into their dependency list, unless they really need anything from libedify. Build libedify static library for host, which is needed by libimgpatch. Test: mmma bootable/recovery Change-Id: Ibb53d322579fcbf593438d058d9bcee240625941
2017-10-05Revert "Move error_code.h into otautil."Tao Bao1-5/+0
This reverts commit 623fe7e701d5d0fb17082d1ced14498af1b44e5b. Reason for revert: Need to address device-specific modules. Change-Id: Ib7a4191e7f193dfff49b02d3de76dda856800251
2017-10-04Move error_code.h into otautil.Tao Bao1-0/+5
This way it stops requiring relative path ".." in LOCAL_C_INCLUDES (uncrypt and edify). Soong doesn't accept non-local ".." in "local_include_dirs". Test: mmma bootable/recovery Change-Id: Ia4649789cef2aaeb2785483660e9ea5a8b389c62
2017-09-29otafault: Remove the use of LOCAL_WHOLE_STATIC_LIBRARIES.Tao Bao1-2/+4
Commit d80a99883d5ae2b117c54f076fe1df7eae86d2f8 has explanation of potential issues. Test: mmma bootable/recovery Change-Id: I25ca9920952b7bbdd8a661d9dc90962431410bc4
2017-08-29Turn on -Wall for recovery modulesTianjie Xu1-3/+7
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
2017-08-19Move Image/ImageChunk/PatchChunk declaration into header filesTianjie Xu1-2/+7
1. Move the declaration of the Image classes to the header file to make testing easier. 2. Also move rangeset.h to bootable/recovery to allow access in imgdiff. Test: recovery component test Change-Id: I68a863e60a3f2e7ae46ee48f48eb15391f5f4330
2017-08-02Refactor the imgdiffTianjie Xu1-1/+2
This helps us to add a new mode to handle large APKs in the follow up CL. Changes include: 1. Create a new interface class 'Image' 1. Create subclasses 'ZipModeImage' and 'ImageModeImage' and move the related functions there. Bug: 63542719 Test: recovery_component_test passes Change-Id: I7729b0ba39b19a9c84811636a60dd0a0b1acc2f0
2017-06-24Complete support for project pathmapMichael Bestas1-3/+9
* Use project pathmap when available for LOCAL_C_INCLUDES Change-Id: Iddc7cc8509d966307c4a490c9d6c15d761dbb3b4
2017-03-16More cleanup to imgdiff & imgpatchTianjie Xu1-9/+6
Also remove the utils in applypatch and replace them with the corresponding libbase functions. Test: recovery tests pass. Change-Id: I77254c141bd3e7d3d6894c23b60e866009516f81
2017-03-07Refractor the code for imgdiffTianjie Xu1-0/+3
Put ImageChunk and some helper functions into a class. Also switch to using std::vector instead of malloc. Bug: 18606652 Test: imgdiff_test passed on host. Also generate a complete incremental OTA package. The file content is the same and time consumption is similar. Change-Id: Id603ada4e130ef521218400761a119001a86ca79
2017-02-02Use bspatch from external/bsdiff.Sen Jiang1-0/+4
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
2017-01-20imgpatch: Compile with ZLIB_CONST defined.Tao Bao1-3/+9
So z_stream.next_in takes pointer to const data. Test: mmma bootable/recovery/applypatch Change-Id: If269b766a7c84fa2f67424ee61ba5afab0159261
2017-01-19imgdiff: cache bsdiff suffix array in zip mode.Sen Jiang1-3/+3
In zip mode, if a chunk is not deflate or its filename can't be found in source chunks, the entire source file is used as old data for bsdiff, To avoid repeatedly construct the suffix array used by bsdiff, we cache the suffix array of the entire source file. Bug: 34281147 Test: =time -v imgdiff -z Chrome-ORF74B.apk Chrome-ORF76B.apk Chrome.imgdiff Change-Id: Ifd957ccecf7226fcb44dbf28c58969a06ef74f4b
2016-12-28imgdiff: Fix an edge case that leads to infinite loop.Tao Bao1-0/+1
When the input image ends with the magic value sequence of 0x1f, 0x8b, 0x0b (optionally with 0x00), the image parsing code will be stuck in an infinite loop. Test: recovery_component_test passes. Change-Id: Ie3629dfdc41360387b19cc3e0359c95ae4fb998e
2016-12-20Add tests for imgdiff.Tao Bao1-21/+69
Factor out libimgdiff static library for testing purpose. This CL adds the imgdiff tests on host and on target both (similar to libimgpatch). In practice, we only need imgdiff binary on host, and libimgpatch on target. But they should build and pass tests on both platforms. Test: recovery_host_test passes; recovery_component_test passes. Change-Id: I0eafb7faf727cdf70066310e845af6ee245d4f60
2016-11-01applypatch: Add testcases for applypatch executable.Tao Bao1-5/+25
Refactor applypatch/main.cpp into libapplypatch_modes so that we can add testcases. Some changes to applypatch/main.cpp: - Replace char** argv with const char**; - Use android::base::Split() to split ":"; - Use android::base::ParseUInt(). Bug: 32383590 Test: Unit tests pass, install-recovery.sh works. Change-Id: I44e7bfa5ab717d439ea1d0ee9ddb7b2c40bb95a4
2016-10-18Replace minzip with libziparchiveTianjie Xu1-1/+0
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
2016-09-30Turn on -Werror for recoveryTianjie Xu1-0/+5
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 (cherry picked from commit 7aa88748f6ec4e53333d1a15747bc44826ccc410)
2016-09-30Turn on -Werror for recoveryTianjie Xu1-0/+5
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
2016-09-01Switch recovery to libbase loggingTianjie Xu1-1/+1
Clean up the recovery image and switch to libbase logging. Bug: 28191554 Change-Id: Icd999c3cc832f0639f204b5c36cea8afe303ad35 (cherry picked from commit 747781433fb01f745529c7e9dd97c5599070ad0d)
2016-09-01Switch recovery to libbase loggingTianjie Xu1-1/+1
Clean up the recovery image and switch to libbase logging. Bug: 28191554 Change-Id: Icd999c3cc832f0639f204b5c36cea8afe303ad35 Merged-In: Icd999c3cc832f0639f204b5c36cea8afe303ad35
2016-09-01Switch recovery to libbase loggingTianjie Xu1-1/+1
Clean up the recovery image and switch to libbase logging. Bug: 28191554 Change-Id: Icd999c3cc832f0639f204b5c36cea8afe303ad35
2016-08-31Fix updater binary for 7.0Ethan Yonker1-1/+1
Note: updater is currently not backwards compatible with older trees. Maybe later... Change-Id: I3c2a5ef69cfa9005502408f7054e3096a64ba34b
2016-08-06Fix references to libcrypto_utils_static.Josh Gao1-4/+4
Bug: http://b/30708454 Change-Id: I7a5048beff1d8b783a9683dcb4a79606a77f20ee
2016-06-10Remove obsolete MTD support.Elliott Hughes1-2/+0
Bug: http://b/29250988 Change-Id: Ia97ba9082a165c37f74d6e1c3f71a367adc59945
2016-06-01Revert "imgdiff: Generate statically linked imgdiff."Tao Bao1-2/+1
This reverts commit b4422bd76952be4321cfbce3220bcb4fd41b5154. Bug: 28941046 Change-Id: Ic3c7439c64b8e55832252850514f721a944993d6
2016-05-31imgdiff: Generate statically linked imgdiff.Tao Bao1-1/+2
Bug: 28941046 Change-Id: If3019d8cff91fd4f6fa4516bef5a0f51c2ddebc7
2016-05-04applypatch: Use bsdiff from external/bsdiff.Sen Jiang1-2/+7
external/bsdiff uses divsufsort which is much faster, and also include some bug fixes. Bug: 26982501 Test: ./imgdiff_test.sh Change-Id: I089a301c291ee55d79938c7a3ca6d509895440d1
2016-03-03Fix the improper use of LOCAL_WHOLE_STATIC_LIBRARIES.Tao Bao1-20/+44
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
2016-02-10IO fault injection for OTA packagesJed Estep1-2/+2
Bug: 25951086 Change-Id: I31c74c735eb7a975b7f41fe2b2eff042e5699c0c (cherry-picked from commit f1fc48c6e62cfee42d25ad12f443e22d50c15d0b)
2016-02-05applypatch: fix memory leaks reported by static analysis.Yabin Cui1-1/+1
Bug: 26906416 Change-Id: I163df5a8f3abda3ba5d4ed81dfc8567054eceb27
2016-02-04Switch from mincrypt to BoringSSL in applypatch and updater.Sen Jiang1-4/+4
Bug: 18790686 Change-Id: I7d2136fb39b2266f5ae5be24819c617b08a6c21e
2016-01-29Fix build.Tao Bao1-0/+2
Disable libimgpatch for non-Linux host. Change-Id: Ib3615204b76564c691ddafaa29e59fef334d9d36
2016-01-28applypatch: Compile libimgpatch for target and host.Sen Jiang1-1/+23
update_engine need it for the new IMGDIFF operation. Also removed __unused in ApplyImagePatch() as I got error building it for the host, and I think it's dangerous not checking the size of the input. Test: mma Bug: 26628339 Change-Id: I22d4cd55c2c3f87697d6afdf10e8106fef7d1a9c
2016-01-06IO fault injection for OTA packagesJed Estep1-2/+2
Bug: 25951086 Change-Id: I31c74c735eb7a975b7f41fe2b2eff042e5699c0c
2015-12-02Remove the building rules for applypatch_static.Tao Bao1-13/+0
The CL in [1] has stopped building and packaging the obsolete applypatch_static tool. [1]: commit a04fca31bf1fadcdf982090c942ccbe4d9b95c71 Bug: 24621915 Change-Id: I5e98951ad7ea5c2a7b351af732fd6722763f59bd
2015-11-16applypatch: Refactor strtok().Tao Bao1-3/+3
We have android::base::Split() for the work. Change-Id: Ic529db42090f700e6455d465c8b84b7f52d34d63 (cherry picked from commit 0a47ce27de454e272a883a0c452fad627fd7f419)
2015-11-16DO NOT MERGE recovery: Switch applypatch/ and updater/ to cpp.Tao Bao1-4/+4
Mostly trivial changes to make cpp compiler happy. Change-Id: I69bd1d96fcccf506007f6144faf37e11cfba1270 (cherry picked from commit ba9a42aa7e10686de186636fe9fecbf8c4cc7c19)
2015-11-16Stop using libstdc++.Dan Albert1-2/+2
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 (cherry picked from commit e49a9e527a51f43db792263bb60bfc91293848da)
2015-11-16recovery: Switch to clangTao Bao1-0/+5
And a few trival fixes to suppress warnings. Change-Id: Id28e3581aaca4bda59826afa80c0c1cdfb0442fc (cherry picked from commit 80e46e08de5f65702fa7f7cd3ef83f905d919bbc)
2015-07-24applypatch: Refactor strtok().Tao Bao1-3/+3
We have android::base::Split() for the work. Change-Id: I0fb562feb203c9b15e2f431d8e84355fd682376a (cherry picked from commit 0a47ce27de454e272a883a0c452fad627fd7f419)
2015-07-17applypatch: Refactor strtok().Tao Bao1-3/+3
We have android::base::Split() for the work. Change-Id: Ic529db42090f700e6455d465c8b84b7f52d34d63
2015-07-14recovery: Switch applypatch/ and updater/ to cpp.Tao Bao1-4/+4
Mostly trivial changes to make cpp compiler happy. Change-Id: I1b0481465c67c3bbca35a839d0764190d84ff34e (cherry picked from commit ba9a42aa7e10686de186636fe9fecbf8c4cc7c19)
2015-07-14recovery: Switch applypatch/ and updater/ to cpp.Tao Bao1-4/+4
Mostly trivial changes to make cpp compiler happy. Change-Id: I69bd1d96fcccf506007f6144faf37e11cfba1270
2015-06-03recovery: Switch to clangTao Bao1-0/+5
And a few trival fixes to suppress warnings. Change-Id: I38734b5f4434643e85feab25f4807b46a45d8d65
2015-05-19Stop using libstdc++.Dan Albert1-2/+2
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
2014-11-03Remove dependence on build hax in makefilesMatt Mower1-1/+2
Update makefiles to no longer rely on INTERNAL_RECOVERY_FILES. Define LOCAL_ADDITIONAL_DEPENDENCIES instead. Set LOCAL_LDFLAGS to properly link recovery executable. Change-Id: I4542104c69399b5a19674b9772ab89c3709efa72
2014-10-07applypatch: add support for BML partitionsConn O'Griofa1-0/+8
This actually uses the EMMC partition access code. In order for this to work, the BML partition name is changed back to the block device name (e.g. "boot" -> "/dev/block/bml9"), and the BML_UNLOCK_ALL ioctl is called before writing. Change-Id: I012f1eca0b486b7465ca38b5db1f513ee8a246ea
2014-09-03Build block TWRP with RECOVERY_VARIANTMatt Mower1-3/+6
Enable TWRP to reside alongside other recoveries with the naming convention: bootable/recovery(-flag). If TWRP resides at bootable/recovery and a device does not specify RECOVERY_VARIANT, then it will build like normal. If TWRP resides at bootable/recovery-twrp, then its makefiles will only be parsed if a device specifies 'RECOVERY_VARIANT := twrp'. This prevents TWRP specific makefile warnings/errors (notably, missing DEVICE_RESOLUTION) when another recovery is being built. Change-Id: I8f02fffcd79c309c7123b9428eedc69af02e126e
2014-02-14remove remaining libminelf referencesDoug Zongker1-2/+2
Change-Id: Id38b08607829bccc031693cc03e60e849903b6f8
2013-11-03Fix building of other utilitiesDees Troy1-3/+3
Fix building all applypatch items Fix building verifier_test (probably will not work right as-is) but at least it builds without errors. Change-Id: I7ab0c04d7d3d2c2e14b57480627e594f89a68b0b
2012-09-05TWRP-ify AOSP codeDees_Troy1-0/+1
Pull in most TWRP sources Stub out partition management code Make it compile -- probably will not boot Kind of a mess but have to start somewhere
2012-08-14host modules don't need LOCAL_MODULE_TAGSJoe Onorato1-1/+0
Change-Id: I5e1df90f18fbaf98e3207c553a8fb859c1064137
2012-07-22host modules don't need LOCAL_MODULE_TAGSJoe Onorato1-1/+0
Change-Id: I5e1df90f18fbaf98e3207c553a8fb859c1064137
2011-07-12Remove the simulator target from all makefiles.Jeff Brown1-4/+0
Bug: 5010576 Change-Id: Ib465fdb42c8621899bea15c04a427d7ab1641a8c
2011-02-09Fix x86 build.Ying Wang1-2/+0
Change-Id: Iada6268b0a72ee832113ea397334cc7950a37051
2010-08-02Working ASLR implementationHristo Bojinov1-2/+2
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
2010-05-04generic_x86 supportBruce Beare1-0/+2
Add in Makefiles and support files for x86 builds Based on changes by: wonjong.lee <wonjong.lee@windriver.com> Additional changes by: Mark Gross <mark.gross@intel.com> Additional changes by: Bruce Beare <brucex.j.beare@intel.com> Change-Id: I71fcf58f116e4e9047e7d03fdb28e3308553ce5c
2010-02-23refactor applypatch and friendsDoug Zongker1-0/+2
Change the applypatch function to take meaningful arguments instead of argc and argv. Move all the parsing of arguments into main.c (for the standalone binary) and into install.c (for the updater function). applypatch() takes patches as Value objects, so we can pass in blobs extracted from the package without ever writing them to temp files. The patching code is changed to read the patch from memory instead of a file. A bunch of compiler warnings (mostly about signed vs unsigned types) are fixed. Support for the IMGDIFF1 format is dropped. (We've been generating IMGDIFF2 packages for some time now.) Change-Id: I217563c500012750f27110db821928a06211323f
2010-02-18relocate applypatch; add type system and new functions to edifyDoug Zongker1-0/+59
- Move applypatch to this package (from build). - Add a rudimentary type system to edify: instead of just returning a char*, functions now return a Value*, which is a struct that can carry different types of value (currently just STRING and BLOB). Convert all functions to this new scheme. - Change the one-argument form of package_extract_file to return a Value of the new BLOB type. - Add read_file() to load a local file and return a blob, and sha1_check() to test a blob (or string) against a set of possible sha1s. read_file() uses the file-loading code from applypatch so it can read MTD partitions as well. This is the start of better integration between applypatch and the rest of edify. b/2361316 - VZW Issue PP628: Continuous reset to Droid logo: framework-res.apk update failed (CR LIBtt59130) Change-Id: Ibd038074749a4d515de1f115c498c6c589ee91e5