Commit graph

49234 commits

Author SHA1 Message Date
Bowgo Tsai
26b0a26e3e Using a test key to sign boot-debug.img if needed
When /boot partition is chained in AVB signing, libavb will try to
read AVB footer from the end of /boot partition, even if the device is
unlocked. However, this makes device unbootable when the unsigned
boot-debug.img is flashed on /boot partition. This CL uses a test key
from external/avb to sign the boot-debug.img if /boot partition is
chained.

Bug: 126493225
Bug: 129508966
Test: Enables chain partition for boot.img, `make bootimage_debug` then
      checks `avbtool info_image --image $OUT/boot-debug.img`
Test: `make bootimage_debug-nodeps`
Test: boot a device with a chained boot-debug.img

Change-Id: I870cb70c70b7d4d7a30b77bed58cbca6e007d5e3
2019-05-04 09:01:09 +08:00
Treehugger Robot
1c5610915f Merge "BUILD_(HOST|TARGET)_TEST_CONFIG errors by default" 2019-05-03 00:47:09 +00:00
Dan Willemsen
64eaddf6c8 BUILD_(HOST|TARGET)_TEST_CONFIG errors by default
They've been warnings for two weeks, with no reports of problems,
and no warnings in the logs that I can search.

Fixes: 130723115
Fixes: 130734993
Test: treehugger
Change-Id: I61b8b5f35905d45fa7cab9914580ae6c005e83dc
2019-05-02 22:17:12 +00:00
Calin Juravle
c23e013814 Merge "Rename PRODUCT_USES_ART to PRODUCT_USES_DEFAULT_ART_CONFIG" 2019-05-02 17:56:11 +00:00
Treehugger Robot
ad52781bdc Merge "allow actually 140MB vendor partition space" 2019-05-02 16:16:41 +00:00
Tao Bao
65e41c4236 Merge "releasetools: Skip on empty care_map." 2019-05-02 15:35:55 +00:00
Lajos Molnar
bf77eecd3d allow actually 140MB vendor partition space
Bug: 129710438
Change-Id: I93bfe7f25f16a8e48871db7357ec587c21dcc7d6
Merged-In: I93bfe7f25f16a8e48871db7357ec587c21dcc7d6
2019-05-02 15:18:33 +00:00
Martin Stjernholm
a6dc671385 Merge "Add libs that have been resolved to the library absence check." 2019-05-02 14:05:46 +00:00
Martin Stjernholm
ee30c73c63 Add libs that have been resolved to the library absence check.
Note: libtombstoned_client.so was moved from the Runtime APEX to system with
http://r.android.com/941388.

Test: m systemimage
Bug: 124293228
Bug: 131587358
Change-Id: I9e517d3c2344b39cf2743a34723572e646675677
2019-05-02 12:01:02 +01:00
Anton Hansson
8a408a5d9f Merge "Don't sign auto-generated RROs with platform cert" 2019-05-02 10:50:57 +00: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
Calin Juravle
cdff6b1451 Rename PRODUCT_USES_ART to PRODUCT_USES_DEFAULT_ART_CONFIG
It better describes what is meant to represent.

Test: m build
Change-Id: I942721cee2c7eaef625bf8c64aae32c1725705eb
2019-05-01 15:35:03 -07:00
Mathieu Chartier
3b77053daf Merge "Add PRODUCT_DEX_PREOPT_RESOLVE_STARTUP_STRINGS" 2019-05-01 20:29:20 +00:00
Anton Hansson
1739f23404 Merge "Remove unneeded bootimage properties" 2019-05-01 20:10:31 +00:00
Anton Hansson
0db6e92129 Don't sign auto-generated RROs with platform cert
Preinstalled overlays needn't be signed with the same cert
as the package it overlays, simply being preinstalled is
enough. Sign with the default cert instead for now, which
provides fewer special privileges.

Bug: 129373833
Test: internal overlay test
Change-Id: Ie18f7ff749e3f079600f74203664bcb6d11f9d6a
2019-05-01 16:42:56 +01:00
Anton Hansson
f299889513 Remove unneeded bootimage properties
These were added as part of http://r.android.com/731514, but
most of these properties make no sense for the bootimage. Revert
to only defining date, date.utc and fingerprint.

Bug: 131066061
Test: inspect vendor/build.prop
Test: boot, no SELinux warnings for removed props
Change-Id: Ibbeff9870a5b71e83c2cceeb1327b12600077b23
2019-05-01 13:20:27 +01:00
Mathieu Chartier
b9dc792b19 Add PRODUCT_DEX_PREOPT_RESOLVE_STARTUP_STRINGS
For enabling per product configuration of resolving startup
const strings.

Bug: 130217075
Bug: 131310042
Test: make

(cherry picked from commit b37c79c3a2)

Merged-In: I51cb8931b915a710ab584f954b7a99c7a651d914
Change-Id: I0ecc7823620bca9f252b3d91b82982db91dd248d
2019-04-30 17:00:19 -07:00
Yifan Hong
a2488b7d85 Merge "Add BOARD_SUPER_IMAGE_IN_UPDATE_PACKAGE flag." 2019-04-30 19:49:12 +00:00
Treehugger Robot
ab0ed975f0 Merge "Removing --flag 2 when building GSI vbmeta.img" 2019-04-30 08:06:34 +00: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
0376d7dcbb Merge "releasetools: GetCareMap supports non-sparse image." 2019-04-26 22:59:30 +00:00
Yifan Hong
8bfcc69e38 Merge "Add BOARD_BUILD_SUPER_IMAGE_BY_DEFAULT flag." 2019-04-26 21:30:07 +00:00
Yifan Hong
484a6e53c1 Merge "Fix mainline_mixed build" 2019-04-26 20:56:25 +00:00
Yifan Hong
7e6397c2d5 Fix mainline_mixed build
build_mixed script can't merge system and product VINTF
data yet.

Fixes: 131418170
Bug: 131425279
Test: build 'target_files_package' for 'mainline_system_google_arm64',
see META/system_manifest.xml

Change-Id: I366d9bc802ee0e6bdf8fe480303f3fee827c579d
2019-04-26 12:30:31 -07:00
Treehugger Robot
4ec15d2c50 Merge "Remove libjavacrypto from system image." 2019-04-26 18:00:38 +00:00
Treehugger Robot
eccbfd5f4e Merge "Ignore vndk-* subdirectories in the library absence check." 2019-04-26 14:23:54 +00:00
Martin Stjernholm
60bb358221 Ignore vndk-* subdirectories in the library absence check.
They only contain prebuilts from older releases.

Test: m systemimage on affected internal lunch targets
Bug: 124293228
Change-Id: I059c9d0edb78e52838a25cef0472807847d77417
2019-04-26 12:12:34 +00:00
Pete Bentley
f9dd05f1bf Remove libjavacrypto from system image.
The only copy needed is the one in the Conscrypt APEX.

Bug: 123925742
Test: m
Change-Id: Ieea8549d047750cf3580d6fe0204fdf55b6b8394
2019-04-26 10:28:16 +01:00
Bill Peckham
3129d2c971 Merge "Fix missing import." 2019-04-26 02:38:08 +00: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
acd862aed3 Add BOARD_BUILD_SUPER_IMAGE_BY_DEFAULT flag.
If set to true,
- super.img is built from images in $PRODUCT_OUT
- super.img is built to $PRODUCT_OUT
- super.img is built when 'make'.

'make dist' still builds super image from images in target files to
intermediates directory.

This flag is useful for virtual devices, but isn't intended to be set for
actual devices. For actual devices, userspace fastboot should flash
super_empty.img and individual user images separately.

Test: on cuttlefish (flag is set),
      make            # generates $OUT/super.img
      make superimage # generates $OUT/super.img
Test: on real non-retrofit DAP device (flag is not set)
      make            # no super.img is generated
      make superimage # generates $OUT/obj/PACKAGING/.../super.img
      make dist       # generates out/dist/super.img

Bug: 113175337

Change-Id: Ieb81e4fbb663bb4b69e9962c3fa9f16b03aeb907
2019-04-25 10:51:35 -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
Yifan Hong
51e87262c2 Add product manifest.
- Rename framework_manifest.xml to system_manifest.xml since that's more accurate.
- Add product_manifest.xml to base_product.mk
- Add product_manifest.xml to verified_assembled_framework_manifest.xml to check
  it at build time.

Bug: 126770403
Bug: 130714844
Bug: 80547152

Test: build and inspect output
Test: lshal

Change-Id: I1b447d8c36f72768e28e9bcaa4d06afdeba08c2a
2019-04-25 10:22:36 -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
b5b055ab50 Merge "releasetools: Accept PRESIGNED keys in apexkeys.txt." 2019-04-25 14:34:00 +00:00
Treehugger Robot
23cbf2b1b5 Merge "Build contexts files with Soong" 2019-04-25 07:46:19 +00: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
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
Treehugger Robot
74a679d963 Merge "Adds support to create img from target files directory instead of zip." 2019-04-24 23:53:19 +00:00
Treehugger Robot
7d9b575fb3 Merge "Support LOCAL_SOONG_PROGUARD_DICT in soong_java_prebuilt.mk" 2019-04-24 22:30:12 +00: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
Treehugger Robot
ff14c47182 Merge "Clean up LOCAL_DONT_DELETE_JAR_META_INF" 2019-04-24 15:08:28 +00:00
Treehugger Robot
2938f08385 Merge "Fix build error for no-ramdisk targets" 2019-04-24 14:48:59 +00:00
Bowgo Tsai
1578e23991 Fix build error for no-ramdisk targets
In some build targets, e.g., aosp_arm64_ab, $OUT/ramdisk is an empty
dir, and leads to rsync $OUT/ramdisk/* failure. Removing the trailing
asterisk to avoid throwing an error if it's empty. Note that the
trailing slash still needs to be kept to avoid creating an additional
directory level at the destination.

Bug: 126493225
Test: `make ramdisk_debug` on aosp_arm64_ab
Test: flash boot-debug.img on crosshatch still can adb root
Change-Id: I44937324379fa78fc26a4471ba94eb7694911c2d
Merged-In: I44937324379fa78fc26a4471ba94eb7694911c2d
2019-04-24 09:01:49 +00:00
Treehugger Robot
913478401a Merge "Fix aosp_arm64 build error when make ramdisk_debug" 2019-04-24 06:53:14 +00:00
Bowgo Tsai
c3e8cc9bd1 Fix aosp_arm64 build error when make ramdisk_debug
Some targets have ramdisk.img but no boot.img, howerver,
ramdisk-debug.img only depends on boot.img. Fix this by making
ramdisk-debug.img depends on ramdisk.img.

Bug: 126493225
Test: make ramdisk_debug
Change-Id: I65120a3b3372712fafc26442354ee031eede0bd3
2019-04-24 04:55:10 +00:00