Commit Graph

58950 Commits

Author SHA1 Message Date
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
Yo Chiang
a0359ca828 releasetools: Fix non-existent required dependency
HOST module img_from_target_files has non-existent required: zip2zip
HOST module releasetools_py3_test has non-existent required: otatools
HOST module releasetools_test has non-existent required: otatools

Bug: 7456955
Test: TH presubmit
Test: atest releasetools_test # Test result doesn't change
Change-Id: I4fa4fb9c120fda5d4cb309b1e3a2660c3387eb7f
2020-05-25 17:14:51 +08: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
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
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
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
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
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
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
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
Mark Salyzyn
4e20965769 depmod: pair in a modules.load.recovery on BOARD_VENDOR_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD
If the BoardConfig defined BOARD_VENDOR_RAMDISK_MODULES_LOAD and
BOARD_VENDOR_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD, generate both a
modules.load and modules.load.recovery respectively on the vendor
ramdisk.  BOARD_VENDOR_RAMDISK_MODULES must be the set, or super set,
of all the modules represented in both of *_LOAD BOARD variables.

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 151950334
Test: build, confirm, fastboot flashall, boot with split.
Change-Id: Ib2925aec6ea7a2a01a554c808d6697d8c85f9fc0
2020-05-20 14:44:01 -07: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
Julien Desprez
f39239b3f7 Merge "Add tradefed-test-framework to the suites exported jar" am: f244a36850
Change-Id: I072dfcfac0dc5f97047f21dd1aa29ab390fa2b78
2020-05-20 17:00:13 +00:00
Julien Desprez
f244a36850 Merge "Add tradefed-test-framework to the suites exported jar" 2020-05-20 16:46:22 +00:00
Yo Chiang
1db657a1ed Check module existence with ALL_MODULES subvars
Use ALL_MODULES.*.PATH to check module existence.
Use get-modules-for-2nd-arch to check the existence of second arch
variant.
Fix some typos *existant -> existent

Bug: 155869107
Test: lunch mainline_system_arm64; m
Test: lunch generic; m
Change-Id: Ic10fb34a11da0bfbfc528da7496fd929b1d77113
2020-05-20 16:02:07 +00:00
Treehugger Robot
f7d89045d4 Merge "Move BOARD_EXT4_SHARE_DUP_BLOCKS to BoardConfigMainlineCommon.mk" am: 0e19b74112
Change-Id: I3e47d1e371a8a0291ff003b6d03382b6b8f8aae5
2020-05-20 13:54:42 +00:00
Treehugger Robot
0e19b74112 Merge "Move BOARD_EXT4_SHARE_DUP_BLOCKS to BoardConfigMainlineCommon.mk" 2020-05-20 13:32:24 +00:00
Yo Chiang
b5e015fa9e Merge "Resolve module bitness for PRODUCT_PACKAGES" am: 7c147f7e29
Change-Id: I74a2a50ddf83df66f8f373d724d8417be8e44e45
2020-05-20 05:24:20 +00:00
Sasha Smundak
262491b0a8 Do not fail if unzip found no files to extract
Fixes: 157081961
Test: manual
Change-Id: Ib84c9fa1ceb45542ebcee14e048ecf2c1783c0c0
Merged-In: Ib84c9fa1ceb45542ebcee14e048ecf2c1783c0c0
2020-05-20 04:58:01 +00:00
Yo Chiang
7c147f7e29 Merge "Resolve module bitness for PRODUCT_PACKAGES" 2020-05-20 04:55:22 +00:00
Hongguang Chen
f23364d280 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
2020-05-20 04:10:00 +00:00
Treehugger Robot
68e66200f2 Merge changes I80341c2e,I0935f611,Ia805cb47 am: 3dbbfde296
Change-Id: Id8e59bc9dbc6527023adbb1e2bc79b710a61c804
2020-05-20 04:04:11 +00:00
Jiyong Park
a5ab34f4a0 Add PLATFORM_VERSION_LAST_STABLE am: c969779a05
Change-Id: I31262e1db291c91b3d2ace0cd0c90272982662c5
2020-05-20 04:04:08 +00:00
Treehugger Robot
3dbbfde296 Merge changes I80341c2e,I0935f611,Ia805cb47
* changes:
  Deprecate ADDITIONAL_DEFAULT_PROPERTIES
  Move most of the sysprop generation rules to sysprop.mk
  Add PLATFORM_VERSION_LAST_STABLE
2020-05-20 03:49:26 +00:00
Bob Badour
c052816a75 Merge "Revert "Delete deps-license target."" am: fe1328755d
Change-Id: I646dcc7d6d407926e34e6691550da1841f0dbcc7
2020-05-20 02:44:42 +00:00
Bob Badour
fe1328755d Merge "Revert "Delete deps-license target."" 2020-05-20 02:16:06 +00:00
Bob Badour
233336e8a8 Revert "Delete deps-license target."
This reverts commit a553cc828e.

Reason for revert: atest has code that tries to build the target

Change-Id: I46902b3930a5a73aa3e5a15f29e0bb0246e59250
2020-05-20 02:14:04 +00:00
Treehugger Robot
87a0c92ace Merge changes from topic "nonab_pkg" am: b5ee0f0b57
Change-Id: I2748519ca9bc1e6f7650bb6f35e7822cfb9bfcd2
2020-05-20 00:55:02 +00:00
Yifan Hong
2e12b29cd3 Support forcefully generating non-AB packages. am: 65afc07f9d
Change-Id: I0a9d871701505bf32e4a6df2f4cab83000fc4d32
2020-05-20 00:55:00 +00:00
Treehugger Robot
b5ee0f0b57 Merge changes from topic "nonab_pkg"
* changes:
  Use add_slot_suffix function in edify script
  Support forcefully generating non-AB packages.
2020-05-20 00:30:31 +00:00
Yifan Hong
65afc07f9d Support forcefully generating non-AB packages.
Force generate a non-A/B update package when requested.

Bug: 154344887
Test: ota_from_target_files.py --force_non_ab ...
Test: apply it as well

Change-Id: I5e81eb161722e07ef50081b6a16685cbc9963ae2
(cherry picked from commit 7169f754cc)
Merged-In: I5e81eb161722e07ef50081b6a16685cbc9963ae2
2020-05-19 15:23:27 -07:00
Yifan Hong
bdb3201353 Use add_slot_suffix function in edify script
Whenever a device is retrieved from fstab, wrap it with
add_slot_suffix() if it has slotselect option.

Test: change fstab (changes boot image, which is a static partition),
      change system partition (a dynamic partition),
      generate incremental OTA with --force_non_ab and apply it on
      cuttlefish
Bug: 153581609
Change-Id: Id3f8e4425b65176baf1b0ff1ee07ab3d820a3a7f
(cherry picked from commit ae6e0d5d28)
Merged-In: Id3f8e4425b65176baf1b0ff1ee07ab3d820a3a7f
2020-05-19 15:23:27 -07:00
Treehugger Robot
3bfb87b96b Merge "support different boot partition sizes in aosp_arm64" am: def74b4c2b
Change-Id: Ifb89214358958ab0c2f407b98cef676c78ad2f21
2020-05-19 21:41:08 +00:00
Treehugger Robot
def74b4c2b Merge "support different boot partition sizes in aosp_arm64" 2020-05-19 21:30:07 +00:00
Treehugger Robot
724ea1f3b4 Merge "Delete deps-license target." am: c2c427f6bb
Change-Id: I0074c6b81e9ebf2221325b1fbacb0057a75bb742
2020-05-19 18:10:24 +00:00
Treehugger Robot
c2c427f6bb Merge "Delete deps-license target." 2020-05-19 17:56:53 +00:00
Jiyong Park
a1887f326c 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)

Change-Id: I996a33e0208d3dd3a04a31b8dafb27ef995297f2
2020-05-19 23:19:59 +09:00
Yo Chiang
395e91dba5 Merge "Refactor bitness resolving logic of product-installed-files" am: 502606f8ce
Change-Id: Idfaf7c79f08b1dbd2f64122b91ff7d44d862f1f1
2020-05-19 03:28:28 +00:00