Commit Graph

52344 Commits

Author SHA1 Message Date
Yifan Hong
5aec484888 Merge "Add supernod build target."
am: 691defc4bd

Change-Id: I5716c6a8028bb6c7beaf2ecbdd6ea28e44ad07ec
2019-03-18 17:06:47 -07:00
Yifan Hong
691defc4bd Merge "Add supernod build target." 2019-03-18 23:46:05 +00:00
Tao Bao
7f0951757e Merge "releasetools: Fix an issue when using APEX container key mapping." am: 7cd870ed60 am: f9a68d8167
am: 0891df1563

Change-Id: Id1edceb9e3666d325af602aad20206cf1937596f
2019-03-18 14:52:13 -07:00
Tao Bao
0891df1563 Merge "releasetools: Fix an issue when using APEX container key mapping." am: 7cd870ed60
am: f9a68d8167

Change-Id: I5ca4a4fc836ee9f25c4f8bcf02275000e08d77ca
2019-03-18 14:38:59 -07:00
Tao Bao
f9a68d8167 Merge "releasetools: Fix an issue when using APEX container key mapping."
am: 7cd870ed60

Change-Id: I3124312baf6f3e40a00f8c2bb079fa3155197828
2019-03-18 14:34:51 -07:00
Tao Bao
7cd870ed60 Merge "releasetools: Fix an issue when using APEX container key mapping." 2019-03-18 21:28:46 +00:00
Colin Cross
3ecb9c4fdd Add a dependency on boot jars $(LOCAL_BUILT_MODULE)
After I25163e91886cea6941afa25cdb529ed053278dcb there is no longer
a dependency on $(LOCAL_BUILT_MODULE) for boot jars, as boot.art
is installed instead.  Add a dependency from boot.art to
$(LOCAL_BUILT_MODULE) so that $(LOCAL_BUILT_MODULE) and its
dependencies (which may include jacoco-report-classes.jar) is
copied for every build.

Fixes: 127702563
Test: forrest
Change-Id: I4db2d1f5fe2e1141fe93317cd7a2a58a33f8fbff
2019-03-18 13:17:22 -07:00
Anton Hansson
dc017122fb Read product/device RRO dirs separately from soong
This change splits the LOCAL_SOONG_RRO_DIRS into two,
representing RRO dirs that originated from device and
product overlay configs, respectively.

Also plumb the device/product configs in separately.

Bug: 127758779
Test: verify noop on presubmit targets
Change-Id: Iddee1b4d7303b7ecaeced91216ea82fe29123770
2019-03-18 19:39:51 +00:00
Daniel Norman
a4911da57d Adds optional --rebuild_recovery flag to merge_target_files.
Also makes AddSystem check that an output_zip exists before attempting
to add the recovery patch to the output zip.

Bug: 128838154
Test: Running merge_target_files with --rebuild_recovery and verifying
it passes --rebuild_recovery to add_img_to_target_files.
Change-Id: I19347b2c0dabf29b7196045b18551b5d0687df2c
2019-03-18 12:29:31 -07:00
Yifan Hong
889b1f7c0c Allow disabling building super partition for DAP devices
Previously:
if (DAP && !BUILD_SUPER) error;

Now:
if (BUILD_SUPER && !DAP) error;

This allows DAP devices to disable building super partition when the OEM
doesn't want to. The ability to build super partition shouldn't be
a requirement of enabling DAP; rather, building super partition requires
DAP to be enabled.

To do this on a device, PRODUCT_BUILD_SUPER_PARTITION should be set
to false explicitly. If it is unset, it will use the value of
PRODUCT_USE_DYNAMIC_PARTITIONS.

Bug: 127687287
Test: set PRODUCT_BUILD_SUPER_PARTITION to false and build dist

Change-Id: I25f1866e61d73affb445c1aec042cf53aac93583
2019-03-18 11:48:03 -07:00
Chih-hung Hsieh
ca4f099cba Merge "Remove redundant per-file *" am: e7854a3745 am: 2f6a69ef5b
am: 9d883220d3

Change-Id: I32da9bbbed5858448ca40ac2b5b69619c8480f29
2019-03-18 11:07:41 -07:00
Chih-hung Hsieh
9d883220d3 Merge "Remove redundant per-file *" am: e7854a3745
am: 2f6a69ef5b

Change-Id: I88d542373e74f1af39e9ea2cf3e59e3e96c44244
2019-03-18 11:03:25 -07:00
Chih-hung Hsieh
2f6a69ef5b Merge "Remove redundant per-file *"
am: e7854a3745

Change-Id: I055704f0b9eb183a9914ff6f5f326bdbbc94b834
2019-03-18 10:59:57 -07:00
Chih-hung Hsieh
e7854a3745 Merge "Remove redundant per-file *" 2019-03-18 17:36:49 +00:00
Tao Bao
fa9de0aae8 releasetools: Fix an issue when using APEX container key mapping.
The keys_info in the touched code is a tuple, which is immutable.

Bug: 123716522
Test: Run sign_target_files_apks.py with '-e foo.apex=bar' that replaces
      the APEX container key.

Change-Id: I4e57e46c93a56b7f6646764d021ebb42c19bf7f5
2019-03-18 10:26:09 -07:00
Chih-Hung Hsieh
648129394f Remove redundant per-file *
Now per-file inherits global owners by default.

Bug: 128838191
Test: upload validator and [FIND OWNERS]
Change-Id: I58fb3cc8f2f277a5aa4b3372734197d888e59bcc
2019-03-18 10:21:15 -07:00
Anton Hansson
08231e1786 Refactor generate_enforce_rro
A few tweaks to make it easier to extend to generating RROs in
multiple partitions:
- deduce the module name inside generate_enforce_rro
- dedup rule definition
- tweak framework-res check to use source module name instead

Bug: 127758779
Test: verify noop on presubmit targets
Change-Id: I2f0d6270b21f5427c372c04a5c6e7fb712e72a9a
2019-03-18 14:21:09 +00:00
SzuWei Lin
b3ba5843f2 Merge "Disable RescueParty in GSI temporary" am: 39f88f9c28 am: b9bf035c60
am: ff91a64d85

Change-Id: Ic120b0cb84de828548772f59712ee680f31aa73d
2019-03-18 04:27:41 -07:00
SzuWei Lin
ff91a64d85 Merge "Disable RescueParty in GSI temporary" am: 39f88f9c28
am: b9bf035c60

Change-Id: I0421201be1d31533f55b6ef252c34d7a2b0e6734
2019-03-18 04:23:31 -07:00
SzuWei Lin
b9bf035c60 Merge "Disable RescueParty in GSI temporary"
am: 39f88f9c28

Change-Id: Ia8898e6c076e71be8108c246b46bee7071fed12a
2019-03-18 04:19:22 -07:00
Treehugger Robot
39f88f9c28 Merge "Disable RescueParty in GSI temporary" 2019-03-18 11:12:45 +00:00
Po-Chien Hsueh
a1380a54a4 Rename module DynamicAndroidInstallationService
Rename this module to DynamicSystemInstallationService per one of
the API review suggestions.

Bug: 126613281
Test: build, install, and check the module is there
Change-Id: I2b1d2ba787c8d76f770ede23e90b4e09f7e4c143
2019-03-18 07:15:50 +00:00
Tao Bao
5208545b40 releasetools: Support signing APEXes.
Bug: 123716522
Test: Run sign_target_files_apks.py to sign a target_files with APEXes.
Test: Run check_target_files_signatures.py on signed artifact.
Test: python -m unittest test_sign_target_files_apks
Change-Id: I3fa13e3d9461cf5e0838e0572d436e218164fe41
(cherry picked from commit aa7e993a22)
2019-03-17 14:00:28 -07:00
Tao Bao
315f19d548 releasetools: Add apex_utils.py.
The added `testdata/testkey_with_passwd.key` is generated with:

$ openssl pkcs8 -inform DER -in testdata/testkey_with_passwd.pk8 \
    -out testdata/testkey_with_passwd.key -passin pass:foo

Bug: 123716522
Test: python -m unittest test_apex_utils
Change-Id: I7b7f00178ecab35c3e41ecf4d10295fe9bf480ab
(cherry picked from commit 1cd59f2a26)
2019-03-17 14:00:14 -07:00
Tao Bao
9d9de37999 Revert "Add ability to sign bundled APEX into device signing process."
This reverts commit b3517c0d18.

Bug: 123716522
Test: N/A (done with the re-landing CLs)
Change-Id: I6e6232826b7b1eadce435ef88afdd51ade49fcf0
2019-03-17 13:59:48 -07:00
Tao Bao
35a7add43f releasetools: check_target_files_signatures.py checks APEXes.
Only the container certs will be checked and reported. For the payload
within an APEX, we can't easily extract the cert info.

It needs to go along a longer path, if ever needed, by:
 - extracting public keys from all the available certs;
 - using each of them to verify against an APEX payload to find a match
   (`avbtool verify_image --image payload --key public_key`).

Bug: 123716522
Test: Run check_target_files_signatures.py on target_files with APEXes.
Change-Id: I2ef318e05433d2d65ab84e2dff9e01fb6ee3373d
(cherry picked from commit d8469727bc)
2019-03-17 13:16:39 -07:00
Baligh Uddin
ec37f2f308 [automerger skipped] Merge changes I3fa13e3d,I7b7f0017,I2ef318e0 am: 0573298a18 am: eb5af6fa98
am: c06511285c -s ours
am skip reason: SHA1 c06511285c skipped by user tbao

Change-Id: I8323d98024aff6ec6c546f154580794938d58f59
2019-03-17 13:09:55 -07:00
Baligh Uddin
c06511285c Merge changes I3fa13e3d,I7b7f0017,I2ef318e0 am: 0573298a18
am: eb5af6fa98

Change-Id: I2e1b59b584baf4c4af50fb414e06557d2e41b159
2019-03-17 11:58:28 -07:00
Baligh Uddin
eb5af6fa98 Merge changes I3fa13e3d,I7b7f0017,I2ef318e0
am: 0573298a18

Change-Id: I89a00b65ec6c9c44ccd0d43eda6c9f8049749f04
2019-03-17 11:54:41 -07:00
Baligh Uddin
0573298a18 Merge changes I3fa13e3d,I7b7f0017,I2ef318e0
* changes:
  releasetools: Support signing APEXes.
  releasetools: Add apex_utils.py.
  releasetools: check_target_files_signatures.py checks APEXes.
2019-03-17 18:49:48 +00:00
Anton Hansson
b7ee86ff85 Refactor and further simplify the RRO logic
Make the runtime vs static resource overlays a little clearer.
This will help adding more logic around determining if an RRO
needs to be generated in /vendor, /product or both.

Bug: 127758779
Test: verify noop on presubmit targets
Change-Id: I43111a1d9bb3405c559faaef56a75a5ad7672ba0
2019-03-16 15:52:30 +00:00
Tao Bao
aa7e993a22 releasetools: Support signing APEXes.
Bug: 123716522
Test: Run sign_target_files_apks.py to sign a target_files with APEXes.
Test: Run check_target_files_signatures.py on signed artifact.
Test: python -m unittest test_sign_target_files_apks
Change-Id: I3fa13e3d9461cf5e0838e0572d436e218164fe41
2019-03-15 22:15:51 -07:00
Tao Bao
1cd59f2a26 releasetools: Add apex_utils.py.
The added `testdata/testkey_with_passwd.key` is generated with:

$ openssl pkcs8 -inform DER -in testdata/testkey_with_passwd.pk8 \
    -out testdata/testkey_with_passwd.key -passin pass:foo

Bug: 123716522
Test: python -m unittest test_apex_utils
Change-Id: I7b7f00178ecab35c3e41ecf4d10295fe9bf480ab
2019-03-15 22:08:42 -07:00
Tao Bao
d8469727bc releasetools: check_target_files_signatures.py checks APEXes.
Only the container certs will be checked and reported. For the payload
within an APEX, we can't easily extract the cert info.

It needs to go along a longer path, if ever needed, by:
 - extracting public keys from all the available certs;
 - using each of them to verify against an APEX payload to find a match
   (`avbtool verify_image --image payload --key public_key`).

Bug: 123716522
Test: Run check_target_files_signatures.py on target_files with APEXes.
Change-Id: I2ef318e05433d2d65ab84e2dff9e01fb6ee3373d
2019-03-15 20:56:13 -07:00
Tao Bao
7026c13851 Merge changes I1f645008,Ic68c019f am: 015f83137d am: 3f759a23ce
am: d532b602fd

Change-Id: I1804a5bd8b5427ceaeb130ab08c75d4eecfaf01f
2019-03-15 20:55:17 -07:00
Tao Bao
d532b602fd Merge changes I1f645008,Ic68c019f am: 015f83137d
am: 3f759a23ce

Change-Id: Id4801bb75a8f2805a9340aade61646a0b79568a2
2019-03-15 20:51:06 -07:00
Tao Bao
3f759a23ce Merge changes I1f645008,Ic68c019f
am: 015f83137d

Change-Id: I20ae63c891848d0426259b066265e7423a7ed5c8
2019-03-15 20:47:13 -07:00
Tao Bao
015f83137d Merge changes I1f645008,Ic68c019f
* changes:
  releasetools: Add common.ExtractAvbPublicKey().
  releasetools: Initalize logger when signing.
2019-03-16 03:38:07 +00:00
Benjamin Gordon
9204856d11 Merge "Add stoney ridge x86 variant" am: 8c2881034a am: b3a6164a9b
am: 9c676bb5a8

Change-Id: I006c21cf4035bf0d0bfda3d5b7a93ed0955e53be
2019-03-15 15:57:00 -07:00
Benjamin Gordon
9c676bb5a8 Merge "Add stoney ridge x86 variant" am: 8c2881034a
am: b3a6164a9b

Change-Id: Ief0e31de64b0bc9ccc7e11941a114241599f2aa4
2019-03-15 15:40:01 -07:00
Benjamin Gordon
b3a6164a9b Merge "Add stoney ridge x86 variant"
am: 8c2881034a

Change-Id: I43d012b9755e593b3b5c34c88254b51b52f63201
2019-03-15 15:33:32 -07:00
Treehugger Robot
8c2881034a Merge "Add stoney ridge x86 variant" 2019-03-15 21:41:32 +00:00
Tao Bao
2cc0ca1770 releasetools: Add common.ExtractAvbPublicKey().
Bug: 123716522
Test: python -m unittest test_common
Change-Id: I1f645008a14cc882ef280f169c36e4b14a53ef88
2019-03-15 10:47:46 -07:00
Anton Hansson
fd06b02b30 Add comments and slight refactor auto-RRO logic
Make it a bit clearer what this code is intended to do.

Bug: 127758779
Test: verify noop on presubmit targets
Change-Id: Ic405fc5d4601b9f0a91b4d24caa06f279267c51a
2019-03-15 17:03:53 +00:00
Tao Bao
badceb2d60 releasetools: Initalize logger when signing.
Other modules have switched to logging module. sign_target_files_apks.py
needs to init the logger to get the logs.

Test: Run `sign_target_files_apks.py -v`. Check outputs.
Test: Run `check_target_files_signatures.py -v`.
Change-Id: Ic68c019f6fb14840561885f1194ad6efdfdb7d82
2019-03-15 09:53:00 -07:00
Tao Bao
22f3f54345 Merge "Include charger.recovery for recovery." am: bc2f9ce2c1 am: f740f57ca8
am: 1efdbad8ea

Change-Id: Id9211411d0234a0a264422a8c426cb251a58cd5b
2019-03-14 10:17:00 -07:00
Tao Bao
1efdbad8ea Merge "Include charger.recovery for recovery." am: bc2f9ce2c1
am: f740f57ca8

Change-Id: Ia3406c346b883421d9195c1c85f877070b1b2198
2019-03-14 10:10:57 -07:00
Tao Bao
f740f57ca8 Merge "Include charger.recovery for recovery."
am: bc2f9ce2c1

Change-Id: I438b1f645bcc6e9021284e9839bc9a1ee06f1b52
2019-03-14 10:05:51 -07:00
Tao Bao
bc2f9ce2c1 Merge "Include charger.recovery for recovery." 2019-03-14 16:56:29 +00:00
SzuWei Lin
4fff0440b0 Disable RescueParty in GSI temporary
RescueParty reboot the device to recovery mode if there is any
priv app die continuously. The behavior blocks the testing.
Disable the feature temporary before all problem apps fixed.

Bug: 120679683
Test: Boot a device with GSI and a die app
Test: Unplug USB and does not auto reboot
Change-Id: I70e5b7222299c6d0173d87e41d7a68beeda77dd5
2019-03-14 22:43:02 +08:00