Commit Graph

7218 Commits

Author SHA1 Message Date
Tianjie Xu
f53f313c36 Merge "Update the argument when signing aftl" 2020-04-21 22:39:31 +00:00
Tianjie
20dd8f20b1 Update the argument when signing aftl
The arguments transparency_log_servers and transparency_log_pub_keys
have been merged. Update the caller in the OTA script accordingly.

Also disable the test to contact aftl server until we have
a public server.

Bug: 153940575
Test: check the argument
Change-Id: If6a7e7d644884d395c75c2fcdfd6aa7c2380d851
2020-04-21 22:38:55 +00:00
Treehugger Robot
958f84ba06 Merge "support multiple boot.img files in release tools" am: dd9690162f am: cb1cefee02
Change-Id: I79f9e6753e2d950442c7c14233e163b82fb4d645
2020-04-20 08:49:10 +00:00
Steve Muckle
9793cf6c8a support multiple boot.img files in release tools
Support for generating multiple boot.img files is required in the
release tools to enable GKI distribution/signing.

Bug: 151094943
Change-Id: I536a286d3123f35918106a52c49b1148d746370f
2020-04-16 17:54:25 -07:00
Treehugger Robot
dbd9d4b3d0 Merge "Enable non-v3 recovery image with v3 boot image" am: 44bb05c328 am: 1c8e2eaf4a
Change-Id: Ic80192e5526e6b748a2a058a495613f14e3513b0
2020-04-14 23:13:25 +00:00
Steve Muckle
759d0c8cb2 Enable non-v3 recovery image with v3 boot image
Add support for building a non-v3 recovery image along with a
v3 boot.img and vendor_boot image.

Bug: 150825361
Change-Id: I80d4e71ff09b83dd1c7f9accb4de99a30f95f4bf
Merged-In: I80d4e71ff09b83dd1c7f9accb4de99a30f95f4bf
2020-04-14 15:40:01 -07:00
Steve Muckle
f84668e1da Enable non-v3 recovery image with v3 boot image
Add support for building a non-v3 recovery image along with a
v3 boot.img and vendor_boot image.

Bug: 150825361
Change-Id: I80d4e71ff09b83dd1c7f9accb4de99a30f95f4bf
2020-04-14 13:03:58 -07:00
Jaewoong Jung
e57fb1a3aa Merge "Add signing certificate lineage file support." 2020-04-07 22:33:25 +00:00
Jaewoong Jung
95445e6913 Add signing certificate lineage file support.
Also add multi-cert support to prebuilt apps so that they can benefit
from the new lineage feature.

(This is a cherry-pick change.)

Test: m GoogleServicesFramework w/ modified build rules
Test: m PrebuiltGmsCore w/ modified build rules
Test: apksigner lineage -v --print-certs -in <built_module_path>
Fixes: 152897457
Change-Id: If7d5d4bd308629c8340231520214c76c8a568a65
Merged-In: If7d5d4bd308629c8340231520214c76c8a568a65
2020-04-06 13:42:23 -07:00
Jaewoong Jung
d47e378af2 Add signing certificate lineage file support. am: e2348338e4
Change-Id: Id142f70b02ae46e734ff788e0cc5186138103df6
2020-04-06 20:01:02 +00:00
Bill Peckham
fea68e1e58 Merge "Ensure that merge_target_files.py prints INFO level logs." am: f6baf822ac am: d4b082e369
Change-Id: Ic7aaf7de258e6896f6f0a4a59eeea066456b4a93
2020-04-06 19:41:47 +00:00
Bill Peckham
f6baf822ac Merge "Ensure that merge_target_files.py prints INFO level logs." 2020-04-06 19:00:56 +00:00
Jaewoong Jung
e2348338e4 Add signing certificate lineage file support.
Also add multi-cert support to prebuilt apps so that they can benefit
from the new lineage feature.

Test: m GoogleServicesFramework w/ modified build rules
Test: m PrebuiltGmsCore w/ modified build rules
Test: apksigner lineage -v --print-certs -in <built_module_path>
Fixes: 152897457
Change-Id: If7d5d4bd308629c8340231520214c76c8a568a65
2020-04-06 10:19:15 -07:00
Tianjie Xu
d69bf2cca3 Merge "Change the parameter type of offset in read" am: 0889aaeeae am: 0ee4d0eb4a
Change-Id: I6a6484ed21287cd86fae63ea7d5815d1bdf4c78b
2020-04-04 20:39:31 +00:00
Tianjie Xu
0889aaeeae Merge "Change the parameter type of offset in read" 2020-04-04 20:00:20 +00:00
Bill Peckham
13a8deafa9 Merge "Make the partition= tag optional." am: 0447be9904 am: 50884909c9
Change-Id: Ib035136ae20fbe5aedf0563d130ccde165de94c1
2020-04-04 04:47:52 +00:00
Bill Peckham
96c9e6ed00 Make the partition= tag optional.
Since we might use ToT release tools to sign a package
generated by an older build, we make the new
`partition=` tag optional. This also means we need to be
careful to use non-greedy regex matching.

Bug: 153133823
Test: python3 -m unittest
Test: input with and without the new `partition=` tag
Test: new test_ReadApkCerts_WithWithoutOptionalFields
Change-Id: Ic57efd34e745ad302ae17150c6f2318f0b4524cb
Merged-In: Ic57efd34e745ad302ae17150c6f2318f0b4524cb
2020-04-03 21:23:04 -07:00
Bill Peckham
cb84817fdf Ensure that merge_target_files.py prints INFO level logs.
Bug: 153166596
Test: Run a merge build, inspect logs.
Change-Id: Ic2795f26922db32030c7ab7eb4ec6f153c1e9654
2020-04-04 04:20:45 +00:00
Bill Peckham
5c7b034a5c Make the partition= tag optional.
Since we might use ToT release tools to sign a package
generated by an older build, we make the new
`partition=` tag optional. This also means we need to be
careful to use non-greedy regex matching.

Bug: 153133823
Test: python3 -m unittest
Test: input with and without the new `partition=` tag
Test: new test_ReadApkCerts_WithWithoutOptionalFields
Change-Id: Ic57efd34e745ad302ae17150c6f2318f0b4524cb
2020-04-03 17:09:37 -07:00
Tom Cherry
9c0c1e8025 Merge "Include private/fs_config.h directly when needed" am: 8c7a4f6fc1 am: 2c331226d1
Change-Id: I3aabcde187d9798e8744d7bfe3937b0f2a926648
2020-04-03 15:16:31 +00:00
Tom Cherry
8c7a4f6fc1 Merge "Include private/fs_config.h directly when needed" 2020-04-03 14:36:58 +00:00
Tianjie Xu
9c4ded29f7 Merge "Add aftltool is a signing parameter" am: 2995096483 am: b91c3201a6
Change-Id: I49eda8001a57ef9b001c1e3aec2b7cb2f0fc2b19
2020-04-02 18:46:14 +00:00
Tianjie Xu
2995096483 Merge "Add aftltool is a signing parameter" 2020-04-02 18:09:59 +00:00
Bill Peckham
8676f639f3 Build merged apexkeys.txt/apkcerts.txt by partition.
Propagate partition tag data to apexkeys.txt and
apkcerts.txt so that merge_target_files.py can build
merged versions of these files by filtering the
framework files for framework partitions and filtering
the vendor files for vendor partitions.

Bug: 138942268
Change-Id: Ic3226728e97dae84d38ec230ccc86d1b124bea94
Merged-In: Ic3226728e97dae84d38ec230ccc86d1b124bea94
2020-04-02 17:16:01 +00:00
Kiyoung Kim
6684d4e2b5 Merge "Build required modules from default" am: 39197f846b am: 364c9d8993
Change-Id: If66364b179a29758a2605722138f5f8e46791496
2020-04-02 06:58:54 +00:00
Tianjie
2751d2b8f3 Change the parameter type of offset in read
As we support zip64 in libziparchive, we change the parameter of
the ReadAtOffset() in zip reader from uin32_t to off64_t. So the
derived class needs to be updated as well.

Bug: 150900468
Test: build
Change-Id: Icbfd2dd54b01ff62da988ba8598c1057f9bb6368
2020-04-02 06:16:43 +00:00
Kiyoung Kim
39197f846b Merge "Build required modules from default" 2020-04-02 06:14:43 +00:00
Tianjie
0f3074566c Add aftltool is a signing parameter
Right now we assert that the aftltool should exist since the one
in aosp won't work due to grpc dependencies.

Bug: 147870995
Test: build
Change-Id: Iabb2c375167572a965493a7648fdc1abe287af67
2020-04-01 12:20:21 -07:00
Kiyoung Kim
0a8d26210e Build required modules from default
Some required modules from host tool (such as imgdiff) are bound to
required from releasetools_common, but unfortunately required modules
from python_library_host does not work (b/140144201). To make this work
we should mark dependency from each host tool.

Bug: 152258157
Test: Build succeeded without system image
Change-Id: Iedfda9b48d78687d8f622b818eeb93896d4f119d
2020-04-01 14:21:01 +00:00
Tianjie Xu
715a8c7f4f Merge "Add aftl inclusion proof" am: a3541df291 am: 0a75716351
Change-Id: I606fb30775c3d34a3d0ec42c09955af4d127dee3
2020-03-31 22:43:51 +00:00
Tianjie Xu
a3541df291 Merge "Add aftl inclusion proof" 2020-03-31 22:12:46 +00:00
Bill Peckham
5af467fbe6 Merge "Build merged apexkeys.txt/apkcerts.txt by partition." am: ad10b96768 am: 3eb546a636
Change-Id: I29fb3c6bc8c8497a9168d8efcbe1ddaa5ea0e71a
2020-03-31 14:14:49 +00:00
Bill Peckham
19c3feb2d3 Build merged apexkeys.txt/apkcerts.txt by partition.
Propagate partition tag data to apexkeys.txt and
apkcerts.txt so that merge_target_files.py can build
merged versions of these files by filtering the
framework files for framework partitions and filtering
the vendor files for vendor partitions.

Bug: 138942268
Change-Id: Ic3226728e97dae84d38ec230ccc86d1b124bea94
2020-03-30 22:33:27 +00:00
Baligh Uddin
639b3b7a65 Continue to pass in --signing_helper for avbtool.
BUG: 152424931
Test: Tested Locally
Change-Id: I4e93a899b9055c937980a496f20b35c01ccbb4c1
2020-03-29 22:05:27 -07:00
Treehugger Robot
a7c4fc397d Merge "releasetools: Add missing log format specifier" am: 8b3c9a1b40 am: 48c6b5817d
Change-Id: Ie7d323906fb55ca4548ad997557773a5c6b58083
2020-03-27 23:08:57 +00:00
Treehugger Robot
8b3c9a1b40 Merge "releasetools: Add missing log format specifier" 2020-03-27 22:26:42 +00:00
Anton Hansson
15fc5c3afd Merge "releasetools: Add signapk as required modules" am: a75f379c9f am: 5f0f63e8f4
Change-Id: Iaecb2ea796314724e09a13425c4fd58686e7467d
2020-03-27 21:04:02 +00:00
Luca Stefani
88e1a14523 releasetools: Add missing log format specifier
Test: m otapackage
Change-Id: I273cf315400dd2b624d2853ece0c30c6fb3d529d
2020-03-27 13:07:56 +00:00
Luca Stefani
3e4b44868b releasetools: Add signapk as required modules
* common.py requires the signapk jar

Test: m otapackage ( before it was broken )
Change-Id: Ic0cff0a21258cb1e7d1ced5553a940dcf5cd6d04
2020-03-27 13:05:21 +00:00
Chirayu Desai
96a913e7f4 releasetools: Use du -b
* When $OUT is on a compressed disk,
  `du -k -s` might not return the correct sizes.
* Adding `-b` gets us close to the actual size.

toybox commit: https://github.com/landley/toybox/pull/177

Test: m, builds and boots.
Devices: crosshatch blueline bonito sargo (anything with dynamic partitions)
2020-03-27 04:17:45 +05:30
Songchun Fan
f6d7c8d7b4 Merge "[signapk] new flag to request v4 signing" into rvc-dev am: dbe0ab56f3
Change-Id: I598fcb502cfc9af0c6ff13504b7b039bbdd46919
2020-03-26 18:03:41 +00:00
Songchun Fan
dbe0ab56f3 Merge "[signapk] new flag to request v4 signing" into rvc-dev 2020-03-26 17:48:19 +00:00
Baligh Uddin
dd87b2211f Continue to pass in --signing_helper for avbtool. am: 0d40e21e8d
Change-Id: I34e584c38cab962b1cc32b06bc670c70856c823b
2020-03-26 08:31:39 +00:00
Baligh Uddin
0d40e21e8d Continue to pass in --signing_helper for avbtool.
BUG: 152424931
Test: Tested Locally
Change-Id: I4e93a899b9055c937980a496f20b35c01ccbb4c1
2020-03-26 04:41:29 +00:00
Songchun Fan
ce42b253b7 [signapk] new flag to request v4 signing
If this flag is enabled, the v4 signature file, named [outputApkFile].idsig
will be generated along side the outputApkFile.

Test: atest PackageManagerShellCommandIncrementalTest
BUG: 149354175
Change-Id: I5bc78bbc8b666a490f3ab05e781bfd859575af58
2020-03-25 17:15:28 -07:00
Tianjie
a28c52661b Build the payload image only during apk-in-apex signing
When doing apk-in-apex signing, the package name is not reserved
during the apex repacking. As a result, the name accidentally
reverts to 'com.android.wifi' from 'com.google.android.wifi'.

This cl changes the behavior to call 'apexer' by passing the
'--payload_only' argument. So we don't build the apex file from
scratch and the old AndroidManifest.xml will be reused.

BUG: 152084536
Test: unit tests pass
Change-Id: I8332b2ee84832fb196f2e1c4309abac5ab92e153
Merged-In: I8332b2ee84832fb196f2e1c4309abac5ab92e153
2020-03-24 19:20:48 +00:00
Baligh Uddin
981947b8b1 Merge "Build the payload image only during apk-in-apex signing" am: b1ad7c6dc7 am: f9f112c6b8
Change-Id: Id357ba5a8cf40040ca2ce1b62ff995a64a69ef37
2020-03-24 05:23:02 +00:00
Baligh Uddin
b1ad7c6dc7 Merge "Build the payload image only during apk-in-apex signing" 2020-03-24 04:54:29 +00:00
Tianjie
c180a5d222 Build the payload image only during apk-in-apex signing
When doing apk-in-apex signing, the package name is not reserved
during the apex repacking. As a result, the name accidentally
reverts to 'com.android.wifi' from 'com.google.android.wifi'.

This cl changes the behavior to call 'apexer' by passing the
'--payload_only' argument. So we don't build the apex file from
scratch and the old AndroidManifest.xml will be reused.

Test: 152084536
Bug: unit tests pass
Change-Id: I8332b2ee84832fb196f2e1c4309abac5ab92e153
2020-03-23 18:15:34 -07:00
Yifan Hong
174b5be0bb Also check empty SKU if SKUS are not defined
In the case when both ODM_MANIFEST_SKUS and ODM_MANIFEST_FILE are
both empty, also checks VINTF compatibility for empty SKU case.

Same for device manifest. Although right now, DEVICE_MANIFEST_FILE and
DEVICE_MANIFEST_SKUS cannot be both empty (because libvintf requires
vendor manifest exists barring manifest fragments), let libvintf throws
an error for this case. In the build system, simply handle vendor manifest
the same way as ODM manifest.

Fixes: 148601741
Test: manual
Change-Id: Ia0655fd4d37f6286b164a3221ec4b2716f29147d
Merged-In: Ia0655fd4d37f6286b164a3221ec4b2716f29147d
2020-03-19 21:36:59 +00:00