summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | Merge changes from topic "sideload_logging" into rvc-dev am: b0981c83d2 am: ↵Yifan Hong2020-04-093-20/+54
|\| | | | | | | | | | | | | | | | | | | | | | | 4f1e32dca2 Change-Id: I93460716f53d3f952e1bfb8973f618cba3991b16
| * | | Merge changes from topic "sideload_logging" into rvc-dev am: b0981c83d2Yifan Hong2020-04-083-20/+54
| |\| | | | | | | | | | | | | | Change-Id: Ib812102cf86f186182750be060e95b2aa72bba88
| | * | Merge changes from topic "sideload_logging" into rvc-devYifan Hong2020-04-085-75/+54
| | |\ \ | | | |/ | | |/| | | | | | | | | | | | | * changes: sideload: fix duplicated logging Revert "Setup android-base logging in sideload."
| | | * sideload: fix duplicated loggingYifan Hong2020-04-083-20/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also align logging behavior in sideload and regular Android. - Use logging_android.cc as well - Add a logging handler to libchrome's logging so that it won't explicitly write to stderr after calling __android_log_write. Test: sideload and manually inspect /tmp/recovery.log Fixes: 153355820 Change-Id: Iffaf245e8dec598ae8fd82052e2183a35afd604e (cherry picked from commit e757420cd6042fb68d9a3630a0d00e795c3f2ffe) Merged-In: Iffaf245e8dec598ae8fd82052e2183a35afd604e
* | | | Revert "Setup android-base logging in sideload." am: 38093bbb34 am: f5236616fdYifan Hong2020-04-094-55/+0
|\| | | | | | | | | | | | | | | Change-Id: I0344974d5a4b39d656ddc1aa34cd2f493e69b805
| * | | Revert "Setup android-base logging in sideload." am: 38093bbb34Yifan Hong2020-04-084-55/+0
| |\ \ \ | | | |/ | | |/| | | | | Change-Id: I0582dd54cb18f81c1a7b11a9883d5deea06c05a7
| | * | Revert "Setup android-base logging in sideload."Yifan Hong2020-04-084-55/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that SetupLogging sets up android-base logging too, there's no need to set it up again. Bug: 153355820 Test: enter recovery and manual inspect This reverts commit c73cb8ce94c14270c7e932bedb1889f5f150f038. Change-Id: I93f1319027e2f5b52bf683af1814d71cbb4b343f (cherry picked from commit 29ebd7a61c49b9f1c70d5bab99ea2fc3905c2e5d) Merged-In: I93f1319027e2f5b52bf683af1814d71cbb4b343f
* | | | Add DynamicPartitionControl::EraseSystemOtherAvbFooter am: cba9c46108 am: ↵Yifan Hong2020-04-086-10/+413
|\| | | | | | | | | | | | | | | | | | | | | | | f7339988c6 Change-Id: I94c71ebc6dfc5958aea871fc5f91e45baa45b6ab
| * | | Add DynamicPartitionControl::EraseSystemOtherAvbFooter am: cba9c46108Yifan Hong2020-04-086-10/+413
| |\ \ \ | | | |/ | | |/| | | | | Change-Id: Ie0af85ea0989ce2ac86564e9f0c30112c9605ba6
| | * | Add DynamicPartitionControl::EraseSystemOtherAvbFooterYifan Hong2020-04-086-10/+413
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Erase AVB footer of system other partition prior to any updates so that if an update overwrites it partially, and the device rolled back (or even before we finish writing the partition), and the device factory resets, mapping system_other as /postinstall won't trigger verity errors and reboots the device. Fixes: 152444348 Test: apply update, rollback, then FDR Test: apply update, then set sys.cppreopt=requested; observe that /postinstall cannot be mounted. Change-Id: I62e5bb8f4c31d9a1beff485c47fc4b07a3a5686b (cherry picked from commit 2969290920696611a67aed184baf71cac062b416) Merged-In: I62e5bb8f4c31d9a1beff485c47fc4b07a3a5686b
* | | Merge "Allow forward merge on powerwash." into rvc-dev am: cc8d4e8e69 am: ↵Yifan Hong2020-03-307-9/+10
|\| | | | | | | | | | | | | | | | | 3782bc452c Change-Id: I3f3d6effe558f4065e014b95d052e82b8001adfa
| * | Merge "Allow forward merge on powerwash." into rvc-dev am: cc8d4e8e69Yifan Hong2020-03-307-9/+10
| |\| | | | | | | | | | Change-Id: Icdf6d373616c964839366dff7f199985239357df
| | * Merge "Allow forward merge on powerwash." into rvc-devYifan Hong2020-03-307-9/+10
| | |\
| | | * Allow forward merge on powerwash.Yifan Hong2020-03-277-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If package schedules powerwash, snapshots on a Virtual A/B device will be deleted. Tell SnapshotManager to handle this case. Test: apply downgrade package Test: apply package with wipe Test: apply package then manually wipe Bug: 152094219 Change-Id: I8601b661924abcc82956788e2f33cdb70d71f778 (cherry picked from commit 7b3910a58bd0b8d9f0bd316fad5776ef0a8494ba) Merged-In: I8601b661924abcc82956788e2f33cdb70d71f778
* | | | Allow parsing boot image with header version 3 am: 9406118b6d am: 23d2dca172Tianjie2020-03-265-37/+160
|\| | | | | | | | | | | | | | | Change-Id: I42c47dd5f267b13d32b14efb186ecba63917e520
| * | | Allow parsing boot image with header version 3 am: 9406118b6dTianjie2020-03-265-37/+160
| |\| | | | | | | | | | | | | | Change-Id: I39ea8c1db0eb6ec92b6ea3dd6869aa248f1a5c63
| | * | Allow parsing boot image with header version 3Tianjie2020-03-265-37/+160
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The boot image header version no longer contains a page_size field; and it assumes the block size is always 4096. Also, the order of the header fields are different in version 3 from the previous versions. While the position of "header_version" is fixed at position #9 across all image headers. This cl handles header version 3 separately from the previous versions. Also create a stub implementation since the parsing of boot image is only used in android. Bug: 152371989 Test: unit tests, generate incremental OTA for the affected package, build with stub file Change-Id: Iea2145e0c234216f9ee42c571bd53dc93b4b9d2e (cherry picked from commit 37ae85653198123fc28a4ce1de25d2e56ee6a3a2)
* | | | sideload: mount snapshot partitions before merging am: 58397109ef am: 93b4dd66ddYifan Hong2020-03-231-0/+31
|\| | | | | | | | | | | | | | | Change-Id: Ib6a5b9ed559912e9f3e4f285c685c6352f734f74
| * | | sideload: mount snapshot partitions before merging am: 58397109efYifan Hong2020-03-231-0/+31
| |\| | | | | | | | | | | | | | Change-Id: Ifc84aa303346dca977c7e7f070af10fde0661c09
| | * | sideload: mount snapshot partitions before mergingYifan Hong2020-03-201-0/+31
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before CleanupPreviousUpdateAction starts merging, in recovery, create snapshot devices first. Test: sideload, adb reboot sideload, then sideload again Test: sideload, adb reboot sideload, rollback, then sideload again Test: sideload, adb reboot (and wait until state merging), adb sideload, then sideload again. Bug: 151983957 Change-Id: I2dc96faceb451dd956198e918ae530590eaee1e3 Merged-In: I2dc96faceb451dd956198e918ae530590eaee1e3
* | | ResetStatus deletes snapshots for VAB. am: 3a3d0c121f am: f4d63ac5f5Yifan Hong2020-03-187-6/+68
|\| | | | | | | | | | | Change-Id: I3546b6c9fd49621ec76cede66ae62e664fedf200
| * | ResetStatus deletes snapshots for VAB. am: 3a3d0c121fYifan Hong2020-03-187-6/+68
| |\| | | | | | | | | | Change-Id: Ia43d60440c7e867739aa2b9708ab9da0c1be38e3
| | * ResetStatus deletes snapshots for VAB.Yifan Hong2020-03-177-6/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When ResetStatus() is called, delete snapshots to free up space on VAB devices. On regular A/B, there is no need to cancel the update completely so that the update may be resumed next time. However, on VAB devices, a cancelled update should not occupy previously allocated space. Test: manually call update_engine_client --cancel when an update is in progress, then call update_engine_client --reset_status, then call snapshotctl dump to check that snapshots are deleted. Then, re-apply the update. Test: manually kill update_engine when an update is in progress, then call update_engine_client --reset_status, then call snapshotctl dump to check that snapshots are deleted. Then, re-apply the update. Test: manually apply an update until UPDATED_NEED_REBOOT, then call update_engine_client --reset_status, then call snapshotctl dump to check that snapshots are deleted. Then, re-apply the update. Test: manually apply an update until UPDATED_NEED_REBOOT, then kill update_engine, then call update_engine_client --reset_status, then call snapshotctl dump to check that snapshots are deleted. Then, re-apply the update. Bug: 147696014 Change-Id: Ic7049772091a34e0e666fd7ae361ef474d5a28aa Merged-In: Ic7049772091a34e0e666fd7ae361ef474d5a28aa
* | | Merge "Update android_logging for new liblog API changes" into rvc-dev am: ↵Tom Cherry2020-03-171-17/+14
|\| | | | | | | | | | | | | | | | | c0fa08aa7c am: f0e3c20da2 Change-Id: I8a7ddfa82022a3b8c5a2774971205b31a3c615d9
| * | Merge "Update android_logging for new liblog API changes" into rvc-dev am: ↵Tom Cherry2020-03-171-17/+14
| |\| | | | | | | | | | | | | | | | c0fa08aa7c Change-Id: I0085c6cc9983314ef8c1e2181de7f18115f495cd
| | * Merge "Update android_logging for new liblog API changes" into rvc-devTom Cherry2020-03-171-17/+14
| | |\
| | | * Update android_logging for new liblog API changesTom Cherry2020-03-161-17/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The API council has asked for changes to the new liblog API functions that update_engine is using, this change keeps update_engine in sync with liblog. Bug: 150898477 Test: build Change-Id: I4d8bf8df5ca29be06ba3d71947f1f71c376668b7
* | | | Fix merge in sideload am: 832b617956 am: e0f33a2f6bYifan Hong2020-03-173-2/+30
|\| | | | | | | | | | | | | | | Change-Id: I62263c05fcb285e311ca052c360e2785964eade0
| * | | Fix merge in sideload am: 832b617956Yifan Hong2020-03-173-2/+30
| |\| | | | | | | | | | | | | | Change-Id: Ide9d6916e63965c86cffc935d38720c53b65eedf
| | * | Fix merge in sideloadYifan Hong2020-03-173-2/+30
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For UpdateAttempterAndroid: - In sideload, ApplyPayload is immediately called after UpdateAttempterAndroid::Init(), and errors out because ScheduleCleanupPreviousUpdate starts the ActionProcessor. Do not call it in sideload since ApplyPayload schedules a CleanupPreviousUpdateAction too. - Also fixes TerminateUpdateAndNotify in sideload if it errors at CleanupPreviousUpdateAction. For CleanupPreviousUpdateAction: - Don't wait for boot_completed and slot verification in sideload. - Ensure metadata is mounted. Fixes: 151640692 Test: sideload Change-Id: Ib91b208d3f8d79285b9a87a44410a575bd2da42e Merged-In: Ib91b208d3f8d79285b9a87a44410a575bd2da42e
* | | Merge "ShouldSkipOperation -> OptimizeOperation" into rvc-dev am: 3f35a8f4e4 ↵Automerger Merge Worker2020-03-137-39/+103
|\| | | | | | | | | | | | | | | | | am: aa82a99fab Change-Id: I3004ea518ad103c4e1229f35778f1789ffdf3e34
| * | Merge "ShouldSkipOperation -> OptimizeOperation" into rvc-dev am: 3f35a8f4e4Automerger Merge Worker2020-03-137-39/+103
| |\| | | | | | | | | | Change-Id: I06aaf34fde728d6c7c972641cd493a8345483650
| | * Merge "ShouldSkipOperation -> OptimizeOperation" into rvc-devYifan Hong2020-03-127-39/+103
| | |\
| | | * ShouldSkipOperation -> OptimizeOperationYifan Hong2020-03-127-39/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For SOURCE_COPY operations like 563412 -> 123456 OptimizeOperation optimizes it to 5612 -> 1256 and skip writing blocks that does not need to be written for snapshot partitions. Bug: 148623880 Test: update_engine_unittests Test: apply incremental OTA Change-Id: Ifd2c3851f703f272a74c8f0e9a1c9a82dbcce3e3 Merged-In: Ifd2c3851f703f272a74c8f0e9a1c9a82dbcce3e3
* | | | Merge "Remove libutilscallstack dependency" into rvc-dev am: 5b7b3471cf am: ↵Automerger Merge Worker2020-03-101-4/+0
|\| | | | | | | | | | | | | | | | | | | | | | | 321203fe3c Change-Id: Ie20ea1756615bf0da3b049aa492020f589c51c51
| * | | Merge "Remove libutilscallstack dependency" into rvc-dev am: 5b7b3471cfAutomerger Merge Worker2020-03-101-4/+0
| |\| | | | | | | | | | | | | | Change-Id: I00c74f59319faf1ce80541b061925fbfae43434e
| | * | Merge "Remove libutilscallstack dependency" into rvc-devYifan Hong2020-03-101-4/+0
| | |\ \
| | | * | Remove libutilscallstack dependencyYifan Hong2020-03-061-4/+0
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert submission snapshotctl_callstack Reason for revert: Callstack should not be logged Reverted Changes: Ib80c74a9a:Temporarily add libutilscallstack dependency I2dfb6b7f1:libsnapshot::RemoveAllUpdateState log stack Test: pass Bug: 148818798 Change-Id: Ib224848ef13b73c9bfa9d812d4bfc0861cb93bc8 Merged-In: Ib224848ef13b73c9bfa9d812d4bfc0861cb93bc8
* | | | Also CancelUpdate when UpdateState::None. am: 48fe425f43 am: f1f102be8eAutomerger Merge Worker2020-03-091-1/+6
|\| | | | | | | | | | | | | | | Change-Id: I9a555de06737869c125909baf978ff7e5a1b0451
| * | | Also CancelUpdate when UpdateState::None. am: 48fe425f43Automerger Merge Worker2020-03-091-1/+6
| |\| | | | | | | | | | | | | | Change-Id: I6bc614b42c9f2db0448f4606b13cdaa712b41f16
| | * | Also CancelUpdate when UpdateState::None.Yifan Hong2020-03-061-1/+6
| | |/ | | | | | | | | | | | | | | | | | | Test: pass Bug: 147696014 Change-Id: Ie98207d897a47edbb52b51252fa71f8c7577508c Merged-In: Ie98207d897a47edbb52b51252fa71f8c7577508c
* | | Virtual A/B report metrics from update_engine. (2/2) am: 0c4ed2936e am: ↵Automerger Merge Worker2020-03-061-0/+4
|\| | | | | | | | | | | | | | | | | 9a96706ffb Change-Id: I7d9d9107da7b6faaa7ebf95e92d8c3bdd76c1a8f
| * | Virtual A/B report metrics from update_engine. (2/2) am: 0c4ed2936eAutomerger Merge Worker2020-03-061-0/+4
| |\| | | | | | | | | | Change-Id: Id0c50e25e1d5e2e918cc75b973dbd1e3147e5f07
| | * Virtual A/B report metrics from update_engine. (2/2)Yifan Hong2020-03-051-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Test: apply OTA and look at stats Bug: 138817833 Bug: 147696014 Change-Id: I67d9522e24eedb219cb6d39139b50af547440dc1 Merged-In: I67d9522e24eedb219cb6d39139b50af547440dc1
* | | Virtual A/B report metrics from update_engine. (1/2) am: 4ed0e69b20 am: ↵Automerger Merge Worker2020-03-063-2/+53
|\| | | | | | | | | | | | | | | | | f1ca5f13a4 Change-Id: I2316facde20eb25783541548f7aeeeb777876117
| * | Virtual A/B report metrics from update_engine. (1/2) am: 4ed0e69b20Automerger Merge Worker2020-03-063-2/+53
| |\| | | | | | | | | | Change-Id: I7957ef866172066c65c36b505206bf97b09473d2
| | * Virtual A/B report metrics from update_engine. (1/2)Yifan Hong2020-03-053-2/+53
| | | | | | | | | | | | | | | | | | | | | | | | Test: apply OTA and look at log Bug: 138817833 Bug: 147696014 Change-Id: I12331a272028e4a21a14604e1e7e48cb2c5ef55c Merged-In: I12331a272028e4a21a14604e1e7e48cb2c5ef55c
* | | Delete DynamicPartitionControl::CleanupSuccessfulUpdate am: 346adaa702 am: ↵Automerger Merge Worker2020-03-065-30/+0
|\| | | | | | | | | | | | | | | | | 16ff597546 Change-Id: I4f48e777e120fff0135a5534b5d5bcf94c1ae98b
| * | Delete DynamicPartitionControl::CleanupSuccessfulUpdate am: 346adaa702Automerger Merge Worker2020-03-065-30/+0
| |\| | | | | | | | | | Change-Id: I5af2d5336685b5afec6ffe6e58f95aac97feafaa
| | * Delete DynamicPartitionControl::CleanupSuccessfulUpdateYifan Hong2020-03-055-30/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | It is replaced with GetCleanupPreviousUpdateAction now. Test: builds Bug: 147696014 Change-Id: I8cb281bf811052d1dfea6c14c8685a90915cafa8 Merged-In: I8cb281bf811052d1dfea6c14c8685a90915cafa8