summaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)Author
2021-04-22Add OTA stress test script am: f708ddadd2 am: 41ce01b739 am: 5cc792b542Kelvin Zhang
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1674627 Change-Id: I04baf570f7be02ff051f66b5acfec48381698c5d
2021-04-22Add OTA stress test scriptKelvin Zhang
Test: python3 ota_stress_test.py ota.zip Change-Id: I313768945e2c2f98c950f283c7c860d334b99f08
2021-04-20Update shebang line for update_device.py. am: 0c71550bf3 am: e45fa4876e am: ↵Yifan Hong
2729e3989e Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1679889 Change-Id: I712e68af4c8b380b25ead3fdd5d6b3f07e6e6611
2021-04-19Update shebang line for update_device.py.Yifan Hong
It is no longer python2 compatible. Test: pass Change-Id: Ibb0b7aa33ba1be3e2f40893da70f81c858479f7e
2021-04-15Rename no-care-map flag am: ffd2144ccd am: 869754e334 am: bf99ac176cKelvin Zhang
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1675666 Change-Id: I43477d1b625fedfdd63f8be37a0b8b8875200141
2021-04-15Add 5s timeout to cleanup commands am: 3a18895c6f am: 9816401d02 am: 25b6a448a3Kelvin Zhang
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1674626 Change-Id: Ie259375b4890fc658ad95b9f4f42fa58c20369a8
2021-04-15Rename no-care-map flagKelvin Zhang
Since other flags use - instead of _, keep no-care-map flag consistent Test: th Change-Id: Ibf981ecbf7b3804e20c52ef1de8f55732cbe6295
2021-04-15Add 5s timeout to cleanup commandsKelvin Zhang
Sometimes shutdown takes a while due to adb issues, gracefully terminate with a timeout. This will throw an exception if timeout occured, telling the developer that something went wrong. Test: python3 update_device.py ota.zip Change-Id: I44edc6a291fc682b9439ab97f2880d47dc4e457b
2021-04-01Add no postinstall option am: bec0f07516 am: 33c2435597 am: df3a22e54bKelvin Zhang
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1660742 Change-Id: I80bfc439cc92f13c771ec651748646c5eaa7961d
2021-04-01Add no postinstall optionKelvin Zhang
Test: th Change-Id: I63904fae1a6900a6fd7a079667332102f2bede55
2021-03-11Improve load speed for python payload script am: 797756460a am: 104b869a62 ↵Kelvin Zhang
am: 2417f0eba7 Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1596615 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I4c07d8f1595c8813a5e98eaaf0cdb417e12df374
2021-03-11Improve load speed for python payload scriptKelvin Zhang
When using update_payload module to read a full OTA, it will attempt to load the entire payload into memory first, which is slow. Use mmap instead, as parsing manifest doesn't require the entire payload to be in memory, only the first couple of MB. In case of opening a zipfile, use zfp.open(), which returns a streaming interface. Test: import update_payload, load an OTA Change-Id: I3f7c7515dbf5576ccfda8d844fe22e9be34fdaed
2021-03-10Allow disable_vabc flag in full OTA am: 413982e445 am: 8b76e5667b am: 5eb828f562Kelvin Zhang
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1613459 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ib02b1bf358bebe2ea05543f264551e9f4c7a600b
2021-03-10Allow disable_vabc flag in full OTAKelvin Zhang
Previously, brillo_update_payload only honors --disable_vabc flag for incremental OTA. Respect this flag for full OTA as well. Test: Generate a full OTA with --disable_vabc Change-Id: Ic18dfdffd3e43ab139d1ea0704679ea38dd082c2
2021-03-09Add a python wrapper for cow conversion tool am: c612f2025a am: 0741995bb5 ↵Kelvin Zhang
am: 301af57c33 Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1610434 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I5284897ee15cb4f17949be8422630f66813f13e1
2021-03-08Add a python wrapper for cow conversion toolKelvin Zhang
How to use this tool: 1. `mm -j cow_converter` 2. `python3 scripts/cow_converter.py your_ota.zip your_target_file.zip output_dir` Test: python3 scripts/cow_converter.py ~/aosp/bramble_ota.zip ~/aosp/bramble-target_files-7153567.zip cow Change-Id: I0ed19a9914f92d0b054faa7d19aa8ea9ae97ddd3
2021-03-08Add a --verify_only flag, which verifies the payload am: 63b39110c1 am: ↵Kelvin Zhang
594ea45652 am: 711e1ef7bf Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1621760 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I6fb3aa2e8a1c3c6b9557fe5de9c7a1f1d63188f1
2021-03-08Add a --verify_only flag, which verifies the payloadKelvin Zhang
Test: update_device.py --verify_only some_ota.zip Change-Id: I4d07dfe138064fd8747699a92b98a17090533179
2021-03-05Fix python3 compatibility issues am: 472d561934 am: 8e56128a1b am: 2781e38e69Kelvin Zhang
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1621759 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Idb3fb0068e141da2d702d32f7b93e9bb8524748d
2021-03-05Fix python3 compatibility issuesKelvin Zhang
Python3 expects write() to accept bytes or str, depending on file type(w or wb). Since zipfile returns bytes, we must open output file with "wb", which is the default. Test: python3 update_device.py some_ota.zip Change-Id: I9f163341921d7681988ee1eb01e98f0ecd5e98c9
2021-03-04Push care_map.pb to device when serving an OTA am: 5bd4622bd6 am: c2e58cb33c ↵Kelvin Zhang
am: 0e12af1ec6 Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1613279 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I1d502ec68d0f08988cf10a8b26f0a9cb8886601d
2021-03-04Push care_map.pb to device when serving an OTAKelvin Zhang
When rebooting, device will skip update_verifier if care_map.pb isn't found. For better testing, push care_map.pb to device by default Test: python2 update_device.py some_ota.zip Bug: 181499957 Change-Id: Ic47735be7dd7b1c1541613a88cab69ef57394b5a
2021-02-23Add vabc_compression parameter to update_metadata am: 4ca06c192d am: ↵Kelvin Zhang
b068c1391b am: dc51148519 Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1581804 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I994e651e85c80ed426ce55d2f0ebf71adae5b85b
2021-02-22Add vabc_compression parameter to update_metadataKelvin Zhang
Test: treehugger Change-Id: Icc65db9a7c4fbdf22376f9900016ae1b7058c611
2021-02-22Add option to invoke AllocateSpaceForPayload from update_device.py am: ↵Kelvin Zhang
51aad993dd am: e11e1c77c6 am: bf78189670 Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1596612 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Iddb9fc3243c6bc69e43a7c32403a0f4fade88b00
2021-02-20Add option to invoke AllocateSpaceForPayload from update_device.pyKelvin Zhang
Now AllocateSpaceForPayload() API does non-trivial work, it would be nice if we have an easy way to invoke it from CLI for testing purposes. Test: update_device.py --allocate ota.zip Change-Id: I497fea33e8935a5481d7d831d35dac881e42262e
2021-02-11Reland: Pass apex_info.pb file to delta_generator am: deb34459c3 am: ↵Kelvin Zhang
4ea1673ece am: 2fe04512c3 Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1567661 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I9b5205d9a3be96073e307acc567f79792020666e
2021-02-11Reland: Pass apex_info.pb file to delta_generatorKelvin Zhang
target_files contain META/apex_info.pb, which contains metadata about compressed apexes. Extract this file from target_file.zip, and pass it to delta_generator. delta_generator will then copy these data to update_metadata Test: generate an OTA, make sure a device running an older build can install the OTA Bug: 172911822 Change-Id: If0e185a32262a849d533c3316ffdf205cb6628b6
2021-02-09Add a flag to manually override VABC am: 9101ff33e2 am: 430c647738 am: ↵Kelvin Zhang
02d7ffcd99 Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1554575 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I1612e3f50614f6f418be7cd1752b128638affb1a
2021-02-09Add a flag to manually override VABCKelvin Zhang
Test: generate an OTA with --disable_vabc Change-Id: I4a42319584dc1388d097dba343fe3ace82479bec
2021-02-04Reland: Add ApexInfo field to update_metadata.proto am: 9dd2d4f8ae am: ↵Mohammad Samiul Islam
0bb44f9077 am: 664a608f8d Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1567660 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Idf280cb5c0790f6162c9ccb38b85b64eda10fc58
2021-02-04Reland: Add ApexInfo field to update_metadata.protoMohammad Samiul Islam
ApexInfo defination has been duplicated from ota_metadata.proto Bug: 172911822 Test: m Test: atest update_engine_unittests:PayloadPropertiesTest Change-Id: I25b11fdeff4a9ad927f5bcb866660f4b66e563fe
2021-01-31Revert "Add ApexInfo field to update_metadata.proto" am: e34db34d58 am: ↵Tianjie Xu
74ed97a7e8 am: 9c5e571ffc Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1567043 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I41879763c89f66048ce89fb2e4c57a7d747c7edc
2021-01-31Revert "Pass apex_info.pb file to delta_generator" am: 195d0a9e38 am: ↵Tianjie Xu
db5a575ca1 am: 715cadfe7b Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1567042 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I6774ab6639bc9ebd1b4dec2d273e4e9daab2b5e0
2021-01-31Revert "Regenerate checked-in update_metadata_pb2.py with aprotoc" am: ↵Tianjie Xu
2e3cdae869 am: c73836eeb9 am: 902a02c937 Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1567041 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I772fe18b0b8add6986ed8849b1680982d49298c1
2021-01-30Revert "Add ApexInfo field to update_metadata.proto"Tianjie Xu
This reverts commit 8e2dce0ccc2699a0df9d8473fa586811f4b1b69c. Reason for revert: b/178908708 Change-Id: I76f09bdb467b4f9f13fe7a0ae28c55e08fea197a
2021-01-30Revert "Pass apex_info.pb file to delta_generator"Tianjie Xu
This reverts commit 4e5da3e9d7459e3d983db943ebf3cb4c36af9c60. Reason for revert: b/178908708 Change-Id: I616da64ffda5b94044f3493861d6d01aebfaad61
2021-01-30Revert "Regenerate checked-in update_metadata_pb2.py with aprotoc"Tianjie Xu
This reverts commit f650fa41940c0792b72f5c7299d952537bf6f3db. Reason for revert: b/178908708 Change-Id: I7ff38e1b6e776862777c42259ecbe84000cfdbb0
2021-01-30Regenerate checked-in update_metadata_pb2.py with aprotoc am: f650fa4194 am: ↵Yifan Hong
8f18403631 am: c7fefdb39c Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1566586 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: If26f8d75be34b4a2b07392803325820864a484ff
2021-01-29Regenerate checked-in update_metadata_pb2.py with aprotocYifan Hong
Fixes this error: AttributeError: 'module' object has no attribute '_internal_create_key' Test: run it Change-Id: I2621090c87e614bbc5ba6c9be22e60d7ed066173
2021-01-29Pass apex_info.pb file to delta_generator am: 4e5da3e9d7 am: 2b54133144 am: ↵Kelvin Zhang
1a29996d03 Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1562573 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ia769e0a068dab2245d47cc95b7de0f990bf53383
2021-01-28Pass apex_info.pb file to delta_generatorKelvin Zhang
target_files contain META/apex_info.pb, which contains metadata about compressed apexes. Extract this file from target_file.zip, and pass it to delta_generator. delta_generator will then copy these data to update_metadata Test: generate an OTA Bug: 172911822 Change-Id: Ia4babb9e711a92f2b78ef8e1dd6ad35d0a2bb5a8
2021-01-27Add ApexInfo field to update_metadata.proto am: 8e2dce0ccc am: 8a7ff2acf1 ↵Mohammad Samiul Islam
am: c819681d68 Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1555280 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ib3bcd3b5105db283fcbccb60d36a26e4e68a5497
2021-01-27Add ApexInfo field to update_metadata.protoMohammad Samiul Islam
ApexInfo defination has been duplicated from ota_metadata.proto Bug: 172911822 Test: m Test: atest update_engine_unittests:PayloadPropertiesTest Change-Id: Ife95e27977be1e32999d9777b226e0eeb644f3fc
2021-01-20Add a "vabc_enabled" flag to update_metadata am: ad8ea1059b am: 65f3fa8b9b ↵Kelvin Zhang
am: 398a95ffa6 Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1550954 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I7e0acdd155a1282f1e2fac39814e7bb1496b6810
2021-01-20Add a "vabc_enabled" flag to update_metadataKelvin Zhang
When doing a downgrade build, the target build might not support vabc. So disable vabc in this case. Test: treehugger Change-Id: Ie5a56adf99b495a40d1caafbda6466181da1bc10
2020-12-14Add host side simulation python script am: 576efc53d5 am: 3210d983b0 am: ↵Kelvin Zhang
34ec5e19d0 Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1512685 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I1e5072f089168ffcc19014098e3aba49008d191a
2020-12-14Add host side simulation python scriptKelvin Zhang
This enables host side simulation of partial updates with the original complete target file Bug: 171519321 Test: run this script with a partial update python3 simulate_ota.py --source ~/aosp/aosp_cf_x86_phone-target_files-6949164.zip --target ~/aosp/aosp_cf_x86_phone-target_files-6937553.zip ~/aosp/cf_x86_downgrade.zip Change-Id: Iec52d8ac585b499d50bdb0c89d203ea353f2e94f
2020-12-03Fix English typo in update_device.py am: 07676f5c38 am: f2c7435028 am: ↵Kelvin Zhang
1534b543db Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1512684 Change-Id: I7255bb2fc2cd847a831732bed2f67598e251469c
2020-12-02Fix English typo in update_device.pyKelvin Zhang
Test: treehugger Change-Id: I748be77b7d8fe4bbc63f1edc672e5c32be6e8c91