Commit graph

60759 commits

Author SHA1 Message Date
Treehugger Robot
53d445153c Merge "Fix type error" am: fdc392b245 am: de33c9c26e
Change-Id: If349c8fae1437893e4b58dab2ebe41aeebeecc8d
2020-05-26 20:13:50 +00:00
Treehugger Robot
de33c9c26e Merge "Fix type error" am: fdc392b245
Change-Id: If3e2f0183039e00cb4184f15dd19dd742857dd56
2020-05-26 20:02:57 +00:00
Treehugger Robot
fdc392b245 Merge "Fix type error" 2020-05-26 19:24:41 +00:00
Treehugger Robot
50f6e415f6 Merge "Generate product build props always" am: 223c0f66d5 am: ada61a9af5
Change-Id: I0e239bf19845ac63bf8363e3867c328c1a862eef
2020-05-26 18:01:23 +00:00
Treehugger Robot
ada61a9af5 Merge "Generate product build props always" am: 223c0f66d5
Change-Id: I7c82ba73c99b95a38146ff470ba249d160d2c02f
2020-05-26 17:40:55 +00:00
Treehugger Robot
223c0f66d5 Merge "Generate product build props always" 2020-05-26 17:26:01 +00:00
TreeHugger Robot
b43ed8923a Merge "Remove mainline_arm64.mk" into rvc-dev-plus-aosp 2020-05-26 10:47:39 +00:00
TreeHugger Robot
8c928f1534 [automerger skipped] Merge "sign_apex.py respects hash algorithm" into rvc-dev am: 13aff4012d -s ours
am skip reason: Change-Id I996a33e0208d3dd3a04a31b8dafb27ef995297f2 with SHA-1 a1887f326c is in history

Change-Id: I80fa741aaec69ef12a8ddefc1d1c5c7373868014
2020-05-26 01:16:47 +00:00
TreeHugger Robot
13aff4012d Merge "sign_apex.py respects hash algorithm" into rvc-dev 2020-05-26 01:03:48 +00:00
Treehugger Robot
93b42b8fe3 Merge "Allow more than one '=' in avb_extra_custom_image_extra_args." am: 6d412db1b3 am: 787ee95af2
Change-Id: I08b51e5b108019f28c8c9004ddcb931acd11caf0
2020-05-25 22:36:21 +00:00
Treehugger Robot
787ee95af2 Merge "Allow more than one '=' in avb_extra_custom_image_extra_args." am: 6d412db1b3
Change-Id: I935e285afa6fe4b17932849d85a7645f175a88c0
2020-05-25 22:21:11 +00:00
Treehugger Robot
6d412db1b3 Merge "Allow more than one '=' in avb_extra_custom_image_extra_args." 2020-05-25 22:08:12 +00:00
Hongguang Chen
883eecbc4b Allow more than one '=' in avb_extra_custom_image_extra_args.
avb_extra_custom_image_extra_args can be set to
'oem=--signing_helper_with_files=/tmp/avbsigner.sh' on signing server.
The second '=' shouldn't be splitted in this case.

BUG: 154171021
Test: Manually sign target zip files which has custom images.
  sign_target_files_apks -d certs --avb_extra_custom_image_key \
    oem=oem_rsa4096.pem --avb_extra_custom_image_algorithm \
    oem=SHA256_RSA4096 --avb_extra_custom_image_extra_args \
    oem="--signing_helper_with_files=/tmp/avbsigner.sh" \
    xxxx-target_files.zip signed.zip

Change-Id: I815d574f791734d4c6a25a9f8d827b5b4f93d7cc
2020-05-24 21:10:44 -07:00
Yo Chiang
68bee4b679 Remove mainline_arm64.mk
mainline_arm64 is broken for quite some time. Let's just remove it
rather than trying to fix it.
IIUC this was a testing ground for mainline_system.mk when it was first
introduced. Now we have plenty of products that use mainline_system.mk
(e.g. mainline_system_arm64, aosp_arm64, aosp_<pixel>, ...).

Bug: 141443017
Test: TH
Change-Id: I08990b70d45c0663a9700f41b670513674bf7e97
2020-05-25 10:52:31 +08:00
Hongguang Chen
cae87d6ff9 [automerger skipped] Add options to sign the prebuilt custom images. am: d9edddd64d -s ours
am skip reason: Change-Id Ifccfee5e8909697eef6ccda0cc352fa16a9f6db6 with SHA-1 f23364d280 is in history

Change-Id: Ie3729afab0e8160be39fac9c0632edb9f2350f8c
2020-05-21 23:42:51 +00:00
Hongguang Chen
d9edddd64d Add options to sign the prebuilt custom images.
The custom images are any images owned by OEMs and SoCs, oem images
mounted on /oem is an example. The oem images can be used to customize
devices for different carriers, like wallpaper, ringtones, and
carrier-specific apks. OEMs can generate multiple oem images, like
oem.img, oem-carrier1.img and oem-carrier2.img and flash different oem
images for different carriers. The oem images are only one case, OEMs
and SoCs can add more custom images and mount them to custom partitions.

This change enables custom images to be vbmeta.img chained partitions.
The following configuration in BoardConfig.mk is an exmaple. It has two
custom partitions: oem and test. They will be signed by different keys.
And they will be chained by vbmeta.img. The custom images here are
prebuilts, which can be built by `make custom_images` separately.
BOARD_AVB_<CUSTOM_PARTITION>_IMAGE_LIST should include all custom images
to apply AVB signing. And to every custom partition, one image whose
name is partition name must be added in its
BOARD_AVB_<CUSTOM_PARTITION>_IMAGE_LIST.

BOARD_CUSTOMIMAGES_PARTITION_LIST := oem test

BOARD_AVB_OEM_KEY_PATH := external/avb/test/data/testkey_rsa4096.pem
BOARD_AVB_OEM_ALGORITHM := SHA256_RSA4096
BOARD_AVB_OEM_ADD_HASHTREE_FOOTER_ARGS :=
BOARD_AVB_OEM_ROLLBACK_INDEX_LOCATION := 1
BOARD_AVB_OEM_PARTITION_SIZE := 5242880
BOARD_AVB_OEM_IMAGE_LIST := \
    device/xxxx/yyyy/oem/oem.img \
    device/xxxx/yyyy/oem/oem1.img

BOARD_AVB_TEST_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
BOARD_AVB_TEST_ALGORITHM := SHA256_RSA2048
BOARD_AVB_TEST_ADD_HASHTREE_FOOTER_ARGS :=
BOARD_AVB_TEST_ROLLBACK_INDEX_LOCATION := 2
BOARD_AVB_TEST_PARTITION_SIZE := 10485760
BOARD_AVB_TEST_IMAGE_LIST := \
    device/xxxx/yyyy/test/test.img \
    device/xxxx/yyyy/test/test1.img

To resign the custom images in the target zip file, the
avb_extra_custom_image_key, avb_extra_custom_image_algorithms and
avb_extra_custom_image_extra_args options are added to the
sign_target_files_apks tool too. The following test cases list some
examples about how to use them.

BUG: 154171021
Test: 1) "atest --host releasetools_test releasetools_py3_test -c"
  2) Build images by 'make dist', sign and validate target files.
   a) Test on dist w/ chained vbmeta_system and ome custom images
   sign_target_files_apks -d certs \
     --avb_extra_custom_image_key oem=oem_rsa4096.pem \
     --avb_extra_custom_image_algorithm oem=SHA256_RSA4096 \
     xxx-target_xxx.zip signed.zip
   validate_target_files.py signed.zip
   Flash image and boot up.
   Verify the oem images and vbmeta images in OUT and target zips by
   avbtool.

   b) Test on dist w/ chained vbmeta_system and oem and test custom images
   sign_target_files_apks -d certs \
     --avb_extra_custom_image_key oem=oem_rsa4096.pem \
     --avb_extra_custom_image_algorithm oem=SHA256_RSA4096 \
     --avb_extra_custom_image_extra_args oem=--do_not_generate_fec \
     --avb_extra_custom_image_key test=test_rsa4096.pem \
     --avb_extra_custom_image_algorithm test=SHA256_RSA4096 \
     xxx-target_xxx.zip signed.zip
   validate_target_files.py signed.zip
   Verify the oem, test images and vbmeta images in OUT and target zips
   by avbtool.

   c) Test on dist w/o chained partition.
   sign_target_files_apks -d certs xxx-target_xxx.zip signed.zip
   validate_target_files.py signed.zip
   Flash image and boot up.
   Verify the vbmeta images in OUT and target zips by avbtool.

Change-Id: Ifccfee5e8909697eef6ccda0cc352fa16a9f6db6
Merged-In: Ifccfee5e8909697eef6ccda0cc352fa16a9f6db6
2020-05-21 22:22:19 +00:00
Treehugger Robot
cbee0b0284 Merge "Delete deps-license target." am: 95fc5e76a6 am: 381b86da62
Change-Id: I1e87c23a257e10db0618c03ae962bba753123cae
2020-05-21 22:15:53 +00:00
Treehugger Robot
381b86da62 Merge "Delete deps-license target." am: 95fc5e76a6
Change-Id: If7cd6f4365894902e925a0a79fb67eb2a35f435b
2020-05-21 21:51:40 +00:00
Treehugger Robot
95fc5e76a6 Merge "Delete deps-license target." 2020-05-21 21:37:06 +00:00
Tianjie Xu
7790069449 Merge "Add an option to input the boot variables for OTA package generation" am: 1ca7b10456 am: 0dbde58c9b
Change-Id: I27286dd6a6eae839231bacd508d9a014b9f8a32a
2020-05-21 18:27:34 +00:00
Tianjie Xu
0dbde58c9b Merge "Add an option to input the boot variables for OTA package generation" am: 1ca7b10456
Change-Id: I33bbd3bb27fcba8f6a40e7c79b78c6751a7fc817
2020-05-21 18:13:36 +00:00
Tianjie Xu
1ca7b10456 Merge "Add an option to input the boot variables for OTA package generation" 2020-05-21 17:58:21 +00:00
Treehugger Robot
9e55d3d282 Merge "Add options to sign the prebuilt custom images." am: 8a87dae43b am: 1c23d3ce54
Change-Id: Ife592f30393e0411cb9ca94a34409aa9f111e8ec
2020-05-21 17:10:36 +00:00
Treehugger Robot
1c23d3ce54 Merge "Add options to sign the prebuilt custom images." am: 8a87dae43b
Change-Id: Ib7e979796c6646085ba526f9fe4cafaaface4a5f
2020-05-21 16:51:06 +00:00
Treehugger Robot
8a87dae43b Merge "Add options to sign the prebuilt custom images." 2020-05-21 16:34:13 +00:00
Bob Badour
2441181bdf Delete deps-license target.
If used, the results would be inaccurate in any case.

Deleted atest references: http://aosp/1315404 http://aosp/1315405

Test: treehugger
Test: atest -c --rebuild-module-info com.google.android.gts.updateengine.UpdateEngineHostTest

Change-Id: I6efbf1f5ff3a533b26d6bbedc14a6fcc1b200391
2020-05-21 07:11:55 -07:00
SzuWei Lin
1e6b3e78df Generate product build props always
GSI do not build product partition, and contains the product
contents under /system/product/. Original logic do not generate
the product build props on this case.

The patch fixes the logic for product build props generation to
align the other partitions.

Bug: 157191627
Test: build aosp_arm64-userdebug
Test: check /system/product/build.prop in out folder
Change-Id: Ia88c8efecb18db9c27baa466e492bfd898b581d3
2020-05-21 20:16:47 +08:00
Anton Hansson
698444848b Merge "Revert "Minor cleanup for script consistency and adherence to Google shell style guide."" am: 438fc22219 am: 2f0c4e42b0
Change-Id: Ie69f1829d60700cf4e6b06eb2bb65245c1932eb1
2020-05-21 11:35:06 +00:00
Anton Hansson
2f0c4e42b0 Merge "Revert "Minor cleanup for script consistency and adherence to Google shell style guide."" am: 438fc22219
Change-Id: Id48a0b1521deb4acfe0f95ff5a74a302b98ca923
2020-05-21 11:15:42 +00:00
Anton Hansson
438fc22219 Merge "Revert "Minor cleanup for script consistency and adherence to Google shell style guide."" 2020-05-21 10:50:57 +00:00
Matt Alexander
d9c56568de Revert "Minor cleanup for script consistency and adherence to Google shell style guide."
This reverts commit d92718356d.

Reason for revert: Adding the opening brace to the end of the function breaks lunch.  

Change-Id: Ia3a9ff01964de0e616a534058d568150de32558a
2020-05-21 10:49:17 +00:00
Daniel Rosenberg
0845c81633 Merge "Disable sdcardfs from emulated_stroage.mk" into rvc-dev am: 241877809f
Change-Id: I3a03c65cbaa20aee21cb87823a77f1d1f8e40ebf
2020-05-21 08:41:14 +00:00
Daniel Rosenberg
241877809f Merge "Disable sdcardfs from emulated_stroage.mk" into rvc-dev 2020-05-21 08:31:22 +00:00
Tianjie
d6867167d1 Add an option to input the boot variables for OTA package generation
The values of the ro.boot* variables are not part of the image files
and are provided (e.g. by bootloaders) at runtime. Meanwhile, their
values may affect some of the device build properties, as a different
build.prop file can be imported by init during runtime.

This cl adds an option to accepts a list of possible values for some
boot variables. The OTA generation script later use these values to
calculate the alternative runtime fingerprints of the device; and
list the device names and fingerprints in the OTA package's metadata.

The OTA metadata is verified by the OTA server or recovery to ensure
the correct OTA package is used for update. We haven't made any
restrictions on what ro.boot* variables can be used for fingerprint
override. One possible candidate can be the skus listed in
ODM_MANIFEST_SKUS.

Bug: 152167826
Test: unittests pass, generate an OTA file with the new option
Change-Id: I637dea3472354236d2fd1ef0a3306712b3283c29
2020-05-20 19:01:17 -07:00
Treehugger Robot
5b79a329f1 Merge "sign_apex.py respects hash algorithm" am: ed67178e4a am: ef5e5708a9
Change-Id: Icd7e7c1a8612e47da115b7341aec95d9ccf2201d
2020-05-21 01:11:18 +00:00
Jiyong Park
b3a5402d3f sign_apex.py respects hash algorithm
When sign_apex.py re-signs an apex, the hash algorithm is extracted and
it is used when re-packaging the file.

Bug: 155771970
Test: releasetools_py3_test doesn't regress
(some tests were failed, but they failed even without this change:
test_ApexApkSigner_apkKeyNotPresent (test_apex_utils.ApexUtilsTest) ... ERROR
test_ApexApkSigner_noApkPresent (test_apex_utils.ApexUtilsTest) ... ERROR
test_ApexApkSigner_noAssetDir (test_apex_utils.ApexUtilsTest) ... ERROR
test_ApexApkSigner_signApk (test_apex_utils.ApexUtilsTest) ... ERROR)

Merged-In: I996a33e0208d3dd3a04a31b8dafb27ef995297f2
Change-Id: I996a33e0208d3dd3a04a31b8dafb27ef995297f2
(cherry picked from commit a1887f326c)
2020-05-21 09:58:00 +09:00
Treehugger Robot
ef5e5708a9 Merge "sign_apex.py respects hash algorithm" am: ed67178e4a
Change-Id: I74d30318a703979c42927337240b2158f7b792fa
2020-05-21 00:46:00 +00:00
Treehugger Robot
ed67178e4a Merge "sign_apex.py respects hash algorithm" 2020-05-21 00:35:54 +00:00
Treehugger Robot
567f209484 Merge "Minor cleanup for script consistency and adherence to Google shell style guide." am: 513bce3b4e am: 6765fe9353
Change-Id: I3b8d0fc6be6ac098172828e8f8165ed25c74e241
2020-05-20 23:22:25 +00:00
Treehugger Robot
6765fe9353 Merge "Minor cleanup for script consistency and adherence to Google shell style guide." am: 513bce3b4e
Change-Id: If93bac624777497001744dc54ade70724a589883
2020-05-20 22:59:44 +00:00
Treehugger Robot
513bce3b4e Merge "Minor cleanup for script consistency and adherence to Google shell style guide." 2020-05-20 22:37:00 +00:00
TreeHugger Robot
37dd13f601 Merge "Update Security String to 2020-07-05" into qt-qpr1-dev am: e549d10438 am: d078cc9f78
Change-Id: If5070079266851b863efb93dafb36f5d74286e7e
2020-05-20 22:16:16 +00:00
TreeHugger Robot
d078cc9f78 Merge "Update Security String to 2020-07-05" into qt-qpr1-dev am: e549d10438
Change-Id: If51535409877a076bbc636753cc0e357fea2520e
2020-05-20 22:05:03 +00:00
TreeHugger Robot
e549d10438 Merge "Update Security String to 2020-07-05" into qt-qpr1-dev 2020-05-20 21:47:09 +00:00
Treehugger Robot
2cea0f5f40 [automerger skipped] Merge "Do not fail if unzip found no files to extract" am: 0ead402c40 am: 97e1277e81 -s ours
am skip reason: Change-Id Ib84c9fa1ceb45542ebcee14e048ecf2c1783c0c0 with SHA-1 5761b525de is in history

Change-Id: I9166e86a9caf1fcecce1859b45dddcd62e8b0c16
2020-05-20 20:47:12 +00:00
Treehugger Robot
97e1277e81 Merge "Do not fail if unzip found no files to extract" am: 0ead402c40
Change-Id: I65409b22fbd97c816502181feb17d0f1f3e3c282
2020-05-20 20:32:43 +00:00
Treehugger Robot
0ead402c40 Merge "Do not fail if unzip found no files to extract" 2020-05-20 20:18:04 +00:00
Matt Alexander
d92718356d Minor cleanup for script consistency and adherence to Google shell style guide.
Test: manual

Change-Id: Ie9fd197cee5e934a0b89898b85d1a97adcec6348
2020-05-20 19:21:38 +00:00
TreeHugger Robot
ddba33a15d Merge "Do not fail if unzip found no files to extract" into rvc-dev am: df865a9a17
Change-Id: Ia09a98fddef9c6e37922a1d112aa2a9881ff47c4
2020-05-20 17:37:24 +00:00
TreeHugger Robot
df865a9a17 Merge "Do not fail if unzip found no files to extract" into rvc-dev 2020-05-20 17:15:16 +00:00