aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge "tests: Add ApplyPatchModesTest.PatchModeEmmcTargetWithBsdiffPatch test."HEADmasterTreehugger Robot2018-03-131-0/+51
|\
| * tests: Add ApplyPatchModesTest.PatchModeEmmcTargetWithBsdiffPatch test.Tao Bao2018-03-121-0/+51
| | | | | | | | | | | | | | | | | | | | /system/bin/applypatch on device is expected to work with bsdiff based recovery-from-boot patch automatically. Adding a test to ensure that's always the case. Bug: 72731506 Test: Run recovery_component_test on marlin. Change-Id: I56283cd3ce7cf0215cc3bb3619b206fa01d552c4
* | Merge "recovery: add libhidl-gen-utils depedency"Yifan Hong2018-03-122-0/+2
|\ \ | |/ |/|
| * recovery: add libhidl-gen-utils depedencyYifan Hong2018-03-072-0/+2
| | | | | | | | | | | | | | | | introduced as a depedency to libvintf. Test: builds Bug: 73556059 Change-Id: Ia51ba81ef462879481dcacb80d9ea9ea35e8b0bb
* | Merge "Set the update locations to default in CacheLocation's constructor"Tianjie Xu2018-03-083-13/+5
|\ \
| * | Set the update locations to default in CacheLocation's constructorTianjie Xu2018-03-083-13/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise the applypatch executable will fail to back up the source file to /cache when patching the recovery image. Bug: 74198354 Test: run applypatch from boot to recovery Change-Id: I6e5b9cd06d6ed0b26066b779a348437ecf984b92
* | | Merge "Export fuse_sideload.h for libfusesideload."android-o-mr1-iot-preview-7Treehugger Robot2018-03-075-13/+38
|\ \ \ | |_|/ |/| |
| * | Export fuse_sideload.h for libfusesideload.Tao Bao2018-03-075-13/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the module into a separate directory so that we can export only the expected header. With this change, minadbd no longer needs to include bootable/recovery. Test: mmma -j bootable/recovery Change-Id: I69b888ceb160a33a67d79c5bda208dc17ad6ed86
* | | Merge "Drop the no-op Android.bp."Treehugger Robot2018-03-071-8/+0
|\ \ \ | |_|/ |/| |
| * | Drop the no-op Android.bp.Tao Bao2018-03-071-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "subdirs=" statement no longer has any effect (with the CL in [1] that's merged last November). All the Android.bp's will be picked up automatically. [1] commit 4f21237342e715cbbac6e409cd67e86a304483c4 in https://android-review.googlesource.com/c/platform/build/blueprint/+/530115. Test: mmma -j bootable/recovery Change-Id: Idd39af1fff907e8c1886f91eea0dd4a9e38a4079
* | | Merge "minadbd: Move to Soong."Treehugger Robot2018-03-073-56/+78
|\ \ \ | |/ / |/| / | |/
| * minadbd: Move to Soong.Tao Bao2018-03-063-56/+78
|/ | | | | Test: mmma -j bootable/recovery Change-Id: Ic4cd676a842f0e8c4735cc6731fcbf13b844510c
* Merge "Add a singleton CacheLocation to replace the hard coded locations"android-p-preview-1Tianjie Xu2018-03-0111-27/+139
|\
| * Add a singleton CacheLocation to replace the hard coded locationsTianjie Xu2018-02-2811-27/+139
|/ | | | | | | | | | | | This class allows us to set the following locations dynamically: cache_temp_source, last_command_file, stash_directory_base. In the updater's main function, we reset the values of these variables to their default locations in /cache; while we can set them to temp files in unit tests or host simulation. Test: unit tests pass Change-Id: I528652650caa41373617ab055d41b1f1a4ec0f87
* Merge "Fix the behavior of undefined commands in BlockImageVerify"Tianjie Xu2018-02-281-2/+4
|\
| * Fix the behavior of undefined commands in BlockImageVerifyTianjie Xu2018-02-281-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In BlockImageVerify some commands are undefined, e.g. "erase", "new", "zero". And we should not error out if the corresponding function pointer of these commands is null; otherwise we will fail the verification. The old code is: if (cmd->f != nullptr && cmd->f(params) == -1) return false; In the last_command_file change the logic was wrongly modified to if (cmd->f == nullptr) return false; ... if (cmd->f(params) == -1) return false; Test: sideload an incremental OTA twice on bullhead Change-Id: I2561c365badb850da0e416629ccd61f0df7da5d7
* | Merge "Remove the assumption of target chunk size in imgdiff"Treehugger Robot2018-02-233-20/+131
|\ \
| * | Remove the assumption of target chunk size in imgdiffTianjie Xu2018-02-233-20/+131
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the split mode of imgdiff, we used to assume that the size of a split target chunk is always greater than the blocksize i.e. 4096. This may lead to the following assertion failure: I0221 04:57:33.451323 818464 common.py:205 imgdiff F 02-21 04:57:33 821203 821203 imgdiff.cpp:999] Check failed: tgt_size >= BLOCK_SIZE (tgt_size=476, BLOCK_SIZE=4096) This CL removes the assumption and handles the edge cases. Test: generate and verify the incremental update for TFs in the bug; unit test passes Bug: 73757557 Bug: 73711365 Change-Id: Iadbb4ee658995f5856cd488f3793980881a59620
* | Merge "Replace vfork() with fork()."Treehugger Robot2018-02-231-1/+1
|\ \ | |/ |/|
| * Replace vfork() with fork().George Burgess IV2018-02-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The static analyzer complained about the function calls we were doing here to vector::data() and vector::operator[]: bootable/recovery/roots.cpp:193:11: warning: This function call is prohibited after a successful vfork Since it's not clear that vfork() is needed here, just use fork() instead. Bug: None Test: Reran the static analyzer with only this patch applied. Bug disappeared Change-Id: I580f8243a21899f1e1678c8aee6948dfa7f69a1d
* | Merge "Set LOCAL_SDK_VERSION where possible."hansson2018-02-211-0/+1
|\ \
| * | Set LOCAL_SDK_VERSION where possible.Anton Hansson2018-02-211-0/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change sets LOCAL_SDK_VERSION for all packages where this is possible without breaking the build, and LOCAL_PRIVATE_PLATFORM_APIS := true otherwise. Setting one of these two will be made required soon, and this is a change in preparation for that. Not setting LOCAL_SDK_VERSION makes the app implicitly depend on the bootclasspath, which is often not required. This change effectively makes depending on private apis opt-in rather than opt-out. Test: make relevant packages Bug: 73535841 Change-Id: I82fee834c5d92e699e9571933faded11c6d4596e
* | Merge "Disable building libapplypatch on mac"Treehugger Robot2018-02-182-0/+12
|\ \ | |/ |/|
| * Disable building libapplypatch on macTianjie Xu2018-02-182-0/+12
|/ | | | | | | | | | The sdk_mac on build server fails with the error: bootable/recovery/applypatch/freecache.cpp:23:10: fatal error: 'sys/statfs.h' file not found So we will disable libapplypatch on mac. Test: the library still builds on linux; and check the other host targets in the same cl. Change-Id: Ie4a30708726e51c810f7ad7f1085d38154076cca
* Merge "Skip the cache size check on host"Tianjie Xu2018-02-164-3/+12
|\
| * Skip the cache size check on hostTianjie Xu2018-02-124-3/+12
| | | | | | | | | | | | | | | | | | | | | | When running the update simulation, we choose to skip the cache size check for now due to the lack of "/cache" on host. And in later cls we can implement a cache size estimator to make the check more constrained. Also build the host version of support libraries. Test: unit test pass Change-Id: I3ed93c857fd02f7b62f5baba9130f75c3236e717
* | Merge "recovery: Porting screensave mode for new platform."Tao Bao2018-02-152-6/+19
|\ \
| * | recovery: Porting screensave mode for new platform.katao2017-12-142-6/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On new board platform the brightness path of sys/class/leds/lcd-backlight is deprecated,instead of /sys/class/backlight/panel0-backlight/. Test: reboot into recovery on sdm845. Change-Id: Idf0027ab888f9f982a8eef7de230ce3635e7c300 Signed-off-by: katao <katao@xiaomi.com>
* | | Merge "Reorder the functions in updater/install.cpp"Tianjie Xu2018-02-121-239/+244
|\ \ \ | | |/ | |/|
| * | Reorder the functions in updater/install.cppTianjie Xu2018-02-121-239/+244
|/ / | | | | | | | | | | | | | | There is no logical change to the file; merely the function definition reorder and some comestic change to make the future review easier. Test: mma Change-Id: I7ffe952f8c78e840f10aa6bfad0c4b5a58e29896
* | Merge "Log the last command to cache"Tianjie Xu2018-02-083-9/+392
|\ \
| * | Log the last command to cacheTianjie Xu2018-02-063-9/+392
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When performing an update, save the index and cmdline of the current command into the last command file if this command writes to the stash either explicitly of implicitly. This mitigates the overhead to update the last command file for every command. I ran a simple test on angler and the time to update 1000 times is ~2.3 seconds. Upon resuming an update, read the saved index first; then 1. In verification mode, check if all commands before the saved index have already produced the expected target blocks. If not, delete the last command file so that we will later resume the update from the start of the transfer list. 2. In update mode, skip all commands before the saved index. Therefore, we can avoid deleting stashes with duplicate id unintentionally; and also speed up the update. If an update succeeds or is unresumable, delete the last command file. Bug: 69858743 Test: Unittest passed, apply a failed update with invalid cmd on angler and check the last_command content, apply a failed update with invalid source hash and last_command is deleted. Change-Id: Ib60ba1e3c6d111d9f33097759b17dbcef97a37bf
* | | Merge "Document instructions for using adb under recovery."Treehugger Robot2018-02-081-0/+91
|\ \ \ | |/ / |/| |
| * | Document instructions for using adb under recovery.Tao Bao2018-02-071-0/+91
|/ / | | | | | | | | | | Fixes: 72740736 Test: N/A Change-Id: Ifc96ed785fd80501bc6c276cb649c8cc1f05be0e
* | Merge "Avoid overwrite of the error message in AbortFn"Tianjie Xu2018-01-303-23/+26
|\ \
| * | Avoid overwrite of the error message in AbortFnTianjie Xu2018-01-293-23/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The AbortFn() used to overwrite the error message, hiding the real failure reported in ErrorAbort(). And we will miss the failure in the script patterns like 'blockimageupdate() || abort()' We will ensure there's one line break at the end of ErrorAbort's error message; and append to the existing error message when calling abort(). Test: Message from ErrorAbort shows up in the log Change-Id: I3aebd06629c5129330250c7fe5e8cdead2ae85bc
* | | Merge "Add update_channel field to bootloader_message_ab."Sen Jiang2018-01-251-1/+5
|\ \ \ | |/ / |/| |
| * | Add update_channel field to bootloader_message_ab.Sen Jiang2018-01-221-1/+5
|/ / | | | | | | | | | | | | | | | | | | | | The update_channel field is used to store the Omaha update channel if update_engine is compiled with Omaha support. We need it to be in misc to persist through factory reset. Bug: 72332119 Test: mma Change-Id: Ied4fecc6e78cc69d33a36ba4d101d675100f9d82
* | Merge "StartsWith allows a std::string prefix now."android-wear-8.0.0_r1Treehugger Robot2017-12-202-2/+2
|\ \ | |/ |/|
| * StartsWith allows a std::string prefix now.Elliott Hughes2017-12-202-2/+2
|/ | | | | | Bug: N/A Test: builds Change-Id: I5183ec8133f5dc9a81a438223c6d3d2ea11ef0ec
* Merge "Let update_verifier work on non-AB update devices"Isaac Chen2017-12-131-0/+9
|\
| * Let update_verifier work on non-AB update devicesIsaac Chen2017-12-131-0/+9
|/ | | | | | | | | | | | | Make update_verifier check if it runs on A/B update devices at the beginning, and quit immediately if it doesn't, instead of re-boot. Bug: 70541023 Test: On aosp/master: $ lunch aosp_x86_64-userdebug; m -j # boot to home screen # On goog/master: $ lunch aosp_walleye-userdebug; m -j # boot to home screen Change-Id: Ib71a3a3b272cfa5dd0b479eaa067eedaec8fde7d
* Merge "applypatch: Remove the 'st' field from FileContents."Tao Bao2017-12-092-17/+3
|\
| * applypatch: Remove the 'st' field from FileContents.Tao Bao2017-12-072-17/+3
| | | | | | | | | | | | | | | | It used to keep track of the stat(2) info (e.g. st_mode/st_gid/st_uid) while patching a file in file-based OTA. Test: Build and use the new updater to apply an update on bullhead. Change-Id: Ibf8f0f4b14298a9489bf24a2678bb279c5d9c8f3
* | Merge "add sload.f2fs for recovery format"Jaegeuk Kim2017-12-073-7/+23
|\ \ | |/ |/|
| * add sload.f2fs for recovery formatJaegeuk Kim2017-12-043-7/+23
| | | | | | | | | | Change-Id: Iddfe54b2b36f2d531925cbe61c98dbfb4903c0d1 Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
* | Merge "Add a /bin symlink for consistency."Elliott Hughes2017-12-071-0/+1
|\ \
| * | Add a /bin symlink for consistency.Elliott Hughes2017-12-061-0/+1
| | | | | | | | | | | | | | | | | | Bug: http://b/63142920 Test: builds Change-Id: I1f96935daca4d79f753e172067e07f8e27ea819e
* | | Merge "Detect interrupted update due to power off"Tianjie Xu2017-11-302-269/+302
|\ \ \ | | |/ | |/| | | | | | | | | | am: d8fadfb606 Change-Id: I2295430f7153711fb4e23d3e6f7af7c65efb7c54
| * | Merge "Detect interrupted update due to power off"Treehugger Robot2017-11-302-269/+302
| |\ \ | | |/ | |/|