Commit Graph

6486 Commits

Author SHA1 Message Date
Daniel Norman 4d3dcaf5ab Merge "Adds image-specific selinux_fc props to allow different file_contexts." am: c9fc1120c1
am: 07f55ba840

Change-Id: I02b37b267b816a1bcc8eee94651b147d1e45bfd8
2019-05-23 22:12:59 -07:00
Daniel Norman c9fc1120c1 Merge "Adds image-specific selinux_fc props to allow different file_contexts." 2019-05-23 23:42:13 +00:00
Daniel Norman 72c626f017 Adds image-specific selinux_fc props to allow different file_contexts.
This enables mixed builds to use the file_contexts.bin from the system
build when regenerating images that come from system target files, and
similarly for file_contexts.bin from the other build when regenerating
images from other target files.

In monolithic (non-mixed) builds all image-specific selinux_fc props
point to the same file_contexts.

Bug: 132108151
Test: Built and booted mixed build devices.
Change-Id: Id51ed6d96ea6337879f1ab21d47c93c67bc25312
2019-05-23 11:21:02 -07:00
Bowgo Tsai 63b4c9eb76 Moving /odm/build.prop to /odm/etc/buid.prop
am: 33ff602070

Change-Id: I9b26413a5fbfe43e900d79010075a4c234d4b310
2019-05-22 21:07:11 -07:00
Bowgo Tsai 33ff602070 Moving /odm/build.prop to /odm/etc/buid.prop
In device root directory, we have the following symlinks:
  - /odm/app -> /vendor/odm/app
  - /odm/bin -> /vendor/odm/bin
  - /odm/etc -> /vendor/odm/etc
  ...

This allows the Generic System Image (GSI) to be used on both devices:
  1) Has a physical odm partition, where those symlink will be hidden
     when /odm is used as the mount point
  2) Has no physical odm partition and fallback to /vendor/odm/.

We can't just have the symlink /odm -> /vendor/odm, because the former
devices won't have /vendor/odm directory, which leads to mount failure
when the mount point /odm is resolved to /vendor/odm.

The existing /vendor/odm/build.prop won't be loaded in the latter
devices, because there is no symlink:
    - /odm/build.prop -> /vendor/odm/build.prop.

Note that init blocks reading through direct symlinks (O_NOFOLLOW) so
the above symlink won't work either. This CL moves the odm build.prop
to /odm/etc/build.prop for init to load it (symlinks in earlier
components of the path will still be followed by O_NOFOLLOW).

Bug: 132128501
Test: boot a device and checks /odm/etc/build.prop is loaded
Test: make dist with an odm.img, checks $OUT/odm/etc/build.prop is loaded
Change-Id: I6f88763db755c9ec6068bfdd9cee81c19d72e9d7
Merged-In: I6f88763db755c9ec6068bfdd9cee81c19d72e9d7
(cherry picked from commit 6c62884000)
2019-05-22 16:14:53 +08:00
Bowgo Tsai 71a4d5cdd5 Moving /odm/build.prop to /odm/etc/buid.prop
In device root directory, we have the following symlinks:
  - /odm/app -> /vendor/odm/app
  - /odm/bin -> /vendor/odm/bin
  - /odm/etc -> /vendor/odm/etc
  ...

This allows the Generic System Image (GSI) to be used on both devices:
  1) Has a physical odm partition, where those symlink will be hidden
     when /odm is used as the mount point
  2) Has no physical odm partition and fallback to /vendor/odm/.

We can't just have the symlink /odm -> /vendor/odm, because the former
devices won't have /vendor/odm directory, which leads to mount failure
when the mount point /odm is resolved to /vendor/odm.

The existing /vendor/odm/build.prop won't be loaded in the latter
devices, because there is no symlink:
    - /odm/build.prop -> /vendor/odm/build.prop.

Note that init blocks reading through direct symlinks (O_NOFOLLOW) so
the above symlink won't work either. This CL moves the odm build.prop
to /odm/etc/build.prop for init to load it (symlinks in earlier
components of the path will still be followed by O_NOFOLLOW).

Bug: 132128501
Test: boot a device and checks /odm/etc/build.prop is loaded
Test: make dist with an odm.img, checks $OUT/odm/etc/build.prop is loaded
Change-Id: I6f88763db755c9ec6068bfdd9cee81c19d72e9d7
Merged-In: I6f88763db755c9ec6068bfdd9cee81c19d72e9d7
(cherry picked from commit 6c62884000)
2019-05-22 14:04:39 +08:00
Chris Gross 99a22624a5 Merge "Add merging of apexkeys and apkcerts metadata" am: a489a92fdc
am: 07d985d122

Change-Id: Ib5e6d864f3704ffeeb4adb1933bb34f92d3511d8
2019-05-20 18:24:32 -07:00
Chris Gross fabf50a577 Add merging of apexkeys and apkcerts metadata
Bug: 131437873
Test: Built system-only and vendor builds for merge. Compared
resulting apkcertx and apexkeys text files to that of a monolithic
build,
Test: Created colliding entries in both apexkeys and apkcerts text
files and ensure the script exited with an appropriate error message.
Test: Created unit tests to cover both non-colliding and colliding
entries
Change-Id: I6e42ce682ffa9059344e8cd63ba3a720c1f93452
2019-05-20 18:35:22 +00:00
Tao Bao f52dbb81fe Add sign_apex.py that signs a given APEX file.
Bug: 132687993, 131687150
This CL moves SignApex() from sign_target_files_apks into apex_utils,
and adds sign_apex that allows signing a standalone APEX file directly.

Test: Run the following command and check the output file.
$ build/make/tools/releasetools/sign_apex.py \
     -v \
     --container_key \
         build/make/target/product/security/testkey.x509.pem \
     --payload_key external/avb/test/data/testkey_rsa4096.pem \
     --payload_extra_args \
         "--signing_helper_with_files ./signing-helper.sh" \
     foo.apex \
     signed-foo.apex
Test: Run sign_target_files_apks.py on crosshatch target_files.zip.
Change-Id: I4b2422fd5cb1c60a3aa94511475e2a0e5b1666ca
2019-05-19 11:33:31 -07:00
Tao Bao 5a827e78fa Merge "Add sign_apex.py that signs a given APEX file." am: bc7e3f98f4
am: b67f0f099a

Change-Id: Ib05c05d436ae7052bf9ef9f37991fd05bb159e50
2019-05-13 16:18:23 -07:00
Tao Bao bc7e3f98f4 Merge "Add sign_apex.py that signs a given APEX file." 2019-05-13 22:47:24 +00:00
Tao Bao e7354ba447 Add sign_apex.py that signs a given APEX file.
This CL moves SignApex() from sign_target_files_apks into apex_utils,
and adds sign_apex that allows signing a standalone APEX file directly.

Test: Run the following command and check the output file.
$ build/make/tools/releasetools/sign_apex.py \
     -v \
     --container_key \
         build/make/target/product/security/testkey.x509.pem \
     --payload_key external/avb/test/data/testkey_rsa4096.pem \
     --payload_extra_args \
         "--signing_helper_with_files ./signing-helper.sh" \
     foo.apex \
     signed-foo.apex
Test: Run sign_target_files_apks.py on crosshatch target_files.zip.
Change-Id: I4b2422fd5cb1c60a3aa94511475e2a0e5b1666ca
2019-05-13 12:41:26 -07:00
Tao Bao 5ed6499abf Merge "releasetools: Unzip all files when generating image archive." am: e77dbd2a62
am: 189a8dff61

Change-Id: Idd065bff59364883e9f37487b904b3d277deb8f9
2019-05-10 21:15:59 -07:00
Tao Bao 1dac1d4164 releasetools: Unzip all files when generating image archive.
Commit 7df64c3e starts to call common.LoadInfoDict() when generating
image archive, which reads additional files under BOOT/, RECOVERY/ and
ROOT/. Unzip everything from the target_files.zip.

Bug: 132456827
Test: Run img_from_target_files.py on previously failing
      target_files.zip.
Change-Id: I22ee57c4f765bee9494478bf115b1581877401f4
2019-05-10 15:57:20 -07:00
Tao Bao a3c3b9bc64 releasetools: Unzip all files when generating image archive.
Commit 7df64c3e starts to call common.LoadInfoDict() when generating
image archive, which reads additional files under BOOT/, RECOVERY/ and
ROOT/. Unzip everything from the target_files.zip.

Bug: 132456827
Test: Run img_from_target_files.py on previously failing
      target_files.zip.
Change-Id: I22ee57c4f765bee9494478bf115b1581877401f4
2019-05-10 15:52:01 -07:00
Xin Li 8a39705283 Merge "DO NOT MERGE - Merge Pie Bonito/Sargo into master." 2019-05-09 22:05:51 +00:00
Daniel Norman ddc1712376 Merge "Fixes typo when calling process_dynamic_partitions_info_txt." am: 74d91295fd
am: c937afafa1

Change-Id: Ifa0d4a1dd44e54b9b276879e8034af9b67103830
2019-05-09 13:11:40 -07:00
Daniel Norman c937afafa1 Merge "Fixes typo when calling process_dynamic_partitions_info_txt."
am: 74d91295fd

Change-Id: I9c706c816308966d27482f949abcf3cd83082aca
2019-05-09 12:49:59 -07:00
Daniel Norman 714bd12861 Fixes typo when calling process_dynamic_partitions_info_txt.
Test: Running merge_target_files.py
Change-Id: Ieddfbfe524824844fc12cc10347f667332149f7c
2019-05-08 16:20:02 -07:00
Tao Bao 9c1b48ce7a Merge "releasetools: Update the comments regarding selinux_fc." am: 45f74b104b
am: df24a30b5d

Change-Id: I8d8c7bb7889d1260bdd8bfb77c132244ccf5078b
2019-05-08 15:34:32 -07:00
Tao Bao df24a30b5d Merge "releasetools: Update the comments regarding selinux_fc."
am: 45f74b104b

Change-Id: I570d584f8eadcfacfc4a91470137e2c4f080d9df
2019-05-08 15:14:35 -07:00
Tao Bao 13ebc021ec releasetools: Update the comments regarding selinux_fc.
The former comment no longer applies, as we have been always packing
META/file_contexts.bin in a target_files.zip (commit aa7318c3, since
Nougat), and we no longer look for the one under BOOT/RAMDISK/ (commit
d14b8956, since Q).

Test: N/A
Change-Id: I03f361234bf440e942f21e5a624862590248544b
2019-05-08 12:40:27 -07:00
Chris Gross b56351ac7b Merge "Add BUILD_RECOVERY_IMAGE and BUILD_BOOT_IMAGE flags" am: 84c96eba1e
am: e9425427c2

Change-Id: I367fdc842308a47b6a68dd416788bffa61f11764
2019-05-08 11:35:40 -07:00
Chris Gross e9425427c2 Merge "Add BUILD_RECOVERY_IMAGE and BUILD_BOOT_IMAGE flags"
am: 84c96eba1e

Change-Id: I66f4b0e3faaf3fcc16cd51a1e1f93d549fd708fd
2019-05-08 11:30:33 -07:00
Chris Gross 84c96eba1e Merge "Add BUILD_RECOVERY_IMAGE and BUILD_BOOT_IMAGE flags" 2019-05-08 18:21:42 +00:00
Daniel Norman 51fb0bfb26 Merge "Begins merging META/dynamic_partitions_info.txt." am: 7eae467469
am: fd5091d06f

Change-Id: If8321e8b350ab56128904f3ce092c0e74c137250
2019-05-07 18:55:33 -07:00
Daniel Norman fd5091d06f Merge "Begins merging META/dynamic_partitions_info.txt."
am: 7eae467469

Change-Id: I77da9b31ab363c3c8cea338df6a2863e7cbf0526
2019-05-07 18:08:06 -07:00
Daniel Norman a61cde0747 Begins merging META/dynamic_partitions_info.txt.
This file is used by OTA generation so it needs to appear in mixed
builds with the combined content from the system and other versions of
the file.

Test: python -m unittest test_merge_target_files
Test: Running merge_target_files on a dynamic-partition-enabled build
and observing the resulting target files.
Bug: 131889742

Change-Id: I4ddbebc087e430f6307d0bd5461121a374e58ea4
2019-05-07 11:53:58 -07:00
Chris Gross a784ef197c Add BUILD_RECOVERY_IMAGE and BUILD_BOOT_IMAGE flags
Bug: 123428770
Test: Built system-only image and checked that no boot.img or
recovery.img files where created. Booted the resulting merged build on
device.

Change-Id: I760476502775e68125907c39e66b8665e789a798
2019-05-07 11:00:37 -07:00
Bill Peckham 148239a7dd Merge "Use file_contexts.bin from other build to regenerate images." am: 7dbbc3075b
am: db8a8c6799

Change-Id: I1f9c64b95cb174d5f3ddf719087f051c8c59f7e8
2019-05-07 10:53:46 -07:00
Bill Peckham db8a8c6799 Merge "Use file_contexts.bin from other build to regenerate images."
am: 7dbbc3075b

Change-Id: Iae50c7e8eeb4411d30922b9047a046a07b2136ad
2019-05-07 10:43:34 -07:00
Bill Peckham 7dbbc3075b Merge "Use file_contexts.bin from other build to regenerate images." 2019-05-07 17:26:25 +00:00
Tao Bao 3cec508728 Merge "releasetools: Support replacing the signing keys for chained vbmeta." am: 32d69c6b74
am: e7e563c673

Change-Id: I1539f7244c99c017c5c8461397ec3d63d32c51f0
2019-05-06 20:33:05 -07:00
Tao Bao e7e563c673 Merge "releasetools: Support replacing the signing keys for chained vbmeta."
am: 32d69c6b74

Change-Id: I69b16c955f656b5749fc235c6044d549f340f22b
2019-05-06 20:27:55 -07:00
Tao Bao d403e7bc8e releasetools: Support replacing the signing keys for chained vbmeta.
Bug: 131710801
Test: Run sign_target_files_apks.py on a target that uses vbmeta_system.
Change-Id: I3bc526af3ec9f2680ca17ee5535607cff3ae9523
Merged-In: I3bc526af3ec9f2680ca17ee5535607cff3ae9523
(cherry picked from commit d6085d6834)
2019-05-06 20:11:17 -07:00
Bill Peckham 736b223d5f Use file_contexts.bin from other build to regenerate images.
The old process_file_contexts_bin function did not properly generate a usable
file_contexts.bin to regenerate images, so instead use the file_contexts.bin
from the other partial target files package. When combining any one of several
other partial target files packages with a single system partial target files
package, this file will properly apply contexts as long as the same source is
used for the system partial target files.

Test: Verify that file contexts are properlty applied to vendor image.
Bug: 131584454
Change-Id: I16f8cc3b7f2eb7f09746f0ddcb2c1daf3fd19da6
2019-05-06 23:23:23 +00:00
Tao Bao d6085d6834 releasetools: Support replacing the signing keys for chained vbmeta.
Bug: 131710801
Test: Run sign_target_files_apks.py on a target that uses vbmeta_system.
Change-Id: I3bc526af3ec9f2680ca17ee5535607cff3ae9523
2019-05-06 12:56:52 -07:00
Tao Bao 0a04bc5bf7 Merge "Ensure that 'release-keys' are set on properties" am: cc389947d0
am: 6c4aa77c24

Change-Id: I5de9c10ae3ecbae51a0808db8193ee54dc8a2a38
2019-05-03 15:23:22 -07:00
Tao Bao 6c4aa77c24 Merge "Ensure that 'release-keys' are set on properties"
am: cc389947d0

Change-Id: Id4882e7ee2c1522d4fdd00cbc90e7eb9e116b9b0
2019-05-03 14:27:54 -07:00
Magnus Strandh 6396797612 Ensure that 'release-keys' are set on properties
Some properties had 'test-keys' still set
after signing the target files zip for release.

These properties are now added to the RewriteProps
method.

Bug: 131810966
Test: manual
Test: `atest releasetools_test`
Change-Id: Ifb352ed28f5100f1e9f686d77e935723f7f6d3ae
Merged-In: Ifb352ed28f5100f1e9f686d77e935723f7f6d3ae
(cherry picked from commit 234f4b418f)
2019-05-03 11:41:07 -07:00
Magnus Strandh 234f4b418f Ensure that 'release-keys' are set on properties
Some properties had 'test-keys' still set
after signing the target files zip for release.

These properties are now added to the RewriteProps
method.

Bug: 131810966
Test: manual
Test: `atest releasetools_test`
Change-Id: Ifb352ed28f5100f1e9f686d77e935723f7f6d3ae
2019-05-03 10:42:35 -07:00
Tao Bao 721a294a1c Merge "Update the references to verity tools." am: 31c2bf905e
am: ee153db46a

Change-Id: I9f6b38c0538b8b0e9146c622dfb807f170398c8d
2019-05-03 06:59:30 -07:00
Tao Bao ee153db46a Merge "Update the references to verity tools."
am: 31c2bf905e

Change-Id: I83f5ec259273007f7ba61e486a0150e8ef9b69e8
2019-05-03 06:51:19 -07:00
Tao Bao 31c2bf905e Merge "Update the references to verity tools." 2019-05-03 13:41:45 +00:00
Tao Bao d5ab10eed4 Update the references to verity tools.
Test: `m -j dist` with aosp_marlin-userdebug
Test: `atest releasetools_test`
Test: Run signing with otatools.
Test: TreeHugger
Change-Id: I60d5bad4435d588c5f97b2245ca67ed3d55299b7
2019-05-02 18:32:11 -07:00
Tao Bao fd6849faf0 Merge "releasetools: Skip on empty care_map." am: 65e41c4236
am: b45a15da18

Change-Id: If162f2fa1c627d4820b3acfd807af8a7b454fa5d
2019-05-02 08:48:29 -07:00
Tao Bao b45a15da18 Merge "releasetools: Skip on empty care_map."
am: 65e41c4236

Change-Id: I1afdf0942b3899d1f3b1be96ddfba9150cc8a863
2019-05-02 08:43:21 -07:00
Tao Bao 77a4aa0c06 releasetools: Skip on empty care_map.
common.GetCareMap() may return an empty list on unavailable care_map
since the change in commit 8bdfb990ea.
Caller needs to handle such a case accordingly. This CL fixes the caller
in add_img_to_target_files.py, and changes the return value to None to
break legacy callers loudly.

Fixes: 131794385
Test: `atest releasetools_test`
Change-Id: I7c94f456064199237e84ef75732bdd10ebe31736
2019-05-01 22:21:25 -07:00
Yifan Hong e834be384e Merge "Add BOARD_SUPER_IMAGE_IN_UPDATE_PACKAGE flag." am: a2488b7d85
am: 6e2eb931a7

Change-Id: I7d1520bdaa9057680ecc3496d7baf2539d25d9e4
2019-04-30 13:14:11 -07:00
Yifan Hong 6e2eb931a7 Merge "Add BOARD_SUPER_IMAGE_IN_UPDATE_PACKAGE flag."
am: a2488b7d85

Change-Id: Ib1cf76a73247e6f92809d14a5279d750f96d1a34
2019-04-30 13:06:58 -07:00
Yifan Hong a2488b7d85 Merge "Add BOARD_SUPER_IMAGE_IN_UPDATE_PACKAGE flag." 2019-04-30 19:49:12 +00:00
Yifan Hong 7df64c3e77 Add BOARD_SUPER_IMAGE_IN_UPDATE_PACKAGE flag.
When set, product-img-tag.zip contains super.img instead of individual
user images from target files. For virtual devices, super.img is needed
to boot the device, but individual user images aren't needed.

Test: on A/B DAP, with flag set:
     - m updatepackage and look at img.zip
     - img_from_target_files
     both have super.img and not system / vendor / system_other
Test: on non-A/B DAP, with the flag set:
     - m updatepackage and look at img.zip
     - img_from_target_files
     both have super.img and not system / vendor
Test: on A/B retrofit, with the flag set:
     - m updatepackage and look at img.zip
     - img_from_target_files
     both have super_*.img and system_other.img, but not system / vendor
Bug: 113175337

Change-Id: I94e33091d0c837cae40776176b4dcfdd338aba90
(cherry picked from commit 0e97dbb8ca)
Merged-In: I94e33091d0c837cae40776176b4dcfdd338aba90
2019-04-30 11:36:16 -07:00
Yifan Hong 0e97dbb8ca Add BOARD_SUPER_IMAGE_IN_UPDATE_PACKAGE flag.
When set, product-img-tag.zip contains super.img instead of individual
user images from target files. For virtual devices, super.img is needed
to boot the device, but individual user images aren't needed.

Test: on A/B DAP, with flag set:
     - m updatepackage and look at img.zip
     - img_from_target_files
     both have super.img and not system / vendor / system_other
Test: on non-A/B DAP, with the flag set:
     - m updatepackage and look at img.zip
     - img_from_target_files
     both have super.img and not system / vendor
Test: on A/B retrofit, with the flag set:
     - m updatepackage and look at img.zip
     - img_from_target_files
     both have super_*.img and system_other.img, but not system / vendor
Bug: 113175337

Change-Id: I94e33091d0c837cae40776176b4dcfdd338aba90
2019-04-29 10:50:42 -07:00
Tao Bao 44e50526f3 releasetools: Accept PRESIGNED keys in apexkeys.txt.
am: 548db7d797

Change-Id: I3a18a2805622d76032eca95b9d7cd886bf1929d9
2019-04-26 16:53:47 -07:00
Tao Bao 7ccec4fe8a Merge "releasetools: GetCareMap supports non-sparse image." am: 0376d7dcbb
am: 3d32417e74

Change-Id: I322fc45909f624667df3f1ec75a8d485ad24ead2
2019-04-26 16:15:46 -07:00
Tao Bao 3d32417e74 Merge "releasetools: GetCareMap supports non-sparse image."
am: 0376d7dcbb

Change-Id: Iec0fd91578944aef61a7b0756f5139a429365395
2019-04-26 16:10:36 -07:00
Tao Bao 0376d7dcbb Merge "releasetools: GetCareMap supports non-sparse image." 2019-04-26 22:59:30 +00:00
Yifan Hong 46f7e88c27 Merge changes from topic "productmanifest" into qt-dev
* changes:
  ota_from_target_files: include metadata when odm / product is changed.
  Add product manifest.
2019-04-26 22:39:01 +00:00
Bill Peckham c27faf6ef1 Merge "Fix missing import." am: 3129d2c971
am: 3891ce9ed4

Change-Id: Iff2c839cd9a0036b1684c222848837ed295df23e
2019-04-25 19:55:02 -07:00
Bill Peckham 3891ce9ed4 Merge "Fix missing import."
am: 3129d2c971

Change-Id: I158729c0f950673419345a73ff8f0b728c116fd4
2019-04-25 19:49:52 -07:00
Bill Peckham 3129d2c971 Merge "Fix missing import." 2019-04-26 02:38:08 +00:00
Yifan Hong 4298a83592 Merge changes from topic "productmanifest" am: 001ebfcb30
am: 4d90d659c8

Change-Id: Ia5d6cf7874e3c7a5b4a9adc34713f4c121bf7136
2019-04-25 16:15:30 -07:00
Yifan Hong 4d90d659c8 Merge changes from topic "productmanifest"
am: 001ebfcb30

Change-Id: Ie7806253b89c01d6344c1ddca3126a23b6ae4ed9
2019-04-25 16:10:36 -07:00
Yifan Hong 001ebfcb30 Merge changes from topic "productmanifest"
* changes:
  ota_from_target_files: include metadata when odm / product is changed.
  Add product manifest.
2019-04-25 22:51:27 +00:00
Bill Peckham 540d91ae3f Fix missing import.
Test: Verify that script runs properly now that import is present.
Change-Id: I255bc6ca2ba1f2cc387001c6f4bf9690a90eb47c
2019-04-25 14:18:16 -07:00
Yifan Hong 51d375610c ota_from_target_files: include metadata when odm / product is changed.
When odm is changed, device manifest/matrices should be included.
When product is changed, framework manifest/matrices should be included.

Bug: 130714844
Bug: 126770403
Test: build with odm and product VINTF metadata

Change-Id: I49c8083e0e7185ae7b96047d68f1f624b1113dfc
2019-04-25 10:22:39 -07:00
Bill Peckham 912d2dff70 Merge "Sort content of merged target files package." am: d540f5a9a5
am: d40f5b6ec0

Change-Id: I80bfda5dd7367e964629c7a4201a5c772ececa90
2019-04-25 09:38:09 -07:00
Bill Peckham d40f5b6ec0 Merge "Sort content of merged target files package."
am: d540f5a9a5

Change-Id: I9204ac1023b2d4bc8c8c2a383e4991bdd700518f
2019-04-25 09:32:57 -07:00
Bill Peckham d540f5a9a5 Merge "Sort content of merged target files package." 2019-04-25 16:19:47 +00:00
Tao Bao 8bdfb990ea releasetools: GetCareMap supports non-sparse image.
Test: `atest --host releasetools_test`
Test: `m dist` with a target that uses non-sparse images.
Test: Run UpdateVerifierTest on blueline.
Change-Id: I8fdebee42fcaac78c2d1be2a84ddb69f46ec701d
2019-04-25 09:15:07 -07:00
Tao Bao 1eef250cd7 Merge "releasetools: Accept PRESIGNED keys in apexkeys.txt." am: b5b055ab50
am: 541468bb9a

Change-Id: Iae7ba723cdda16fcb653bbef760196cca69ce49f
2019-04-25 07:54:01 -07:00
Tao Bao 541468bb9a Merge "releasetools: Accept PRESIGNED keys in apexkeys.txt."
am: b5b055ab50

Change-Id: Ib69611f76e26ad0a78a1468704700ff437dcfe0e
2019-04-25 07:48:52 -07:00
Tao Bao 548db7d797 releasetools: Accept PRESIGNED keys in apexkeys.txt.
For an PRESIGNED APEX, it has the following format, which should be
considered as a valid input.

name="foo.apex" public_key="PRESIGNED" private_key="PRESIGNED" container_certificate="PRESIGNED" container_private_key="PRESIGNED"

Bug: 131153746
Test: Run sign_target_files_apks.py on a target_files.zip with PRESIGNED
      APEXes.
Test: python -m unittest sign_target_files_apks
Change-Id: I51076b0c6eddfb75637d37659a08009f0a88e931
(cherry picked from commit f454c3a0b4)
2019-04-25 00:20:00 -07:00
Tao Bao f454c3a0b4 releasetools: Accept PRESIGNED keys in apexkeys.txt.
For an PRESIGNED APEX, it has the following format, which should be
considered as a valid input.

name="foo.apex" public_key="PRESIGNED" private_key="PRESIGNED" container_certificate="PRESIGNED" container_private_key="PRESIGNED"

Bug: 131153746
Test: Run sign_target_files_apks.py on a target_files.zip with PRESIGNED
      APEXes.
Test: python -m unittest sign_target_files_apks
Change-Id: I51076b0c6eddfb75637d37659a08009f0a88e931
2019-04-25 00:10:07 -07:00
Tao Bao a0176c7676 Merge "releasetools: PRESIGNED APEX container entails PRESIGNED payload." am: a212ab59df
am: ff354bf918

Change-Id: If1f9a101a15a26c728ccd8719cd8b13b80e1cefc
2019-04-24 19:19:11 -07:00
Tao Bao ff354bf918 Merge "releasetools: PRESIGNED APEX container entails PRESIGNED payload."
am: a212ab59df

Change-Id: I24e61e46c4b420bc15f074188efbcff71a337b85
2019-04-24 19:13:58 -07:00
Tao Bao a212ab59df Merge "releasetools: PRESIGNED APEX container entails PRESIGNED payload." 2019-04-25 02:03:50 +00:00
Bill Peckham 9662cfb234 Sort content of merged target files package.
By sorting the content of the final output merged target files package, the
merged target files package is more like the target files packages generated by
a build.

Test: Generate merged target files package, verify that content is sorted.
Change-Id: Ic0c198630ebd7692a3f3f9663d85e4b45229175c
2019-04-24 17:59:01 -07:00
Daniel Norman 93c435dfa8 Merge "Adds support to create img from target files directory instead of zip." am: 74a679d963
am: da27680ccb

Change-Id: Ia69ede2ea164ccd21d525c53da36b7104a27514d
2019-04-24 17:16:47 -07:00
Daniel Norman da27680ccb Merge "Adds support to create img from target files directory instead of zip."
am: 74a679d963

Change-Id: I515fd2c3ed0dc71bbc4999a9b3c283cc196af200
2019-04-24 17:11:41 -07:00
Yifan Hong 2dcc1dcf9c ota_from_target_files: include metadata when odm / product is changed.
When odm is changed, device manifest/matrices should be included.
When product is changed, framework manifest/matrices should be included.

Bug: 130714844
Bug: 126770403
Test: build with odm and product VINTF metadata

Change-Id: I49c8083e0e7185ae7b96047d68f1f624b1113dfc
Merged-In: I49c8083e0e7185ae7b96047d68f1f624b1113dfc
2019-04-24 16:28:49 -07:00
Tao Bao f98fa1094e releasetools: PRESIGNED APEX container entails PRESIGNED payload.
We used to require explicitly setting both (e.g. `-e foo.apex=` and
`--extra_apex_payload_key foo.apex=` to skip signing `foo.apex`).

This CL allows specifying `-e` alone to achieve the same result.
However, if a conflicting `--extra_apex_payload_key` is also specified,
that would be considered as a config error.

Bug: 131153746
Test: Run sign_target_files_apks.py with `-e foo.apex=` alone to skip
      signing foo.apex.
Test: Run sign_target_files_apks.py with `-e foo.apex=` and
      `--extra_apex_payload_key foo.apex=key` and expect assertion error.
Change-Id: Ia747f59ee726b60bdb1445024e749320171064c2
2019-04-24 15:17:23 -07:00
Daniel Norman b8a2f9df51 Adds support to create img from target files directory instead of zip.
This is used by merge_target_files to prevent an unnecessary unzip and
copy.

Test: Ran merge_target_files.py and booted using the img.zip.
Change-Id: I6fe0dd025b30b3f4965c9b22fb6943019bf5899b
2019-04-24 20:53:22 +00:00
Tao Bao 4c6612fbeb Merge "Write ro.build.ab_update to /vendor/build.prop." am: 2f401655a9
am: c233321fd9

Change-Id: I039d09ce3f59203806672d87b487f77edf767528
2019-04-23 15:34:28 -07:00
Tao Bao c233321fd9 Merge "Write ro.build.ab_update to /vendor/build.prop."
am: 2f401655a9

Change-Id: Id6503be1cac99a302cae1df9427e33c00c6f0f90
2019-04-23 15:29:33 -07:00
Tao Bao 2f401655a9 Merge "Write ro.build.ab_update to /vendor/build.prop." 2019-04-23 22:16:48 +00:00
Bowgo Tsai 08aca59c53 Avoid signing debuggable boot-debug.img
The boot-debug.img should NOT be release signed and can only be used
if the device is unlocked. Adding a check to prevent the tool from
signing this debuggable boot.img.

See the following for more details about boot-debug.img:

  https://android-review.googlesource.com/c/platform/build/+/947857

Bug: 126493225
Test: put a file /force_debuggable into boot.img, checks the following
      command fails:
        ./build/tools/releasetools/sign_target_files_apks \
        out/dist/*-target_files-*.zip signed-target_files.zip
Change-Id: Ia5232949cb9582d2b4eaa171d9e9f3fe7317d418
Merged-In: Ia5232949cb9582d2b4eaa171d9e9f3fe7317d418
(cherry picked from commit 78369ebbc1)
2019-04-23 21:00:08 +08:00
Bowgo Tsai 65feee7adb Merge "Avoid signing debuggable boot-debug.img" am: f0151b1514
am: 2b90184d5c

Change-Id: I9f04585f1d216cae12508372d873aa011fb36f45
2019-04-23 00:51:33 -07:00
Bowgo Tsai 2b90184d5c Merge "Avoid signing debuggable boot-debug.img"
am: f0151b1514

Change-Id: Id1c3d08c2ace0fb0189c51f2447fb866a71fc7c8
2019-04-23 00:46:29 -07:00
Bowgo Tsai 78369ebbc1 Avoid signing debuggable boot-debug.img
The boot-debug.img should NOT be release signed and can only be used
if the device is unlocked. Adding a check to prevent the tool from
signing this debuggable boot.img.

See the following for more details about boot-debug.img:

  https://android-review.googlesource.com/c/platform/build/+/947857

Bug: 126493225
Test: put a file /force_debuggable into boot.img, checks the following
      command fails:
        ./build/tools/releasetools/sign_target_files_apks \
        out/dist/*-target_files-*.zip signed-target_files.zip
Change-Id: Ia5232949cb9582d2b4eaa171d9e9f3fe7317d418
2019-04-23 12:55:10 +08:00
Tao Bao 67932ab694 Write ro.build.ab_update to /vendor/build.prop.
It's a vendor-specific property, which was historically included into
/system/build.prop prior to this change.

Whether a target uses A/B OTA shouldn't affect anything on the system
image, including the `ro.build_ab_update` property. Moving it to vendor
partition will also make it consistent with other A/B specific configs,
such as the `slotselect` flag in device fstab
(/vendor/etc/fstab.$(PRODUCT_PLATFORM)).

Bug: 130516531
Test: Build and flash crosshatch-userdebug. Check /system/build.prop,
      /vendor/build.prop and the runtime property.
Change-Id: I927625fbcc02c4a875a1f39850b51576f5ff6c66
2019-04-22 21:08:25 -07:00
Tao Bao f9f4cce315 Merge "releasetools: Update the comment on common.AVB_PARTITIONS." am: 7b3e97b1ea
am: 5a5d4e0d63

Change-Id: Idb1beb657253e682edddeb4ca5ef1270f05dda7d
2019-04-22 20:32:45 -07:00
Tao Bao 5a5d4e0d63 Merge "releasetools: Update the comment on common.AVB_PARTITIONS."
am: 7b3e97b1ea

Change-Id: I7bdbd2e46c79a4ca5c138dd4681448a4ad032bbe
2019-04-22 20:27:34 -07:00
Tao Bao 7b3e97b1ea Merge "releasetools: Update the comment on common.AVB_PARTITIONS." 2019-04-23 03:09:26 +00:00
Daniel Norman e2a848a20d Merge "Adds --output-img flag to enable building the IMG package." am: 235f7d7686
am: a40cffbea9

Change-Id: Ida8357e302152d1e62ff87ff3072102562b7a901
2019-04-18 20:00:53 -07:00
Daniel Norman a40cffbea9 Merge "Adds --output-img flag to enable building the IMG package."
am: 235f7d7686

Change-Id: I8b058ea7e53f39fa9a313da0dd04d70a41a2f548
2019-04-18 19:56:40 -07:00
Treehugger Robot 235f7d7686 Merge "Adds --output-img flag to enable building the IMG package." 2019-04-19 02:43:20 +00:00
Daniel Norman 1bd2a1d946 Adds --output-img flag to enable building the IMG package.
This simplifies the use case for mixed build users. Instead of having to
remember to call img_from_target_files.py after this script, they can
use this flag to automatically create the IMG package.

Also includes an update to super_empty.img logic. The super_empty.img is
now always created for dynamic-partition builds. The flag now only
controls copying the super_empty.img to a user-provided location.

Bug: 129976345
Test: Ran merge_target_files.py using --output-img and
--output-super-empty and inspected the resulting img zip and
super_empty.img.

Change-Id: Ida602942bb7a6b4b94f4e225640af9104fc9360c
2019-04-18 16:37:29 -07:00
Dan Willemsen e531685ba5 TARGET_FS_CONFIG_GEN is a list, not a single path
Bug: 130787336
Test: m oemaids_header_gen oemaids_headers passwd group
Test: Set TARGET_FS_CONFIG_GEN to a list of paths
Change-Id: I5186b378fea8865f46cfd891420ba576f36e2565
Merged-In: I5186b378fea8865f46cfd891420ba576f36e2565
(cherry picked from commit 7f25f2aed9)
2019-04-18 14:26:48 -07:00
Dan Willemsen 699434f783 Merge "TARGET_FS_CONFIG_GEN is a list, not a single path" am: 0d4ee006db
am: a3f7a5fb6d

Change-Id: I547c790021d258be54fe797048522ca5481c5c0f
2019-04-18 12:53:19 -07:00
Dan Willemsen a3f7a5fb6d Merge "TARGET_FS_CONFIG_GEN is a list, not a single path"
am: 0d4ee006db

Change-Id: Ie7733c22baa9a1f401dd5e2244a89e8bdc310a20
2019-04-18 12:48:08 -07:00
Dan Willemsen 7f25f2aed9 TARGET_FS_CONFIG_GEN is a list, not a single path
Bug: 130787336
Test: m oemaids_header_gen oemaids_headers passwd group
Test: Set TARGET_FS_CONFIG_GEN to a list of paths
Change-Id: I5186b378fea8865f46cfd891420ba576f36e2565
2019-04-18 17:16:50 +00:00
Daniel Norman 969025e04e Merge "Runs python formatter and linter over merge_target_files." am: 8551d21cef
am: 99a82fcb0d

Change-Id: Id9637057db627fff245b121b654965cefd39e585
2019-04-17 19:47:46 -07:00
Daniel Norman 99a82fcb0d Merge "Runs python formatter and linter over merge_target_files."
am: 8551d21cef

Change-Id: Ifc1de88529faf40df7506a1a5f29dd672ba4eefe
2019-04-17 19:42:36 -07:00
Daniel Norman 8fb00a71aa Merge changes from topic "merge_target_files_new_flags" am: 324d553c7c
am: b6a15bca81

Change-Id: Ia25149af2e4333a1c7f502aa1abfa25cde3422eb
2019-04-17 16:14:33 -07:00
Daniel Norman b6a15bca81 Merge changes from topic "merge_target_files_new_flags"
am: 324d553c7c

Change-Id: I13966ab6a8a263684385eed483712ba2cd61a539
2019-04-17 15:07:52 -07:00
Daniel Norman e5b134aa02 Runs python formatter and linter over merge_target_files.
Test: python -m unittest test_merge_target_files
Change-Id: I95c8611439a019cd21ba16a93327f35e2035a84d
2019-04-17 14:54:06 -07:00
Daniel Norman 3b64ce1437 Adds --output-ota flag to enable building the OTA package.
This simplifies the use case for mixed build users. Instead of having to
remember to call ota_from_target_files.py after this script, they can
use this flag to automatically create the OTA package.

Bug: 129976345
Test: Ran merge_target_files.py using --output-ota and inspected the
resulting zip.

Change-Id: Icc95943c24b8f83b3221e845a7d69a34c1edb4fc
2019-04-17 10:28:57 -07:00
Daniel Norman f031825560 Adds --output-super-empty flag to enable building super_empty.img.
Any mixed build that uses dynamic partitions will require a
super_empty.img image. This image must be created from the merged
misc_info.txt file, so adding this functionality here simplifies
the creation of this image for users (versus having to call
build_super_image.py manually after calling merge_target_files.py).

Bug: 129976345
Test: Ran merge_target_files.py on a dynamic partition enabled build
using the new --output-super-empty flag.

Change-Id: I73901f363d73c9fae1af1579faa2a908369dbbec
2019-04-17 10:22:11 -07:00
Daniel Norman fdb38817ea Adds output-dir and output-item-list for copying only certain files.
This provides the ability to run merge_target_files without the end goal
of a target files zip. This is useful for users that only want the IMAGES
folder, for example.

Bug: 130304869
Test: python -m unittest test_merge_target_files
Change-Id: If0412b8e1eb85fe09d7b689fd7f56ce84067faea
2019-04-17 10:17:50 -07:00
Tao Bao 5db3c58919 Merge "releasetools: Enable a few tests in OtaFromTargetFilesTest." am: 56215ba930
am: dc0ad08e49

Change-Id: I614c6d54d93cf5e3fb6b603b8640f5652c4dd8d3
2019-04-16 07:27:26 -07:00
Tao Bao dc0ad08e49 Merge "releasetools: Enable a few tests in OtaFromTargetFilesTest."
am: 56215ba930

Change-Id: Iccce31970307dff8bf61d6495ff3a65bff3429ed
2019-04-16 07:22:17 -07:00
Tao Bao 69909c96ba releasetools: Enable a few tests in OtaFromTargetFilesTest.
They used to be disabled due to the assertion of search_path in setUp()
function, which is not a prerequisite for most of the tests.

Bug: 112080715
Test: `atest releasetools_test`
Test: TreeHugger
Change-Id: I3cbaf42aa09dba0b87a64e11d97de9b3f7af7a47
2019-04-15 07:33:32 -07:00
Tao Bao 61a4e5bb67 Merge "relesetools: Enable releasetools_test in presubmit." am: 2bfc94ebc6
am: 4a5539cb99

Change-Id: Ic6ab973716fbdafec6673ab6a0082084b78b6dd9
2019-04-14 08:26:22 -07:00
Tao Bao 4a5539cb99 Merge "relesetools: Enable releasetools_test in presubmit."
am: 2bfc94ebc6

Change-Id: If54e8a9ecd10a4c30fa0c50ec9d3eb1ac03eaa81
2019-04-14 08:21:15 -07:00
Tao Bao 2bfc94ebc6 Merge "relesetools: Enable releasetools_test in presubmit." 2019-04-14 15:09:19 +00:00
Tao Bao d8cdbb7234 Merge "relesetools: Support running all the unittests with atest." am: 2bb1380ee5
am: 74575ccf97

Change-Id: Ib028768aca6a9dda082616c7fb6a5f23ef8e8d11
2019-04-12 20:11:29 -07:00
Yifan Hong 5c53266156 Merge "FileImage: make thread-safe" am: c7b0df0295
am: c9ab0da8d6

Change-Id: I8c755e464d423551bd67829daa28136494bf0697
2019-04-12 20:10:27 -07:00
Tao Bao 74575ccf97 Merge "relesetools: Support running all the unittests with atest."
am: 2bb1380ee5

Change-Id: I825d3c87468773f8b543dae6b885957684ab0f85
2019-04-12 19:16:41 -07:00
Yifan Hong c9ab0da8d6 Merge "FileImage: make thread-safe"
am: c7b0df0295

Change-Id: I7fc0b214ad3e68192bd952c339e77fb17a2e8376
2019-04-12 19:15:53 -07:00
Tao Bao 2bb1380ee5 Merge "relesetools: Support running all the unittests with atest." 2019-04-13 01:50:09 +00:00
Yifan Hong 210ede323f FileImage: make thread-safe
FileImage needs to be thread-safe because multiple
threads gets data from it when an incremental OTA
package is created.

Test: apply incremental OTA on cuttlefish
Bug: 113175337
Change-Id: I31637fce0fbd66f3fa6c5c478da09bae65a52229
Merged-In: I31637fce0fbd66f3fa6c5c478da09bae65a52229
2019-04-12 15:59:03 -07:00
Yifan Hong 55988c4677 FileImage: make thread-safe
FileImage needs to be thread-safe because multiple
threads gets data from it when an incremental OTA
package is created.

Test: apply incremental OTA on cuttlefish
Bug: 113175337
Change-Id: I31637fce0fbd66f3fa6c5c478da09bae65a52229
2019-04-12 15:38:48 -07:00
Tao Bao 82490d3de1 relesetools: Enable releasetools_test in presubmit.
About half of the testcases rely on external tools (i.e. the ones in
`otatools.zip`, which are external to releasetools module, but still
built by Android). It's WAI as releasetools scripts are mostly for
gluing purpose.

However, the current support in Soong doesn't allow packing the helper
modules as part of the built releasetools_test. This CL adds a decorator
that allows declaring external dependencies in testcases, which will be
skipped while running in presubmit. It doesn't affect local invocation
of `atest releasetools_test`.

Fixes: 112080715
Test: `atest releasetools_test`
Test: TreeHugger; check that releasetools_test is invoked (and test
      passes).
Change-Id: I8fdeb6549023cf5ddeb79d610c7c37cf9f13d3cc
2019-04-12 15:26:35 -07:00
Tao Bao 30e31142ce relesetools: Support running all the unittests with atest.
All the unittests will be built into releasetools_test. One can run the
tests with `atest releasetools_test` or the traditional way
`test_utils.py`. The atest way is recommended, which additionally builds
the required tools.

With the current support in Soong, we can't pack the built tools into
releasetools_test yet. So running `releasetools_test` alone in clound
would fail. Follow-up CLs will address the issue in order to deploy the
tests with TEST_MAPPING.

Bug: 112080715
Test: `atest releasetools_test`
Change-Id: Ica95517a5ab326f4e58fc57c6c2c276cfe882f3c
2019-04-12 15:26:32 -07:00
Yifan Hong 50db54519e Allow generating OTA package from non-sparse images.
Test: build OTA package in cuttlefish

Bug: 120041578
Bug: 113175337
Change-Id: I246c38e08376c837b7f126aa19cb8c1d73ed1e26
Merged-In: I246c38e08376c837b7f126aa19cb8c1d73ed1e26
2019-04-12 10:48:29 -07:00
Yifan Hong 508850e298 Fix DataImage.ReadRangeSet()
It returns a list of one generator object, not a list
of strings.

Test: test_blockimgdiff
Bug: 113175337

Change-Id: I8962c539c2ce3fae90d428b38c4b0e52c5a2cdad
Merged-In: I8962c539c2ce3fae90d428b38c4b0e52c5a2cdad
2019-04-12 10:48:21 -07:00
Tao Bao 222bba6253 releasetools: Remove the name restriction in common.GetSparseImage.
The function used to be serving system and vendor partitions only (as
they were the only partitions using sparse image at the point). The code
itself doesn't rely on anything specific to system/vendor.

Test: python -m unittest test_common
Bug: 113175337

Change-Id: Ia4ecdeedb262f3d9db082128eaf9bab299983333
Merged-In: Ia4ecdeedb262f3d9db082128eaf9bab299983333
2019-04-12 10:47:53 -07:00
Yifan Hong d3535bf3da Merge "Allow generating OTA package from non-sparse images." am: fc6948b588
am: a5228f33ef

Change-Id: Iecf0354d30534406799ca008ded3186c2eaccadf
2019-04-12 10:42:33 -07:00
Yifan Hong a5228f33ef Merge "Allow generating OTA package from non-sparse images."
am: fc6948b588

Change-Id: I94350a926540fee777b0471264ae091b0aed34df
2019-04-12 10:34:47 -07:00
Yifan Hong fc6948b588 Merge "Allow generating OTA package from non-sparse images." 2019-04-12 17:21:46 +00:00
TreeHugger Robot f9dca5e1d8 Merge "Convert oemaids_headers / passwd / group to Soong" into qt-dev 2019-04-12 16:06:59 +00:00
Tianjie Xu cd797a289f Merge "Pass the correct signature size to payload generator" into qt-dev 2019-04-12 01:21:45 +00:00
Dan Willemsen c9f016f8e2 Merge "Convert oemaids_headers / passwd / group to Soong" am: 74a2572b99
am: 079d855245

Change-Id: I890d2f9b1f4067d904ced3fe7f5b7409ece050e3
2019-04-11 16:48:46 -07:00
Dan Willemsen 079d855245 Merge "Convert oemaids_headers / passwd / group to Soong"
am: 74a2572b99

Change-Id: I1e54ee9d10f6ad0bc1a3e1e07bbcc3b4f5674220
2019-04-11 16:43:27 -07:00
Dan Willemsen b9d45c7d47 Convert oemaids_headers / passwd / group to Soong
Bug: 118089258
Test: m oemaids_header_gen oemaids_headers passwd group
Change-Id: Ie3b92a499b44391e0692da5d9ad067089a62aabb
Merged-In: Ie3b92a499b44391e0692da5d9ad067089a62aabb
(cherry picked from commit d32e6d1314)
2019-04-11 16:41:22 -07:00
Treehugger Robot 74a2572b99 Merge "Convert oemaids_headers / passwd / group to Soong" 2019-04-11 23:36:09 +00:00
TreeHugger Robot c028b0e155 Merge "docker: update sha256sum for repo version 1.25" into qt-dev 2019-04-11 21:52:23 +00:00
Yifan Hong 8a66a71b06 Allow generating OTA package from non-sparse images.
Test: build OTA package in cuttlefish

Bug: 120041578
Change-Id: I246c38e08376c837b7f126aa19cb8c1d73ed1e26
2019-04-11 14:38:21 -07:00
xunchang 3c5de18f5d Pass the correct signature size to payload generator
The signature size will be 512 bytes when signing the payload
with 4096 bits key. This cl determines the key size with
"openssl rsa -modulus"

The new key in testdata is generated by
"openssl genrsa -out testkey 4096"

Bug: 129163830
Test: generate and verify an OTA package
Change-Id: I6662b0a0c553dc0fd84711312a1256b887e332fd
(cherry picked from commit 376cc7c452)
2019-04-11 21:04:28 +00:00
Pavel Salomatov a77dea9865 docker: update sha256sum for repo version 1.25
Fixes: 130366091
Change-Id: Iaec4b2429c61aa2d804e56a88cf66ae543a29805
Merged-In: Iaec4b2429c61aa2d804e56a88cf66ae543a29805
(cherry picked from commit 4a7f6daa85)
2019-04-11 13:38:05 -07:00
Pavel Salomatov 72d32944ea Merge "docker: update sha256sum for repo version 1.25" am: 2eb9692618
am: b26ab68b26

Change-Id: I01aa9c257e6caa5058b49a89d98684e3bf45d91a
2019-04-11 12:44:42 -07:00
Pavel Salomatov b26ab68b26 Merge "docker: update sha256sum for repo version 1.25"
am: 2eb9692618

Change-Id: I45584dc394af3216b42e2a564c7ac62094699975
2019-04-11 12:39:33 -07:00
Treehugger Robot 2eb9692618 Merge "docker: update sha256sum for repo version 1.25" 2019-04-11 19:21:12 +00:00
Tao Bao b31763217c Merge "releasetools: Remove the name restriction in common.GetSparseImage." am: 33b8923ded
am: f84391e27c

Change-Id: If8c1bf239134b58492abe9c063243ef165893c04
2019-04-11 11:12:24 -07:00
Tao Bao f84391e27c Merge "releasetools: Remove the name restriction in common.GetSparseImage."
am: 33b8923ded

Change-Id: I2ebcc0105a8a9743ce569f34fd68692afd458500
2019-04-11 11:01:18 -07:00
Tao Bao 33b8923ded Merge "releasetools: Remove the name restriction in common.GetSparseImage." 2019-04-11 17:51:43 +00:00
Yifan Hong 0d8e89b5f8 Reland "Only assert-max-image-size for static partitions."
assert-max-image-size doesn't make sense for
dynamic partitions, as build_image.py always find the
right size for the output image. Hence:

- build_image.py no longer need to write generated_*_info.txt
  (which contains the size of the image).
- assert-max-image-size on the static BOARD_*IMAGE_PARTITION_SIZE. If
  a partition is dynamic, that variable isn't set, and
  assert-max-image-size becomes a no-op. If the partition is static,
  assert-max-image-size checks the static partition size as it used
  to be.
- Fix read-size-of-partitions to use the size of the partition by
  reading the image directly (instead of using generated_*_info.txt).

For devices without AVB, with DAP enabled, and does not have
RESERVED_SIZE for partitions, because of right sizing, the original
code always warns about approaching size limits. Since such checks
doesn't make sense for dynamic partitions, remove them.

Test: builds on device with dynamic partitions
Test: builds on cuttlefish with DAP enabled (without AVB), no
      more size limit warnings:
WARNING: out/target/product/vsoc_x86/vendor.img approaching size limit (X now; limit X)

This reverts commit 6e099095d1.

Reason for revert: reland the CL

Bug: 122377935
Test: build blueline_mainline

Change-Id: Iee594b64e687decff186c0fa60f82b88608febe9
Merged-In: Iee594b64e687decff186c0fa60f82b88608febe9
2019-04-11 10:12:27 -07:00
Yifan Hong cf9f9bedb8 sparse_img.py --get_partition_size return size of partition
Also, move code from build_super_image.py to sparse_img.py.

Test: sparse_img.py on sparse and non-sparse images
Bug: 122377935
Change-Id: Ie91fdfdbb54298ea27eb20d1b5363aeb1470356e
Merged-In: Ie91fdfdbb54298ea27eb20d1b5363aeb1470356e
2019-04-11 10:12:27 -07:00
Pavel Salomatov 4a7f6daa85 docker: update sha256sum for repo version 1.25
Change-Id: Iaec4b2429c61aa2d804e56a88cf66ae543a29805
2019-04-11 13:25:33 +03:00