Commit graph

67404 commits

Author SHA1 Message Date
Martin Stjernholm
c481de01b7 Move ART APEX selection logic to core make.
It's moved from art/Android.mk that won't be available in platform
builds without ART sources.

This also ensures we depend on com.android.art directly on
PRODUCT_PACKAGES and not through LOCAL_REQUIRED_MODULES which was the
case in com.android.art-autoselect. When com.android.art is overridden
through an `overrides` field, the logic in main.mk drops it from
PRODUCT_PACKAGES, but it doesn't consider overrides when processing
LOCAL_REQUIRED_MODULES dependencies.

Bug: 172480617
Test: `m` with PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD
  set to true and false
Test: `m` on userdebug and eng builds
Change-Id: Ia606de691fe20ac19f2ca9af362408606e71b11c
2021-02-17 08:28:07 +00:00
Treehugger Robot
b1cb721609 Merge changes from topic "vendor_property_enforce" am: 32b84909a1
Original change: https://android-review.googlesource.com/c/platform/build/+/1571847

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6fe47933b9600784a0490663250d535259162f58
2021-02-17 07:47:40 +00:00
Inseob Kim
e4cd7c8c34 Add BUILD_BROKEN_VENDOR_PROPERTY_NAMESPACE to BoardConfig am: 43f4ef0221
Original change: https://android-review.googlesource.com/c/platform/build/+/1571846

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0d9e63485641d92b16ce58007dabf083c6760e2f
2021-02-17 07:47:34 +00:00
Inseob Kim
59ac4ba1a9 Add PRODUCT_SHIPPING_API_LEVEL to productVariables am: a0884b90ae
Original change: https://android-review.googlesource.com/c/platform/build/+/1532065

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6529c13595544ca77108b30caaac9aaf0819b4fa
2021-02-17 07:47:15 +00:00
Treehugger Robot
32b84909a1 Merge changes from topic "vendor_property_enforce"
* changes:
  Set BUILD_BROKEN_VENDOR_PROPERTY_NAMESPACE for goldfish
  Add BUILD_BROKEN_VENDOR_PROPERTY_NAMESPACE to BoardConfig
  Add PRODUCT_SHIPPING_API_LEVEL to productVariables
2021-02-17 07:12:30 +00:00
Treehugger Robot
4e65e3d319 Merge "Remove LOCAL_LICENSE_KINDS from core makefiles." am: 6d89e4a9e1
Original change: https://android-review.googlesource.com/c/platform/build/+/1589812

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I36309b81f9fc021d3a4b2835f643a07e80e6248f
2021-02-16 17:55:54 +00:00
Treehugger Robot
6d89e4a9e1 Merge "Remove LOCAL_LICENSE_KINDS from core makefiles." 2021-02-16 17:30:47 +00:00
Bob Badour
17831e3da3 Remove LOCAL_LICENSE_KINDS from core makefiles.
Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all
Change-Id: I4deec3e07862e89dd32880774efb4624a9723cf2
2021-02-16 04:37:23 -08:00
Treehugger Robot
27d927752e Merge "[LSC] Add LOCAL_LICENSE_KINDS to build/make" am: 14201eb3a3
Original change: https://android-review.googlesource.com/c/platform/build/+/1589084

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie84c75d37f4f3a79aee3fa75f304eae1e1a7fee3
2021-02-15 23:48:06 +00:00
Treehugger Robot
14201eb3a3 Merge "[LSC] Add LOCAL_LICENSE_KINDS to build/make" 2021-02-15 23:21:48 +00:00
Martin Stjernholm
20c9c03ba7 Merge "Build the ART modules from source if they are listed in TARGET_BUILD_APPS." am: ae2af082ca
Original change: https://android-review.googlesource.com/c/platform/build/+/1587752

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0689ec5821c87d7dee17989782ae86bbc24a6c98
2021-02-15 11:19:00 +00:00
Martin Stjernholm
ae2af082ca Merge "Build the ART modules from source if they are listed in TARGET_BUILD_APPS." 2021-02-15 10:53:50 +00:00
Yo Chiang
d7c8c787fd Merge "Kernel modules: add modules.blocklist build support" am: b84604198c
Original change: https://android-review.googlesource.com/c/platform/build/+/1575046

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8ab6a5f1d71f64e157227a273035ac372c1eb956
2021-02-15 07:18:17 +00:00
Yo Chiang
b84604198c Merge "Kernel modules: add modules.blocklist build support" 2021-02-15 06:45:57 +00:00
Bob Badour
0390580262 [LSC] Add LOCAL_LICENSE_KINDS to build/make
Added SPDX-license-identifier-Apache-2.0 to:
  target/product/sysconfig/Android.bp
  tools/apicheck/Android.bp
  tools/product_config/Android.bp
  tools/releasetools/Android.bp
  tools/signapk/Android.bp
  tools/signtos/Android.bp
  tools/zipalign/Android.bp
  tools/ziptime/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
    SPDX-license-identifier-CC-BY SPDX-license-identifier-GPL
    SPDX-license-identifier-GPL-2.0 SPDX-license-identifier-LGPL
    SPDX-license-identifier-MIT legacy_not_a_contribution
    legacy_restricted
to:
  Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
    SPDX-license-identifier-CC-BY SPDX-license-identifier-GPL
    SPDX-license-identifier-MIT
to:
  tools/Android.bp
  tools/droiddoc/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
    SPDX-license-identifier-GPL SPDX-license-identifier-GPL-2.0
    SPDX-license-identifier-LGPL SPDX-license-identifier-MIT
to:
  core/base_rules.mk
  core/dex_preopt_libart.mk
  core/package_internal.mk

Added SPDX-license-identifier-Apache-2.0 legacy_not_a_contribution
to:
  target/board/Android.mk

Added legacy_restricted
to:
  core/tasks/tools/package-modules.mk
  target/product/gsi/Android.bp
  target/product/gsi/Android.mk
  target/product/security/Android.bp
  target/product/security/Android.mk
  tools/acp/Android.bp
  tools/atree/Android.bp
  tools/fs_config/Android.bp
  tools/fs_config/Android.mk
  tools/fs_get_stats/Android.bp
  tools/libhost/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: Id67a4eb1312940f999643b2ae57f45f34f120724
2021-02-14 10:37:20 -08:00
Yo Chiang
384b0b319a Merge "Revert "Set PRODUCT_SHIPPING_API_LEVEL in gsi_release.mk"" am: 25d0acf00f
Original change: https://android-review.googlesource.com/c/platform/build/+/1588251

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia0c1996abb31ce4787eb166f3c1b2cbb2147f2b8
2021-02-13 09:09:23 +00:00
Yo Chiang
25d0acf00f Merge "Revert "Set PRODUCT_SHIPPING_API_LEVEL in gsi_release.mk"" 2021-02-13 06:09:36 +00:00
Yo Chiang
1178673d5e Revert "Set PRODUCT_SHIPPING_API_LEVEL in gsi_release.mk"
This reverts commit ecaa592310.

Reason for revert: b/177495407#comment9 breaks aosp_arm

Exempt-From-Owner-Approval: Clean revert

Change-Id: If4586901fc1806c5394a385c8686ef5fd8748f24
2021-02-13 06:08:54 +00:00
Martin Stjernholm
f4bf5d5e62 Build the ART modules from source if they are listed in
TARGET_BUILD_APPS.

Test: Run build_mainline_modules.sh and check that
      SOONG_CONFIG_art_module_source_build is true even if the fallback
      default is false.
Bug: 172480615
Change-Id: Ie0e9566d4d09b1e54af00c06021aa355adcf0a1a
2021-02-12 21:20:40 +00:00
Ulyana Trafimovich
3111c4a5c1 Merge "Preserve <uses-library> order in dexpreopt.config files." am: e5511ed739
Original change: https://android-review.googlesource.com/c/platform/build/+/1584867

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I511e0a01b3e4536aa44568266a54ff2e691bb6e0
2021-02-12 10:50:47 +00:00
Ulyana Trafimovich
e5511ed739 Merge "Preserve <uses-library> order in dexpreopt.config files." 2021-02-12 10:22:39 +00:00
Yo Chiang
e42e3a293b Merge "Set PRODUCT_SHIPPING_API_LEVEL in gsi_release.mk" am: 2ecbebdcd2
Original change: https://android-review.googlesource.com/c/platform/build/+/1553835

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6ab7a853dceaae32bf6d35211d83dd20c6ae4903
2021-02-12 10:08:43 +00:00
Yo Chiang
2ecbebdcd2 Merge "Set PRODUCT_SHIPPING_API_LEVEL in gsi_release.mk" 2021-02-12 09:35:55 +00:00
Chih-Hung Hsieh
2e4fdbdda1 Do not append empty DEFAULT_TIDY_HEADER_DIRS
* Default value will be empty and not work in -header-filter.

Bug: 179530304
Test: make with WITH_TIDY=1 and various setting of DEFAULT_TIDY_HEADER_DIRS
Change-Id: I3f784f545acd12285a5bf6dcae1bab42c9185fe7
2021-02-11 22:36:04 -08:00
Treehugger Robot
484b38abc0 Merge "Fix error where otacerts in VENDOR_BOOT isn't replaced" am: 3c1a6ee5ad
Original change: https://android-review.googlesource.com/c/platform/build/+/1585506

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7bfd53d68d1a0e05134c7cf38564b535bb10118c
2021-02-12 06:23:15 +00:00
Treehugger Robot
3c1a6ee5ad Merge "Fix error where otacerts in VENDOR_BOOT isn't replaced" 2021-02-12 06:06:11 +00:00
Treehugger Robot
fe91376e45 Merge "Fix signing errors where some partitions aren't properly signed" am: ba106847ff
Original change: https://android-review.googlesource.com/c/platform/build/+/1583044

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Idb540ef7dd15d5354d175266f4b5327b131c2604
2021-02-12 05:25:30 +00:00
Treehugger Robot
e4165d37bf Merge changes Icd25d2d0,I39ef10b0,I06bb80fe am: d3f5268dfb
Original change: https://android-review.googlesource.com/c/platform/build/+/1554917

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iad2825ed6072f276b51594fb382b23220a6f6cc4
2021-02-12 05:25:01 +00:00
Treehugger Robot
c4a28af710 Merge "Check for existence of private key before generating OTA" am: 2adfd28cdb
Original change: https://android-review.googlesource.com/c/platform/build/+/1581144

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia180da93cfe14bcf9190a2366df41b4695696e6f
2021-02-12 05:21:16 +00:00
Treehugger Robot
3f9b50a2bd Merge "Prevent SPL downgrade OTAs from generating" am: 28aab78e53
Original change: https://android-review.googlesource.com/c/platform/build/+/1581143

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I93838ef94f6d132d5d889e59fbb4cb2e293c33b6
2021-02-12 05:17:15 +00:00
Treehugger Robot
ba106847ff Merge "Fix signing errors where some partitions aren't properly signed" 2021-02-12 04:29:44 +00:00
Treehugger Robot
d3f5268dfb Merge changes Icd25d2d0,I39ef10b0,I06bb80fe
* changes:
  Rearrange the methods on ErrorReporter to be more convenient.
  Add glue to run product-config-test as a standalone commandline executable.
  CommandException to cleanly exit product-config on error.
2021-02-12 04:03:44 +00:00
Treehugger Robot
2adfd28cdb Merge "Check for existence of private key before generating OTA" 2021-02-12 02:32:03 +00:00
Treehugger Robot
28aab78e53 Merge "Prevent SPL downgrade OTAs from generating" 2021-02-12 02:28:59 +00:00
Kelvin Zhang
9f781ff907 Fix error where otacerts in VENDOR_BOOT isn't replaced
Test: sign a target_file, check otacerts.zip
Bug: 180025432

Change-Id: I918c3772a6de83314d76884dff3b26a85ed66eb2
2021-02-11 20:14:24 -05:00
Kelvin Zhang
119f279455 Fix signing errors where some partitions aren't properly signed
Rewrite build.prop of all partitions

Test: sign an target_file, check build prop of partitions

Bug: 179186447
Bug: 180025432

Change-Id: I01249532dc2df1b6d9ec8d0be58424a76814b53e
2021-02-11 19:51:05 -05:00
Kelvin Zhang
eb586efe6f Check for existence of private key before generating OTA
At the end of OTA generation, we will use some private key to sign the
OTA payload. Since signing happens after the payload is being generated,
if caller passes an incorrect key path, caller won't notice it until 1
hour later when delta_generator finishes. At which point caller has to
staart from scratch, pass in another key path, and wait for an hour.
Let's detect incorrect key path before calling delta_generator, so
caller will get an error message right at beginning.

Test: th
Change-Id: Iefb1e0a9ed86f82664be1675afb84c020ec28fe7
2021-02-11 19:06:09 -05:00
Kelvin Zhang
80ff466780 Prevent SPL downgrade OTAs from generating
Previously we allow all spl downgrade OTA to generate. But applying such
OTA often causes device to hang and rollback, because keymaster refuses
to attach if it detects spl downgrade. When such error happens, it's
really hard to debug. So instead of debugging a mysterious boot failure,
let''s prevent such OTA from generating in the first place.

Test: th
Bug: 178584781

Change-Id: I8e271862d804e86b16aea70424b4d3e289d43cc9
2021-02-11 19:06:08 -05:00
Peter Kalauskas
449e59c8fb Merge "Fix pm.dexopt.first-boot for eng builds" am: a632e7f855
Original change: https://android-review.googlesource.com/c/platform/build/+/1584212

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic426d540a6103a9834bcdfda8bfbd908be98707a
2021-02-11 19:43:08 +00:00
Peter Kalauskas
a632e7f855 Merge "Fix pm.dexopt.first-boot for eng builds" 2021-02-11 18:57:45 +00:00
Peter Kalauskas
9255f59f9b Fix pm.dexopt.first-boot for eng builds
Fix pm.dexopt.first-boot missing on -eng builds causing device not to
boot

Test: Build -eng target, confirm device boots
Bug: 179990152
Change-Id: Ic963a0f7db5a39aff6198842c468de99e4949900
2021-02-11 10:45:08 -08:00
Ulya Trafimovich
8edad8f7a3 Preserve <uses-library> order in dexpreopt.config files.
Library order is important because it is used to construct class loader
context, which is then written into OAT/ODEX files and chacked against
class loader context constructed by PackageManager on the device. If the
orders are different, dexpreopted code is rejected.

This CL fixes a few problems that caused reordering:

- 'filter' function arguments are swapped so that patterns list comes
  first, and the library list second

- JSON representation of class loader context is changed to avoid
  unmarshaling it to Go maps, which may reorder keys

- library list is no longer sorted (it's unclear why it was sorted)

Bug: 132357300
Test: lunch cf_x86_64_phone-userdebug && m && launch_cvd \
      adb wait-for-device && adb root && adb logcat \
      | grep -E 'ClassLoaderContext [a-z ]+ mismatch'
      # empty grep output, no errors
Change-Id: Ie76996d497e60da0948f1879d6db589ff3e968a2
2021-02-11 17:09:19 +00:00
Oli Lan
7b31d8bd2e Merge "Add build task for cts_root." am: b976c07d85
Original change: https://android-review.googlesource.com/c/platform/build/+/1582998

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I737330c64b28b46081ee8db60257f34f04e1aafd
2021-02-11 14:49:24 +00:00
Martin Stjernholm
9f75812ba0 Merge "Ensure ART module prebuilts aren't used in sanitizer builds." am: a06d64be37
Original change: https://android-review.googlesource.com/c/platform/build/+/1584783

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Icabc28d81deb44e4fa7f829e2a952c077c5ac89c
2021-02-11 14:48:44 +00:00
Oli Lan
b976c07d85 Merge "Add build task for cts_root." 2021-02-11 14:30:39 +00:00
Martin Stjernholm
a06d64be37 Merge "Ensure ART module prebuilts aren't used in sanitizer builds." 2021-02-11 14:26:06 +00:00
Oli Lan
9c8cafe38f Add build task for cts_root.
This adds the configuration necessary to allow the cts_root
test suite to be built.

Bug: 162933947
Test: m cts_root
Merged-In: I4732bf82d3cedc77e30d7fa5eff285d382992853
Change-Id: I4732bf82d3cedc77e30d7fa5eff285d382992853
2021-02-11 10:34:01 +00:00
Joe Onorato
dc5ee8ff02 Add tool to find problems with build repeatability.
Bug: 169701728
Test: build/make/tools/exercise_compare_builds
Change-Id: I6905f04e8b14f572a3b7f76e8f5fb7829c478f05
2021-02-11 08:52:44 +00:00
Martin Stjernholm
52d0490d9b Ensure ART module prebuilts aren't used in sanitizer builds.
Change-Id: I128e116e182ba937ecb603f5ba92516a28cb28f9
Test: presubmits
Bug: 172480615
2021-02-11 08:06:43 +00:00
Sasha Smundak
94da140c70 Mark PRODUCT_SUPPORTS_xxx variables as single item instead of list
Evidenced by assignments across code base.

Test: treehugger
Bug: 116769560
Change-Id: I900217fc5745d3c29f844b968f9abc338b3a56ff
2021-02-10 22:36:25 -08:00