aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
9 daysdisable op count overhead for v2HEADmastermainDaniel Zheng
v2 does not use op buffer count, so this estimation overhead should only be updated for v3 Test: th Change-Id: Ib9ad838abd03839db390b0dbd126c1a477803eea
2024-04-12update_engine: never enable BCJ.Elliott Hughes
This was only enabled for 32-bit, has been demonstrated not to reduce OTA sizes, and we have a build in dogfood that can't decode BCJ output. Bug: http://b/333826436 Change-Id: I3cd81b65f943d4ab6c5d981dbe6e9d5bf336e612
2024-04-10prefs: return success if nothing to deleteDaniel Zheng
In the case that transaction submission is interrupted in between a delete an rename, upon next reboot, the prefs directory will not exist. Update_engine will attempt to swap prefs (e.g. rename prefs_tmp to prefs), but will fail here since prefs has already been deleted. We should return true if there is nothing to delete, and continue the rename Test: th Change-Id: I08725eb412f043187990c984caab049648c151ad
2024-04-08cow estimator: terminate on bad writeDaniel Zheng
If a write failure occurs, we should log an error and then terminate estimation. Otherwise we might have a false positive, and have a faulty OTA package generated Bug: 332640740 Test: th Change-Id: Ib72a7b66b7f0c25b89be64172ce68d1de077077e
2024-04-03cow estimation: use old partition sizeDaniel Zheng
Old partition size needs to be used for xor writes. Otherwise offset checks will fail resulting in a failed Write() Bug: 332640740 Test: th Change-Id: Ic8d5418dd0b3af652dd97521f3ea79d90c6ca706
2024-03-28update_engine: remove global cow versionDaniel Zheng
Test: th Change-Id: Ib4320f6fd4e643be828869347030f637bf340a06
2024-03-28update_engine: typoDaniel Zheng
Fix typo Test: th Change-Id: I8db583dc27a7206d2ef8dc3365bd085e7f27fc26
2024-03-28update_engine: fix cow estimation errorDaniel Zheng
Cow sizing was accidentally doubled Test: th Change-Id: Id4b8860375fc820647f741df558461eb529868cf
2024-03-26Make update_engine use /data/misc/update_engine/cache as tmpdirKelvin Zhang
update_engine doesn't have access to android's default tmpdir, /data/local/tmp . So use /data/misc/update_engine/cache/ Test: th Bug: 320443894 Change-Id: Ibbbe8019c276fe0fa3f9ea197815ed6daac912fc
2024-03-26update_engine: remove temporary estimationDaniel Zheng
Remove temporary estimation solution. With the updated estimation logic, we should be able to accurately estimate the cow size Bug: 322279333 Test: th Change-Id: I5c7da1fc1b8b47c940413ff9df1bc17f75c15cd4
2024-03-26v3 cow estimatorDaniel Zheng
Use extent writer as abstraction layer for both estimation and ota installation. Going over install operations will match the logic used in delta_performer to accurattely size the cow. Extent_writer abstraction takes care of chunking the data for us. To account for FEC data and hash tree writes, we want to add a little bit of overhead as AddRawBlocks calls are per verity hash tree level. In the case of small partitions, we want to set the overhead to a hard number rather than a percentile To ensure that our estimator is backwards compatible for downgrade OTA's, we should add labels after each operation is processed (although this isn't needed for sizing a v3 cow). Bug: 322279333 Test: OTA on cuttlefish Change-Id: I46f9da30641778095ee8543d7627320e309b9359
2024-03-18Add a version of update engine that does not send statsNikita Putikhin
update_engine_nostats has the same functionality as the update_engine but without interaction with statsd libraires and without build dependency on it. Test: Apply an upadte to an aosp cf vm - note that merge stats are reported in logcat. Replace update engine with the nostats service in the product packages and apply an update - note that stats reporting is skipped. Bug: 328227527 Change-Id: Iba87119838ecb9bdd8c94f8a913ec0d6e86a26d1
2024-03-13Fix puffin failure on duplicating deflatesKelvin Zhang
Test: th Bug: 322549011 Change-Id: I905ffbf5b3ff10f609be52a6acd8c59f16de5608
2024-03-12update_engine: update error logDaniel Zheng
Current error log will just print the error code number without actually telling us what the error is. Current wording also suggests the op is printed rather than the errorcode. Test: th Change-Id: Ia9ae6435df37d726f615cd5e63770522af88b546
2024-02-29update_engine: factor out source_copy method am: 5a6e32b3b8Daniel Zheng
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/2976857 Change-Id: I10daddd806fa9437ed1d53feb9feea8f98a073b0 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-29update_engine: factor out source_copy methodDaniel Zheng
Since estimator + vabc_partition_writer use the same logic for processing source copy ops, we can factor this common code out Bug: 322279333 Test: th Change-Id: I0ef7b8ad50c9b987bd13cf323e97f426d60f62b5
2024-02-28Fix warnings am: 04f10af8dbDaniel Zheng
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/2971281 Change-Id: Ide8729289c5afc66ce49aa1294663957552a9f9e Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-28Fix warningsDaniel Zheng
initialize variables + remove unused header Test: th Change-Id: Ic6366db7388f63c395d76f4a4c6a26dcd7e1ee70
2024-02-27Fix pylint warnings and use python3 in payload_info am: 178375a7d4Håkan Kvist
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/2975032 Change-Id: I40c30c96b5a5b241f8145f65ba858b143df521c1 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-27Fix pylint warnings and use python3 in payload_infoHåkan Kvist
Fix pylint warnings and silence false warnings. Correct import so that --signatures options works again. Set python interpreter to python3 as file is not compatible with python 2. Test: pylint --rcfile=../pylintrc payload_info.py Test: ./payload_info.py --list_ops --stats --signatures payload.bin Test: th Change-Id: Icece502b5cd76157b489523d20b1fa3358ef2468
2024-02-21update_engine: update help text am: 96eb042527Daniel Zheng
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/2959226 Change-Id: I51ab59ddcba44a9c1404b72dbd8ae3c6a3d4d967 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-21update_engine: update help textDaniel Zheng
Fixing typo enable -> disable Test: th Change-Id: I2964c8b81705165ec933804da9bd5ea7483a1bb0
2024-02-01update_engine: refactor manifest parsing am: 40354f8c56Daniel Zheng
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/2938200 Change-Id: If0bec7dc819975b56064fd4b3f979fda286679c3 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-01update_engine: refactor manifest parsingDaniel Zheng
DeltaPerformer write is quite long and complex. Let's move manifest parsing to it's own method for readability. Test: th Change-Id: Id8ce50c3bd62959b1b70a4f05eef4718f3d30867
2024-01-30update_engine: refactor into method am: 0dc25a6779Daniel Zheng
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/2932913 Change-Id: Id5c123cbc026ed57ebc81d4379b81f4782c1ede4 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-30update_engine: add error log am: 1e56e35301Daniel Zheng
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/2932912 Change-Id: Id87be22301e4933355bb1746f4d4a64a8f0e9b32 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-30update_engine: temporary estimation solution am: b06aeb7f14Daniel Zheng
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/2928753 Change-Id: I241441b3e90550be559e0845d76ba4a8cc6366dd Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-30update_engine: use compression_factor am: 4ff049167eDaniel Zheng
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/2901155 Change-Id: I1d7fb939a477144725456395ede51c032e219d95 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-30update_engine: refactor into methodDaniel Zheng
Move Operation processing into it's own function Test: th Change-Id: Ie0ed6ae584c0bc0ef82f4d2fd6b366ccd489b1c6
2024-01-30update_engine: add error logDaniel Zheng
In cases error pointer is unitialized, write method might just fail without a log. Adding this here in case for easier debugging Test: th Change-Id: Ide17326eea5ab5ec620e1246c95df80c7bc6808c
2024-01-30update_engine: temporary estimation solutionDaniel Zheng
Use 4096 compression factor for estimation to oversize the cow, until we have an accurate updated estimation algorithm working Bug: 2928753 Test: th Change-Id: Ifef9261959e31b2c1778a4cb0fd387d46ae01619
2024-01-30update_engine: use compression_factorDaniel Zheng
Use compression factor in update_engine. This change allows update_enginge to read from dynamic_partitions_info.txt the build prop that customizes the compression factor. Test: th Change-Id: I834917ddc44003b22623605f3c80d448a16b7ef3
2024-01-29update_engine: remove unused variable am: 17be0f93a8Daniel Zheng
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/2924565 Change-Id: I313d521b63bb6e17528422741ddfd095a75262c8 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-29update_engine: remove unused variableDaniel Zheng
Count is never used in this function. Test: th Change-Id: I4987f0268e560eb1a7f5fa9ba9446603dcbf7193
2024-01-29update_engine: log network ID am: 7ff60fd8dcDaniel Zheng
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/2932770 Change-Id: I750a22f7cd5e147295044c2156376928ebf0fcb9 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-29update_engine: log network IDDaniel Zheng
A recent bug was found where update_engine downloaded it's entire payload over the cellular network rather than wifi. This bug could've been more easily debugged with this given log, since the other network logs are not as persistent. Adding this here for easier debugging in the future Test: th Bug: 309751457 Change-Id: I1184814eebd0f88820aaf9d7948e7503efa1d903
2024-01-26update_engine: update op buf size with vabc_none am: 5f07b22b85Daniel Zheng
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/2907335 Change-Id: I9be835238761f960628fea4d24546bb63c9ba8aa Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-25update_engine: update op buf size with vabc_noneDaniel Zheng
If --vabc_none flag is passed, then op buffer size will need to be increased since compression is not used. Let's increase this to the upper limit of blocks per partition. Test: th Change-Id: I612caab96a08eb101bef7949b61150079b6afadc
2024-01-23Merge "Merge Android 24Q1 Release (ab/11220357)" into aosp-main-futureTreehugger Robot
2024-01-19Fix sideload OTA breakage am: 99cbbe7c4cKelvin Zhang
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/2918733 Change-Id: I4d6e8f86824aac93a176a4633edaa7b4b660de5c Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-18Fix sideload OTA breakageKelvin Zhang
MapAllPartitions doesn't work in recovery, which prevented slot switch. A logic error in code prevented this from being reporeted correctly, so device proceeded to reboot thinking that OTA is successful, even though slot isn't switched. Bug: 320206874 Test: sideload an recovery OTA Change-Id: Ief560ef8c3eddc1162d784f1bb03bf9c76c3d8eb
2024-01-17Merge Android 24Q1 Release (ab/11220357)Xin Li
Bug: 319669529 Merged-In: Ief2fe8856f452edf0315ecdd831b14685b3f5af5 Change-Id: Ic11a20507c643f627614f15165271a9bcf60b937
2024-01-16Improve ExtentRanges::AddExtent() runtime from O(n) to O(log n) am: e532af3f04Kelvin Zhang
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/2904937 Change-Id: Ief2fe8856f452edf0315ecdd831b14685b3f5af5 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-16Improve ExtentRanges::AddExtent() runtime from O(n) to O(log n)Kelvin Zhang
Old algorithm iterates over all extents to detect if there's any intersection, use binary search instead. Test: Add ~200K extents from an actual OTA, runtime improves from 13s to 0.4s Bug: 315215541 Change-Id: Ia99eda3a22e726a9c02bfe2a152dc0a5c16efcfc
2024-01-10Move FinishedSnapshotWrites call back to PostinstallRunnerAction am: 19acf4fe19Kelvin Zhang
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/2901827 Change-Id: I94ba3d781d00add55178581e85ec363147676ed5 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-10Move FinishedSnapshotWrites call back to PostinstallRunnerActionKelvin Zhang
After FinishedSnapshotWrites is called, if device reboots w/o slot switch, libsnapshot will discard all update state. This makes slot switching after reboot difficult. For better UX, move back. This reverts commit 5b00dc5386e67db5609e79f9e5c603d4ef1098a9. Reason for revert: b/318986391 Change-Id: If33d7661a907d779f1a860b439a707885a8882bf
2024-01-05Switch to update engine stable v2 libs am: 39fe98202cPawan Wagh
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/2895960 Change-Id: I323e76a0639229b67c8b9d821fdb5a43cb037110 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-05Adding @hide to UpdateEngineStable am: 4914ffd6b2Pawan Wagh
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/2893923 Change-Id: I803228bc74362b03612602be94a1d92066bf28ab Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-04Switch to update engine stable v2 libsPawan Wagh
Updating configs to use libupdate_engine_stable-V2. Test: m update_engine update_engine_stable_client Bug: 317914533 Change-Id: I39a1fbf395e5a3dd7be023c1908dcf4f01f873bf
2024-01-04Adding @hide to UpdateEngineStablePawan Wagh
Adding hide annotation to ue stable APIs and updating interface version. Freezing interface with version 2. Test: m libupdate_engine_stable-V2-java Bug: 317914533 Change-Id: Ice7d095b9a6903754ab76e1e097d941773119508