summaryrefslogtreecommitdiffstats
path: root/applypatch (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix updater binary for 7.0Ethan Yonker2016-08-312-5/+5
| | | | | | | Note: updater is currently not backwards compatible with older trees. Maybe later... Change-Id: I3c2a5ef69cfa9005502408f7054e3096a64ba34b
* Update to 7.0Ethan Yonker2016-08-2412-811/+783
|\ | | | | | | Change-Id: I621cc47352f7ac552d9602485825ae3a6f9ae516
| * applypatch: Don't call inflate() when it expects zero-length output.Tao Bao2016-06-141-57/+66
| | | | | | | | | | | | | | | | | | We may have expanded_len == 0 when calling inflate(). After switching to using std::vector, it passes a nullptr buffer to inflate() and leads to Z_STREAM_ERROR. Bug: 29312140 Change-Id: Iab7c6c07a9e8488e844e7cdda76d02bd60d2ea98
| * Control fault injection with config files instead of build flagsJed Estep2016-03-191-1/+1
| | | | | | | | | | Bug: 27724259 Change-Id: I65bdefed10b3fb85fcb9e1147eaf0687d7d438f4
| * Revert "DO NOT MERGE Control fault injection with config files instead of build flags"Tao Bao2016-03-171-1/+1
| | | | | | | | | | | | | | This reverts commit f73abf36bcfd433a3fdd1664a77e8e531346c1b1. Bug: 27724259 Change-Id: I1301fdad15650837d0b1febd0c3239134e2b94fb
| * DO NOT MERGE Control fault injection with config files instead of build flagsJed Estep2016-03-161-1/+1
| | | | | | | | | | Bug: 26570379 Change-Id: I76109d09276d6e3ed3a32b6fedafb2582f545c0c
| * applypatch: use vector to store data in FileContents.Yabin Cui2016-03-113-117/+67
| | | | | | | | | | | | | | | | | | Cherry pick this patch because it fixes the problem that a newed Value is released by free(). Bug: 26906416 Change-Id: Ib53b445cd415a1ed5e95733fbc4073f9ef4dbc43 (cherry picked from commit d6c93afcc28cc65217ba65eeb646009c4f15a2ad)
| * resolve merge conflicts of 715d8a203a to master.Yabin Cui2016-02-067-303/+204
| |\ | | | | | | | | | Change-Id: Ic868ee9b27ef7251aa49ac814de7355ecd9c7d37
| | * applypatch: fix memory leaks reported by static analysis.Yabin Cui2016-02-057-303/+202
| | | | | | | | | | | | | | | Bug: 26906416 Change-Id: I163df5a8f3abda3ba5d4ed81dfc8567054eceb27
| * | resolve merge conflicts of 7b6027dde4 to master.Tao Bao2016-02-046-38/+37
| |\| | | | | | | | | | Change-Id: I1d5232f61744bb18ca5de3a16a340bc3afd110bb
| | * Switch from mincrypt to BoringSSL in applypatch and updater.Sen Jiang2016-02-046-38/+37
| | | | | | | | | | | | | | | Bug: 18790686 Change-Id: I7d2136fb39b2266f5ae5be24819c617b08a6c21e
| * | Merge "Fix build." am: 9d72d4175bTao Bao2016-01-291-0/+2
| |\| | | | | | | | | | | | | | | | | | | am: 2ab24d36b9 * commit '2ab24d36b91e28416a85e2c56442c22c984903ea': Fix build.
| | * Fix build.Tao Bao2016-01-291-0/+2
| | | | | | | | | | | | | | | | | | Disable libimgpatch for non-Linux host. Change-Id: Ib3615204b76564c691ddafaa29e59fef334d9d36
| * | resolve merge conflicts of 725833e024 to master.Tao Bao2016-01-294-2/+69
| |\| | | | | | | | | | Change-Id: I68b8737e3bc2bd7bffd7625114723bc1efa47398
| | * applypatch: Compile libimgpatch for target and host.Sen Jiang2016-01-284-2/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | IO fault injection for OTA packagesJed Estep2016-01-062-26/+27
| |/ | | | | | | | | Bug: 25951086 Change-Id: I31c74c735eb7a975b7f41fe2b2eff042e5699c0c
| * imgdiff: skip spurious gzip headers in image filesDavid Riley2015-12-231-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | dragon kernel is compressed via lz4 for boot speed and bootloader support reasons and recent prebuilts happen to include the gzip header sequence which is causing imgdiff to fail. Detect a spurious gzip header and treat the section as a normal section. Bug: 26133184 Change-Id: I369d7d576fd7d2c579c0780fc5c669a5b6ea0d3d (cherry picked from commit 0f2f6a746af517afca9e5e089a4a17be0a9766d6) Signed-off-by: David Riley <davidriley@google.com>
| * Track rename from base/ to android-base/.Elliott Hughes2015-12-051-1/+1
| | | | | | | | Change-Id: I354a8c424d340a9abe21fd716a4ee0d3b177d86f
| * Remove the building rules for applypatch_static.Tao Bao2015-12-021-13/+0
| | | | | | | | | | | | | | | | | | | | The CL in [1] has stopped building and packaging the obsolete applypatch_static tool. [1]: commit a04fca31bf1fadcdf982090c942ccbe4d9b95c71 Bug: 24621915 Change-Id: I5e98951ad7ea5c2a7b351af732fd6722763f59bd
| * imgdiff: fix file descriptor leakJeremy Compostella2015-09-081-1/+9
| | | | | | | | | | | | | | | | | | | | mkstemp() allocates a file description that is never released. If MakePatch() is called too many time, imgdiff reaches the Operating System EMFILE (too many open files) limit. Change-Id: Icbe1399f6f6d32cfa1830f879cacf7d75bbd9fc3 Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com> Signed-off-by: Gaelle Nassiet <gaellex.nassiet@intel.com>
| * updater: Clean up char* with std::string.Tao Bao2015-08-061-11/+1
| | | | | | | | | | | | | | So we can remove a few free()s. And also replace a few pointers with references. Change-Id: I4b6332216704f4f9ea4a044b8d4bb7aa42a7ef26
| * applypatch: Fix the checking in WriteToPartition().Tao Bao2015-07-251-3/+4
| | | | | | | | | | | | | | | | WriteToPartition() should consider a target name as valid if it contains multiple colons. But only the first two fields will be used. Bug: 22725128 Change-Id: Ie9404375e24045c115595eec6ce5b6423da8fc3e
| * applypatch: Support flash mode.Tao Bao2015-07-243-16/+97
| | | | | | | | | | | | | | | | | | | | We may carry a full copy of recovery image in the /system, and use /system/bin/install-recovery.sh to install the recovery. This CL adds support to flash the recovery partition with the given image. Bug: 22641135 Change-Id: I7a275b62fdd1bf41f97f6aab62d0200f7dae5aa1 (cherry picked from commit 68c5a6796737bb583a8bdfa4c9cd9c7f12ef4276)
| * applypatch: Refactor strtok().Tao Bao2015-07-242-86/+56
| | | | | | | | | | | | | | We have android::base::Split() for the work. Change-Id: I0fb562feb203c9b15e2f431d8e84355fd682376a (cherry picked from commit 0a47ce27de454e272a883a0c452fad627fd7f419)
| * recovery: Switch applypatch/ and updater/ to cpp.Tao Bao2015-07-149-186/+183
| | | | | | | | | | | | Mostly trivial changes to make cpp compiler happy. Change-Id: I69bd1d96fcccf506007f6144faf37e11cfba1270
| * recovery: Switch to clangTao Bao2015-06-031-0/+5
| | | | | | | | | | | | And a few trival fixes to suppress warnings. Change-Id: I38734b5f4434643e85feab25f4807b46a45d8d65
| * Use f_bavail to calculate free spacecaozhiyuan2015-05-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | Failures are seen on devices with Linux 3.10. And they are mainly due to this change: https://lwn.net/Articles/546473/ The blocks reserved in this change is not the same thing as what we think are reserved for common usage of root user. And this part is included in free blocks but not in available blocks. Change-Id: Ib29e12d775b86ef657c0af7fa7a944d2b1e12dc8
| * Stop using libstdc++.Dan Albert2015-05-191-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
| * Check all lseek calls succeed.Elliott Hughes2015-04-301-24/+27
| | | | | | | | | | | | | | Also add missing TEMP_FAILURE_RETRYs on read, write, and lseek. Bug: http://b/20625546 Change-Id: I03b198e11c1921b35518ee2dd005a7cfcf4fd94b
* | Merge up to AOSP marshmallow-releaseEthan Yonker2015-10-094-25/+39
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to maintain compatibility with older trees, we now have minadbd.old and minui.old. I had to use a TARGET_GLOBAL_CFLAG to handle ifdef issues in minui/minui.d because healthd includes minui/minui.h and there was no other alternative to make minui.h compatible with older trees without having to modify healthd rules which is outside of TWRP. Note that the new minui does not currently have support for qcom overlay graphics. Support for this graphics mode will likely be added in a later patch set. If you are building in a 6.0 tree and have a device that needs qcom overlay graphics, be warned, as off mode charging may not work properly. A dead battery in this case could potentially brick your device if it is unable to charge as healthd handles charging duties. Update rules for building toolbox and add rules for making toybox Use permissive.sh in init.rc which will follow symlinks so we do not have to worry about what binary is supplying the setenforce functionality (toolbox, toybox, or busybox). Fix a few warnings in the main recovery binary source code. Fix a few includes that were missing that prevented compiling in 6.0 Change-Id: Ia67aa2107d260883da5e365475a19bea538e8b97
| * | Use f_bavail to calculate free spacecaozhiyuan2015-06-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Failures are seen on devices with Linux 3.10. And they are mainly due to this change: https://lwn.net/Articles/546473/ The blocks reserved in this change is not the same thing as what we think are reserved for common usage of root user. And this part is included in free blocks but not in available blocks. Bug: 22118089 Change-Id: I81c9531703298019a4fc11839f28d2cc8b9df34e (cherry picked from commit 3b4977638f48e59d23d7ea2bb6dde78552c257fb)
| * | Check all lseek calls succeed.Elliott Hughes2015-04-301-24/+27
| |/ | | | | | | | | | | | | | | Also add missing TEMP_FAILURE_RETRYs on read, write, and lseek. Bug: http://b/20625546 Change-Id: I03b198e11c1921b35518ee2dd005a7cfcf4fd94b (cherry picked from commit 7bad7c4646ee8fd8d6e6ed0ffd3ddbb0c1b41a2f)
| * imgdiff: Avoid infinite loop if inflate failsJohan Redestig2015-04-151-0/+9
| | | | | | | | | | | | | | Break out of the loop if inflate returns an error and print some details. Change-Id: Ie157cf943291b1a26f4523b17691dfcefbc881dc
| * am aeecac54: Merge "Add missing includes."Elliott Hughes2015-01-301-0/+1
| |\ | | | | | | | | | | | | * commit 'aeecac5444ce55d2e82ee1b2aa35ff61a038c14e': Add missing includes.
| | * Add missing includes.Elliott Hughes2015-01-301-0/+1
| | | | | | | | | | | | Change-Id: I06ea08400efa511e627be37a4fd70fbdfadea2e6
| * | am dab56cac: Merge "Add missing includes."Elliott Hughes2015-01-281-0/+1
| |\| | | | | | | | | | | | | * commit 'dab56cac959ce9c78e3a0a22e9ee2ff917d61bd3': Add missing includes.
| | * Add missing includes.Elliott Hughes2015-01-281-0/+1
| | | | | | | | | | | | Change-Id: I0737456e0221ebe9cc854d65c95a7d37d0869d56
| * | Use more aggressive sync writing to applypatch.Michael Runge2014-10-291-8/+36
| |/ | | | | | | | | | | | | | | | | | | We have seen cases where the boot partition is patched, but upon recovery the partition appears to be corrupted. Open up all patched files/partitions with O_SYNC, and do not ignore the errors from fsync/close operations. Bug: 18170529 Change-Id: I392ad0a321d937c4ad02eaeea9170be384a4744b
* | Merge in lollipop and attempt to fix merge conflictsEthan Yonker2014-11-066-74/+73
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will probably not compile and may need additional work. For tracking purposes so we know what might still need looking at as none of this has been compiled and tested, here is a list of the merge conflicts that I attempted to fix before pushing this set of changes: git pull aosp lollipop-release remote: Finding sources: 100% (992/992) remote: Total 992 (delta 473), reused 992 (delta 473) Receiving objects: 100% (992/992), 1.51 MiB | 516.00 KiB/s, done. Resolving deltas: 100% (473/473), completed with 42 local objects. From https://android.googlesource.com/platform/bootable/recovery * branch lollipop-release -> FETCH_HEAD * [new branch] lollipop-release -> aosp/lollipop-release Auto-merging verifier_test.cpp CONFLICT (content): Merge conflict in verifier_test.cpp Auto-merging verifier.h CONFLICT (content): Merge conflict in verifier.h Auto-merging verifier.cpp CONFLICT (content): Merge conflict in verifier.cpp Auto-merging updater/updater.c Auto-merging updater/install.c CONFLICT (content): Merge conflict in updater/install.c Auto-merging updater/Android.mk CONFLICT (content): Merge conflict in updater/Android.mk Auto-merging uncrypt/Android.mk CONFLICT (content): Merge conflict in uncrypt/Android.mk Auto-merging ui.cpp CONFLICT (content): Merge conflict in ui.cpp Auto-merging screen_ui.cpp Auto-merging roots.cpp CONFLICT (content): Merge conflict in roots.cpp CONFLICT (rename/delete): res-hdpi/images/progress_fill.png deleted in HEAD and renamed in cddb68b5eafbeba696d5276bda1f1a9f70bbde42. Version cddb68b5eafbeba696d5276bda1f1a9f70bbde42 of res-hdpi/images/progress_fill.png left in tree. CONFLICT (rename/delete): res-hdpi/images/progress_empty.png deleted in HEAD and renamed in cddb68b5eafbeba696d5276bda1f1a9f70bbde42. Version cddb68b5eafbeba696d5276bda1f1a9f70bbde42 of res-hdpi/images/progress_empty.png left in tree. CONFLICT (rename/delete): res-hdpi/images/icon_error.png deleted in HEAD and renamed in cddb68b5eafbeba696d5276bda1f1a9f70bbde42. Version cddb68b5eafbeba696d5276bda1f1a9f70bbde42 of res-hdpi/images/icon_error.png left in tree. Auto-merging recovery.cpp CONFLICT (content): Merge conflict in recovery.cpp Auto-merging minui/resources.c CONFLICT (content): Merge conflict in minui/resources.c Auto-merging minui/minui.h CONFLICT (content): Merge conflict in minui/minui.h Auto-merging minui/graphics.c CONFLICT (content): Merge conflict in minui/graphics.c Auto-merging minui/Android.mk CONFLICT (content): Merge conflict in minui/Android.mk Removing minelf/Retouch.h Removing minelf/Retouch.c Auto-merging minadbd/usb_linux_client.c CONFLICT (content): Merge conflict in minadbd/usb_linux_client.c Auto-merging minadbd/adb.h CONFLICT (content): Merge conflict in minadbd/adb.h Auto-merging minadbd/adb.c CONFLICT (content): Merge conflict in minadbd/adb.c Auto-merging minadbd/Android.mk CONFLICT (content): Merge conflict in minadbd/Android.mk Removing make-overlay.py Auto-merging install.h CONFLICT (content): Merge conflict in install.h Auto-merging etc/init.rc CONFLICT (content): Merge conflict in etc/init.rc Auto-merging bootloader.h Auto-merging applypatch/applypatch.c Auto-merging applypatch/Android.mk CONFLICT (content): Merge conflict in applypatch/Android.mk Auto-merging adb_install.cpp CONFLICT (content): Merge conflict in adb_install.cpp Auto-merging Android.mk CONFLICT (content): Merge conflict in Android.mk Automatic merge failed; fix conflicts and then commit the result. Change-Id: I3e0e03e48ad8550912111c7a5c9a140ed0267e2c
| * | Use more aggressive sync writing to applypatch.Michael Runge2014-10-291-8/+36
| |/ | | | | | | | | | | | | | | | | | | We have seen cases where the boot partition is patched, but upon recovery the partition appears to be corrupted. Open up all patched files/partitions with O_SYNC, and do not ignore the errors from fsync/close operations. Bug: 18170529 Change-Id: I392ad0a321d937c4ad02eaeea9170be384a4744b
| * installer for new block OTA systemDoug Zongker2014-08-204-9/+7
| | | | | | | | | | | | | | (Cherry-pick back from master.) Bug: 16984795 Change-Id: Ifa3d8345c5e2a0be86fb28faa080ca82592a96b4
| * am c4804e9b: am d4592694: am 3ca99f6c: Merge "fix vulnerability in bspatch"Doug Zongker2014-05-161-0/+5
| |\ | | | | | | | | | | | | * commit 'c4804e9b9c143652d17441b4b672b920b11cc94a': fix vulnerability in bspatch
| | * am 3ca99f6c: Merge "fix vulnerability in bspatch"Doug Zongker2014-05-161-0/+5
| | |\ | | | | | | | | | | | | | | | | * commit '3ca99f6cb8ffbe19c7ef5409f3dac18ea0c254bd': fix vulnerability in bspatch
| | | * fix vulnerability in bspatchDoug Zongker2014-05-131-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patches with control data tuples with negative numbers in the first and/or second can cause bspatch to write to arbitrary locations in the heap. Change-Id: I8c5d81948be773e6483241131d3d166b6da27cb8
| | * | am 026ebe02: Merge "Recovery 64-bit compile issues"Mark Salyzyn2014-03-142-9/+10
| | |\| | | | | | | | | | | | | | | | | * commit '026ebe0214d6c1c9b3ddc22c35e9ac37e5f622bc': Recovery 64-bit compile issues
| * | | am 4b6de1ba: am 026ebe02: Merge "Recovery 64-bit compile issues"Mark Salyzyn2014-03-142-9/+10
| |\ \ \ | | | | | | | | | | | | | | | | | | | | * commit '4b6de1ba1ce0fff95c18a8abb7ba6e5762006d49': Recovery 64-bit compile issues
| | * \ \ am 026ebe02: Merge "Recovery 64-bit compile issues"Mark Salyzyn2014-03-142-9/+10
| | |\ \ \ | | | |/ / | | |/| / | | | |/ | | | | * commit '026ebe0214d6c1c9b3ddc22c35e9ac37e5f622bc': Recovery 64-bit compile issues
| | | * Recovery 64-bit compile issuesMark Salyzyn2014-03-142-9/+10
| | | | | | | | | | | | | | | | Change-Id: I92d5abd1a628feab3b0246924fab7f97ba3b9d34
| * | | remove remaining libminelf referencesDoug Zongker2014-02-141-2/+2
| | | | | | | | | | | | | | | | Change-Id: Id38b08607829bccc031693cc03e60e849903b6f8
| * | | remove 'retouch' ASLR supportDoug Zongker2014-02-143-32/+11
| |/ / | | | | | | | | | | | | | | | | | | | | | 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
| * / fix unnecessarily slow writing of EMMC partitionsDoug Zongker2013-12-201-15/+3
| |/ | | | | | | | | | | | | | | | | | | | | These were attempts to write partitions "conservatively" in hopes of fixing the problems with writing the radio partition on Nexus 4. They didn't work (a kernel patch was needed), but got left in. They make writing of partitions unnecessarily slow (ie, we really shouldn't need to sync() after every 4kb). Roll back most of them, but leave the verification read-back in. Change-Id: I94badc0979e88816c5aa0485f6316c02be69173c
* | Remove dependence on build hax in makefilesMatt Mower2014-11-031-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
* | applypatch: add support for BML partitionsConn O'Griofa2014-10-072-4/+46
| | | | | | | | | | | | | | | | | | 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
* | Build block TWRP with RECOVERY_VARIANTMatt Mower2014-09-031-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
* | Fix building of other utilitiesDees Troy2013-11-031-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
* | Fix merge conflicts and update for 4.4 kitkatDees Troy2013-11-021-1/+1
|\| | | | | | | | | | | | | | | Make a copy of libmincrypt in TWRP source so we do not have to ifdef verifier.cpp for various versions of mincrypt. Remove reboot tool from toolbox (it was removed from 4.4 and did not compile properly on some devices in older trees)
| * am a69b50c5: am 901b898d: recovery: remove O_DIRECT, use O_SYNC onlyDoug Zongker2013-07-111-2/+2
| |\ | | | | | | | | | | | | * commit 'a69b50c567d46afad73c4d6ab9e57f078ee73327': recovery: remove O_DIRECT, use O_SYNC only
| * \ am 660637f3: am e8d953aa: recovery: more cargo-cult programmingDoug Zongker2013-07-111-2/+2
| |\ \ | | | | | | | | | | | | | | | | * commit '660637f3fc6fe20e8b7f47b98152138c2c92b7ec': recovery: more cargo-cult programming
| * \ \ am fbcfad33: am bf4a69ac: recovery: sleep after writing partition and closing itDoug Zongker2013-07-111-2/+7
| |\ \ \ | | | | | | | | | | | | | | | | | | | | * commit 'fbcfad33face5d3b9e6b8cb04379168bceb517df': recovery: sleep after writing partition and closing it
| * \ \ \ am 2148133d: am c870a99c: recovery: write partitions more conservativelyDoug Zongker2013-07-111-24/+46
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * commit '2148133d46cb875316b01947dd5719ed995f7d67': recovery: write partitions more conservatively
| * \ \ \ \ am 0ccaccf7: am 044a0b4d: recovery: try to write EMMC partitions more reliablyDoug Zongker2013-07-082-7/+73
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '0ccaccf7d0f50bb9555ee13a841c246a1fea80f2': recovery: try to write EMMC partitions more reliably
| * | | | | | verifier: update to support certificates using SHA-256Doug Zongker2013-04-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ifd5a29d459acf101311fa1c220f728c3d0ac2e4e
* | | | | | | Update to latest AOSP masterDees_Troy2013-09-045-35/+221
|\ \ \ \ \ \ \ | | |_|_|_|_|/ | |/| | | | | | | | | | | | Merge in latest commits from AOSP master and fix merge conflicts
| * | | | | | recovery: remove O_DIRECT, use O_SYNC onlyDoug Zongker2013-07-111-2/+2
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | O_DIRECT writes fail with EINVAL due to alignment issues. Change-Id: If8cf38a636313e4f4b4e61e66287dc903c473e5b
| * | | | | recovery: more cargo-cult programmingDoug Zongker2013-07-111-2/+2
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | Add O_DIRECT|O_SYNC when opening partitions for write. Change-Id: I9825ad8e60fba87e482f8abc5593d6f54a1e3a1c
| * | | | recovery: sleep after writing partition and closing itDoug Zongker2013-07-101-2/+7
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | Another speculative attempt to get everything we write actually stored to the device. Change-Id: Icf40b0741b4c535e55ea34848073a97d90dc0e70
| * | | recovery: write partitions more conservativelyDoug Zongker2013-07-091-24/+46
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | Write and verify partitions using write(2) and read(2) rather than the stdio functions. Read and write in 4kb blocks. When writing, fsync() every 1MB. Bug: 9602014 Change-Id: Ie98ce38e857786fc0f4ebf36bb5ffc93b41bc96f
| * | recovery: try to write EMMC partitions more reliablyDoug Zongker2013-07-082-7/+73
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nexus 4 has flash errors that manifest during large writes (eg, of the radio partition). Writes of some blocks seem to be dropped silently, without any errors being returned to the user level. Make two changes to the partition-writing code: - break it up into 1MB writes instead of writing partitions with a single fwrite() call. Pause for 50ms in between every chunk. - read the partition back after writing and verify that we read what we wrote. Drop caches before reading so we (hopefully) are reading off the actual flash and not some cache. Neither of these should be necessary. Bug: 9602014 Change-Id: Ice2e24dd4c11f1a57968277b5eb1468c772f6f63
| * reduce some recovery loggingDoug Zongker2012-10-191-6/+21
| | | | | | | | | | | | | | | | | | | | | | 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
| * add bonus data feature to imgdiff/imgpatch/applypatchDoug Zongker2012-08-215-21/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+0
| |\ | | | | | | | | | | | | | | | | | | * 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
| * | Add mode when open(O_CREAT) is used.Nick Kralevich2012-06-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When creating a new file using open(..., O_CREAT), it is an error to fail to specify a creation mode. If a mode is not specified, a random stack provided value is used as the "mode". This will become a compile error in a future Android change. Change-Id: I73c1e1a39ca36bf01704b07302af4971d234b5a8
* | | Add mode when open(O_CREAT) is used.Nick Kralevich2013-01-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When creating a new file using open(..., O_CREAT), it is an error to fail to specify a creation mode. If a mode is not specified, a random stack provided value is used as the "mode". This will become a compile error in a future Android change. Change-Id: I73c1e1a39ca36bf01704b07302af4971d234b5a8
* | | TWRP-ify AOSP codeDees_Troy2012-09-051-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
* | host modules don't need LOCAL_MODULE_TAGSJoe Onorato2012-07-221-1/+0
|/ | | | Change-Id: I5e1df90f18fbaf98e3207c553a8fb859c1064137
* Add NOTICE fileWei Zhong2012-04-061-0/+41
| | | | | | | | | | | 1. AOSP_APACH2 2. BSD for bsdiff.c and bspatch.c Bug: 6299628 Change-Id: If9a5f7f8f07ad51bb62202253da189d804674e54 Signed-off-by: Wei Zhong <wzhong@google.com> (cherry picked from commit 592e7a9cf1c856bee2adb8f285ac359e2d7f68e1)
* fix buildDoug Zongker2012-02-282-2/+2
| | | | Change-Id: I44a75f5451af053778be299b23274ecce9b2db76
* fix failure to free memoryDoug Zongker2012-02-282-19/+45
| | | | | | | The applypatch function is somewhat sloppy about freeing memory (since it was originally a standalone binary). Fix some of that. Change-Id: Ifd44d71ea189c0b5115493119fd57bc37533fd59
* Remove the simulator target from all makefiles.Jeff Brown2011-07-121-4/+0
| | | | | | Bug: 5010576 Change-Id: Ib465fdb42c8621899bea15c04a427d7ab1641a8c
* Fix x86 build.Ying Wang2011-02-091-2/+0
| | | | Change-Id: Iada6268b0a72ee832113ea397334cc7950a37051
* am c080bc54: am fbd7ae7a: am 201cd466: remove shadowed variable declarationDoug Zongker2010-08-161-1/+2
|\ | | | | | | | | | | | | Merge commit 'c080bc549aaf272c77fe7903e52c2a2c0d8de1bb' * commit 'c080bc549aaf272c77fe7903e52c2a2c0d8de1bb': remove shadowed variable declaration
| * am 201cd466: remove shadowed variable declarationDoug Zongker2010-08-131-1/+2
| |\ | | | | | | | | | | | | | | | | | | Merge commit '201cd46680f5789e21a57fb4476ab0ba0c0ed4c0' into gingerbread * commit '201cd46680f5789e21a57fb4476ab0ba0c0ed4c0': remove shadowed variable declaration
| | * remove shadowed variable declarationDoug Zongker2010-08-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An accidental variable declaration ("int enough_space = ..." instead of "enough_space = " inside a block) shadowing the real one meant we were always using the copy-to-cache path for patching, even when not necessary. Remove it. Enforce an absolute minimum of free space as well, to avoid running into problems patching small files, now that the copy-to-cache path is (inadvertently) well-tested. Change-Id: Idb7d57241a9adcda2e11001fa44f0cd67ce40d19
* | | am c4e32005: am 17986e6b: am 8cd9e4f3: fix bug in applying patchesDoug Zongker2010-08-131-1/+1
|\| | | | | | | | | | | | | | | | | | | | Merge commit 'c4e3200578ad670bee9f5a88e90e7a77089d5df7' * commit 'c4e3200578ad670bee9f5a88e90e7a77089d5df7': fix bug in applying patches
| * | am 8cd9e4f3: fix bug in applying patchesDoug Zongker2010-08-131-1/+1
| |\| | | | | | | | | | | | | | | | | | | Merge commit '8cd9e4f3d4eba481b411482331293c8079ab24b2' into gingerbread * commit '8cd9e4f3d4eba481b411482331293c8079ab24b2': fix bug in applying patches
| | * fix bug in applying patchesDoug Zongker2010-08-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | When restarting a patch from crashing in the middle of a large file, we're not finding the correct patch to apply to the copy saved in cache. Change-Id: I41cb2b87d096bb7a28a10c4cf3902facd45d4c9d
* | | Working ASLR implementationHristo Bojinov2010-08-024-16/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | EMMC support in applypatchDoug Zongker2010-07-081-102/+175
|/ / | | | | | | | | | | | | | | Let applypatch read and write EMMC partitions as well as MTD ones. This enables incremental updates that include boot image changes, as well as OTA of new recovery partitions. Change-Id: I3766b9e77c639769ddf693b675da51d57f6e6b1d
* / generic_x86 supportBruce Beare2010-05-041-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
* refactor applypatch and friendsDoug Zongker2010-02-239-1256/+1185
| | | | | | | | | | | | | | | | | | | 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
* relocate applypatch; add type system and new functions to edifyDoug Zongker2010-02-1817-0/+3882
- 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