aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-04-08Add vabc boot time and COW size metrics. am: b7e6ce5f6a am: e4e1df71e1temp_ab_7272582David Anderson
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1641341 Change-Id: I1a26ce9896a0bef3942cd29bb81b49827500140e
2021-04-08Add vabc boot time and COW size metrics. am: b7e6ce5f6aDavid Anderson
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1641341 Change-Id: I47d12e6a76be3acc1d161e26b373186b12525709
2021-04-08Add vabc boot time and COW size metrics.David Anderson
Bug: 180535575 Test: statsd_testdrive Change-Id: I8b40d069ff8c271ea40b3475003058ac6a940f76
2021-04-08Add unittest for CleanupPreviousUpdateAction am: b4b95c2834 am: b92d11ad26Kelvin Zhang
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1664859 Change-Id: I6aeb7f6e475a2c427286162c51434a5bbb7f15ac
2021-04-08Add unittest for CleanupPreviousUpdateAction am: b4b95c2834Kelvin Zhang
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1664859 Change-Id: I9134812e85f84e61970f396baef11c508049f311
2021-04-06[automerger skipped] Fix a potential wild pointer error when ↵Kelvin Zhang
markSlotSuccessful comes late am: 28d49bc315 -s ours am skip reason: skip tag Change-Id I12c01c5f062ec4b41718f2cada817f6557eb2b0e with SHA-1 65e8b6c195 is already in history Original change: https://googleplex-android-review.googlesource.com/c/platform/system/update_engine/+/14078192 Change-Id: I5e646b892f902d76d8569f3f7c90a35655f5ce09
2021-04-06Add unittest for CleanupPreviousUpdateActionKelvin Zhang
We had a severe bug in CleanupPreviousUpdateAction, undetected for a while. Added unittest to cover the bug so we don't regress. Bug: 169436297 Bug: 178637306 Test: th Change-Id: I40fc97a5c771ec001896ecd8f6d46b551cc7724c
2021-04-02Fix a potential wild pointer error when markSlotSuccessful comes lateKelvin Zhang
Bug: 178637306 Bug: 169436297 Test: make boot control's IsSlotMarkedSuccessful always return false, launch update_engine Change-Id: I12c01c5f062ec4b41718f2cada817f6557eb2b0e Merged-In: I12c01c5f062ec4b41718f2cada817f6557eb2b0e
2021-04-02Fix a potential wild pointer error when markSlotSuccessful comes late am: ↵Kelvin Zhang
65e8b6c195 am: f22fa83e8e Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1663460 Change-Id: I3f166238a920086316de1b5ab4eac7775ba87b41
2021-04-02Fix a potential wild pointer error when markSlotSuccessful comes late am: ↵Kelvin Zhang
65e8b6c195 Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1663460 Change-Id: I0b546ac44a9a22db414367cc9f066d878302e10a
2021-04-02Fix a potential wild pointer error when markSlotSuccessful comes lateKelvin Zhang
Bug: 178637306 Bug: 169436297 Test: make boot control's IsSlotMarkedSuccessful always return false, launch update_engine Change-Id: I12c01c5f062ec4b41718f2cada817f6557eb2b0e
2021-04-01Add no postinstall option am: bec0f07516 am: 33c2435597Kelvin Zhang
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1660742 Change-Id: I032c705591178dd7a82cfc6ab53bcec98fe7c4b5
2021-04-01Add no postinstall option am: bec0f07516Kelvin Zhang
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1660742 Change-Id: Idacf165f6a5cb9c99aa19f04255f96b772fe63d2
2021-04-01Add no postinstall optionKelvin Zhang
Test: th Change-Id: I63904fae1a6900a6fd7a079667332102f2bede55
2021-03-31Report metrics on whether verity is used am: 9a5e3683a4 am: 0cf3b32669Kelvin Zhang
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1656387 Change-Id: Ie9f7b4acbad32cfab8787e99fc9ef073adda82f6
2021-03-31Add a unittest for read-after-write pattern in cow writer am: f55eab832f am: ↵Kelvin Zhang
b2b532873d Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1629699 Change-Id: I53d9a5df95057d0f9651efe8ea27ebb91f569d95
2021-03-31Report metrics on whether verity is used am: 9a5e3683a4Kelvin Zhang
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1656387 Change-Id: I5a8cd28c972ccacafbfb9f32e7943877836aa7df
2021-03-31Add a unittest for read-after-write pattern in cow writer am: f55eab832fKelvin Zhang
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1629699 Change-Id: I69ad6dd99cb7745a36251594735eb59b18e6372f
2021-03-31Report metrics on whether verity is usedKelvin Zhang
Test: th Change-Id: Ide00028036b8b382a233b52716795a5c5c8da4e6
2021-03-31Add a unittest for read-after-write pattern in cow writerKelvin Zhang
Test: th Change-Id: I4e461b03d4008d484eafe601d3de2f4b06bf585d
2021-03-30Allow /postinstall files to have custom contexts am: 331e3bd90c am: b165e446cbAlex Light
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1643782 Change-Id: Ic3dd2a7b6150119d1523c19474d0731d58f68565
2021-03-30Allow /postinstall files to have custom contexts am: 331e3bd90cAlex Light
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1643782 Change-Id: I136876a402c296207865980706a7ae6ea34e7bcf
2021-03-30Allow /postinstall files to have custom contextsAlex Light
We were mounting /postinstall with a 'context=...' option. This forces all files within /postinstall to have a single selinux context, limiting the possible granularity of our policies. Here we change it to simply default to the 'postinstall_file' context for the 'system' partition but allow individual files to have their own custom contexts defined by /system/sepolicy. Other partitions retain the single 'postinstall_file' context. The sample_images were updated to manually add a selinux label for testing FS contexts. Test: Manual OTA of blueline Test: atest update_engine_unittests Bug: 181182967 Change-Id: I0b8c2b2228fa08afecb64da9c276737eb9ae3631 Merged-In: I0b8c2b2228fa08afecb64da9c276737eb9ae3631
2021-03-28Support verity writes in VABC am: 4f28a6c152 am: d4d7b7cc11Kelvin Zhang
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1612456 Change-Id: I70ebb1004ed1be1f8c07c63d3090720104b72983
2021-03-28Support verity writes in VABC am: 4f28a6c152Kelvin Zhang
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1612456 Change-Id: I88da9dcdafcbf6e001d59a2628cd31279b83aeaf
2021-03-28Support verity writes in VABCKelvin Zhang
Test: generate an OTA with verity enabled, install it Bug: 173432386 Change-Id: I14cccb1bb339c9824a95b8e42ac5144cb8b75c3f
2021-03-27Check the super partiton size in VAB case am: 9f4dc7f49d am: f08a8e72f8Tianjie
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1638182 Change-Id: Ic97cb8fca898485a6ffbd1411db7685ca8fb75a4
2021-03-27Check the super partiton size in VAB case am: 9f4dc7f49dTianjie
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1638182 Change-Id: I8ff779815e569c2847c238c603858addd06a50f8
2021-03-27Check the super partiton size in VAB caseTianjie
When the snapshot is used, we should check that the maximum size of all dynamic partition groups doesn't exceed the super partition size. Bug: 182431975 Test: primary payload fails as expected Pixel21 Change-Id: I5df8976e6b7e011284b29fd554dda80e31305698
2021-03-24Make dynamic partition control android return a writable fd am: 21a4991833 ↵Kelvin Zhang
am: 36e848e8bc Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1634739 Change-Id: I30543ef1917b4d5fdb29f63f4181b6d480c463d9
2021-03-24Add CowWriterFileDescriptor am: 569c97eebd am: db302a06e6Kelvin Zhang
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1474356 Change-Id: Ia0489857534b13de934615187a9ba59abbb8a518
2021-03-24Make dynamic partition control android return a writable fd am: 21a4991833Kelvin Zhang
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1634739 Change-Id: Iba076f40d2f938227844f17d96ec078be7c854ab
2021-03-24Add CowWriterFileDescriptor am: 569c97eebdKelvin Zhang
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1474356 Change-Id: I5a6ceb2a0adbdc4705dbfd7d7135e907cec33009
2021-03-24Make dynamic partition control android return a writable fdKelvin Zhang
We can return a FileDescriptor object, which encapsulates logic needed to write to a COW. This way, filesystem verfication action can use the turend value directly for computing verity and hash the partition. Test: th Change-Id: Iafe9699ef0cc15961641fc94f8ad2820230a56e1
2021-03-24Add CowWriterFileDescriptorKelvin Zhang
Add a wrapper to use CowWriter as a file descriptor, this will be used by FileSystemVerification stage when writing FEC Test: treehugger Bug: 173432386 Change-Id: Iea42ca1081cd6836c7700db172d6987f770d52c0
2021-03-22Add checks before writing hashtree/verity am: eeec3819f0 am: d727ae04deKelvin Zhang
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1640819 Change-Id: I2e3dfd8726f3c47d53232c61d4c3de061686fed8
2021-03-22Unmap all partitions after postinstall finishes am: f7ef12a569 am: 786bb39d83Kelvin Zhang
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1648727 Change-Id: I154b305541ff3f1c99e9dd4cf4d1dad3757c4648
2021-03-22Add checks before writing hashtree/verity am: eeec3819f0Kelvin Zhang
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1640819 Change-Id: I74cbb395d725d5931344b7a2bf2c10e7113d3152
2021-03-22Unmap all partitions after postinstall finishes am: f7ef12a569Kelvin Zhang
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1648727 Change-Id: I76617236b8799c88dd83cb503177e91c9005f8ab
2021-03-22Add checks before writing hashtree/verityKelvin Zhang
Verity that we read everything in hashtree_data_extent before writing hash tree. Bug: 173432386 Test: th Change-Id: I00ab8053de71b13991adaa243b6cb6c7efd6e60f
2021-03-22Unmap all partitions after postinstall finishesKelvin Zhang
If we don't unmap partitions, snapuserd will keep running in the background and do nothing. Unmap partitions so that memory associated with daemon can be freed. Test: th, apply an OTA, verify that _b partitions in /dev/block/mapper are gone Change-Id: I4a75f4abe3e69f9ad2a67a78472b61cfbd77b0eb Change-Id: Icacf1699a32bf045c2b832f7c1f021d90805d676
2021-03-18Refactor verity reads/writes to a separate fucntion am: 7f92567d66 am: ↵Kelvin Zhang
607f9fb439 Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1636220 Change-Id: I741fb6907f51d0903b43d7eeb9a45d90fcd7548b
2021-03-18Refactor verity reads/writes to a separate fucntion am: 7f92567d66Kelvin Zhang
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1636220 Change-Id: I1c6886dfd6ea9fbc86655f1756ea1b28f0bf0e86
2021-03-17Refactor verity reads/writes to a separate fucntionKelvin Zhang
Test: th & serve an OTA with veity enabled, vabc disabled Change-Id: Ib1d5549ac615504a47c96a12b046975cfff01886
2021-03-17Make update_engine reserve space for decompression via apexd am: b0ab865e4a ↵Mohammad Samiul Islam
am: f057877b99 Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1614853 Change-Id: I927d67667d53f9c45cc92a2e083de4ab774ed6d5
2021-03-17Make update_engine reserve space for decompression via apexd am: b0ab865e4aMohammad Samiul Islam
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1614853 Change-Id: Iefa9b70759279eab8bb6573df205840c3bec520d
2021-03-17Make update_engine reserve space for decompression via apexdMohammad Samiul Islam
Bug: 172911822 Test: atest ApexHandlerAndroidTest (checked that file was created) Change-Id: I8024695ebba1a9c1796c05b27a0eec3da3b3d1bc
2021-03-17Pass in source slot to ctor of dynamic control am: ebd115e8bd am: f260ea9b88Kelvin Zhang
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1622020 Change-Id: Idcd1934b22336b7afae6a059373bdb0b01c61ba8
2021-03-16Pass in source slot to ctor of dynamic control am: ebd115e8bdKelvin Zhang
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1622020 Change-Id: I542615fc8da27cfb2ce1ac671c193f10096b2da7
2021-03-16Pass in source slot to ctor of dynamic controlKelvin Zhang
When DynamicPartitionControlAndroid is constructed, it initializes both source and target slot to -1. These values get updated during PreparePartitionsForUpdate call. And we only PreparePartitionsForUpdate() when applying an OTA or applocating space for an OTA(not when verifying OTA metadata). Which means if VerifyPayloadApplicable() is called before any call two other APIs, we could be using an "Uninitialiazed" dynamic partition control. To mitigate this problem, we pass in source_slot at ctor of DynamicPartitionControl, also make IsDynamicPartition() api take in a slot number to avoid reading uninitialized member fields. Bug: 181643302 Test: apply an OTA, abort, restart update_engine, verify a payload Change-Id: I9a8a0fe8a9aca48e91241e15bdec33a1c1228553