Commit Graph

21967 Commits

Author SHA1 Message Date
Colin Cross 665ebbe471 Fix turbine classpath arguments in Make
We were passing "--classpath foo.jar --classpath bar.jar" to turbine,
it now wants (and may always have expected?)
"--classpath foo.jar bar.jar".

This is equivalent to Ib7e0ca64a34e236110f7b785d6a0fb51ed75567e in
Soong.

Test: m java
Change-Id: I061ebf302a215c66b1923056716b60bf0160d9bc
2019-11-01 13:35:17 -07:00
Colin Cross f0add55066 Use system modules for turbine in Make
turbine supports taking system modules on the command line,
now that we target Java language level 1.9 and use system modules
by default switch turbine to match javac.

This is equivalent to Ieee07502151da0d5693bb8929213d495c039106b
in Soong.

Test: m java
Change-Id: Ib91c6f57b316f48f1ab819e4e1d2dc2e0ee42988
2019-11-01 13:34:46 -07:00
Yifan Hong 3a7c2ef7cc Reland "Move partition size checks to python script"
This reverts commit 0141e45b96.

Reason for revert: Fixed in follow-up CL
Test: forrest
Bug: 143734706

Change-Id: I007acf228d4fb4d6a16ae9089e3f04cf33a567bb
2019-11-01 11:41:26 -07:00
Ulya Trafimovich 5877cec1fa Disable dexpreopt on targets that do not include default ART config.
Dexpreopt build commands should only be generated on targets that
include build/make/target/product/runtime_libart.mk, which sets the
necessary variables such as PRODUCT_SYSTEM_DEFAULT_PROPERTIES that
contain default values passed to dex2oat. This file also sets a
variable PRODUCT_USES_DEFAULT_ART_CONFIG that is used in
build/make/core/dex_preopt.mk to decide if boot images should be
installed.

On some targets build/make/target/product/runtime_libart.mk is not
included. Prior to this patch, on such targets invalid dexpreopt
commands were generated, but not used, so they did not cause any
visible build failures. The invalid commands can be grepped as:

  lunch qemu_trusty_arm64-userdebug && m nothing \
    && fgrep -e '-Xms ' $ANDROID_BUILD_TOP/out/soong/build.ninja

In this case '-Xms ' is an ill-formed option passed to dex2oat (the
option expects one argument, but none is passed).

This patch makes the DisablePreopt variable passed from make to
soong more strict: it not only requires WITH_DEXPREOPT, but also
PRODUCT_USES_DEFAULT_ART_CONFIG. This means that dexpreopt commands
will not be generated on targets that do not include
build/make/target/product/runtime_libart.mk.

Test: lunch aosp_walleye-userdebug && m \
    && find $ANDROID_BUILD_TOP/out -name 'boot.art'
    # expect to find files in /out/target/product/walleye/system/framework/$ARCH/

Test: lunch qemu_trusty_arm64-userdebug && m \
    && fgrep -e '-Xms ' $ANDROID_BUILD_TOP/out/soong/build.ninja
    # expect empty output

Change-Id: I3d765ed0dd8b38236b8bdd5c6202bb1d3f45f904
2019-11-01 18:20:35 +00:00
Andrei-Valentin Onea 15e75e8807 Merge "Revert "Move partition size checks to python script"" 2019-11-01 15:36:10 +00:00
Raff Tsai 0141e45b96 Revert "Move partition size checks to python script"
This reverts commit a4906cd306.

Reason for revert: b/143734706

Change-Id: I905bd9c0bfcbd123c8f9e78986bfcb5600a9eca9
2019-11-01 05:36:20 +00:00
Yifan Hong 8244f27722 Merge "Move partition size checks to python script" 2019-11-01 01:52:11 +00:00
Yifan Hong a4906cd306 Move partition size checks to python script
Easier to read and modify its logic.

Test: builds
Test: test_check_partition_sizes
Test: atest releasetools_test
Test: atest releasetools_py3_test
Change-Id: I73204664b64a0bcee7375fa6fca46758d5a2bb72
2019-10-31 11:22:20 -07:00
Roland Levillain b353eda0c0 Implement APEX JAR (Java library) absence checks for Core Libraries.
Refactor existing native library checks to share common logics.

Test: Check that `m installclean && m systemimage` succeeds
Test: Check that `m installclean && m libart && m systemimage` fails
Test: Check that `m installclean && m core-oj && m systemimage` fails
Test: Check that `m installclean && m conscrypt && m systemimage` fails
Test: Check that `m installclean && m libart core-oj conscrypt && m systemimage` fails
Test: Check that
        `export OVERRIDE_TARGET_FLATTEN_APEX=true \
         && m installclean \
         && m systemimage`
      succeeds
Bug: 142944799
Bug: 128708192
Bug: 113374338
Change-Id: I703a837c6bb138af73eeb95fc08e1a87af2d8ad7
2019-10-31 16:09:02 +00:00
Roland Levillain c7c4a766f0 Reland "Remove Core Library JARs from `/system/framework`."
These JARs are part of the ART APEX, and are now located in
`/apex/com.android.art/javalib`. Remove the supernumerary copies in
`/system/framework` and save ~11 MiB on the system partition.

This change no longer breaks coverage builds, as module
`jacocoagent` has been removed from `TARGET_CORE_JARS` in CL
https://android-review.googlesource.com/c/platform/build/+/1151464.

This reverts commit 7c39368927.

Test: Device boot test
Test: Check that:
        export EMMA_INSTRUMENT=true
        && unset EMMA_INSTRUMENT_STATIC
        && m installclean
        && m systemimage
      generates a system image that contains these files:
        /system/framework/apex-jacocoagent.vdex
        /system/framework/boot-jacocoagent.vdex
        /system/framework/jacocoagent.jar
        /system/framework/<arch>/apex-jacocoagent.art
        /system/framework/<arch>/apex-jacocoagent.oat
        /system/framework/<arch>/apex-jacocoagent.vdex
        /system/framework/<arch>/boot-jacocoagent.art
        /system/framework/<arch>/boot-jacocoagent.oat
        /system/framework/<arch>/boot-jacocoagent.vdex
Test: Run test ATP test avd/avd_boot_health_check on build target
      cf_x86_phone-userdebug_coverage
Bug: 142944799
Bug: 143304991
Change-Id: Ifdb2331c5dcb992adbfd6c5a3983d8b9b13d16b2
2019-10-30 16:25:19 +00:00
Anton Hansson cca8cdb993 Ensure current product use PRODUCT_* vars directly
Disallow use of the long-form PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_*
after the short-form has been assigned, to ensure modifications are
made to the right variable.

Macros that need to work with multiple products get a convenience
macro that is redefined at the right moment.

Test: compare_target_files
Test: build_test
Change-Id: Ib0e57b1bc51b1f308296a150b9b7590a0bb5c313
2019-10-30 14:29:42 +00:00
Roland Levillain 10954b52ee Merge "Remove module `jacocoagent` from `TARGET_CORE_JARS`." 2019-10-30 11:08:12 +00:00
Roland Levillain fe67f14906 Remove module `jacocoagent` from `TARGET_CORE_JARS`.
Before this change, `jacocoagent` was conditionally added to
`TARGET_CORE_JARS`. However, this module is not really part of the
Android Core Libraries (also, we plan to remove `TARGET_CORE_JARS`
from `PRODUCT_PACKAGES`). Remove it from `TARGET_CORE_JARS` while
keeping it in `PRODUCT_PACKAGES` and `PRODUCT_BOOT_JARS`, to keep
having it installed and being part of the boot class path on
devices (under the same conditions).

Test: Check that:
        export EMMA_INSTRUMENT=true
        && unset EMMA_INSTRUMENT_STATIC
        && m installclean
        && m systemimage
      generates a system image that contains these files:
        /system/framework/apex-jacocoagent.vdex
        /system/framework/boot-jacocoagent.vdex
        /system/framework/jacocoagent.jar
        /system/framework/<arch>/apex-jacocoagent.art
        /system/framework/<arch>/apex-jacocoagent.oat
        /system/framework/<arch>/apex-jacocoagent.vdex
        /system/framework/<arch>/boot-jacocoagent.art
        /system/framework/<arch>/boot-jacocoagent.oat
        /system/framework/<arch>/boot-jacocoagent.vdex
Test: Run test ATP test avd/avd_boot_health_check on build target
      cf_x86_phone-userdebug_coverage
Bug: 143304991
Bug: 142944799

Change-Id: Ib047a394342aeffbfec26ebc756159f145d6523e
2019-10-29 17:45:04 +00:00
Alistair Delva 15b5ad2d05 Merge "Build rules use private vars" 2019-10-29 02:21:01 +00:00
Yifan Hong 0fdd73b18f Merge "Include system_other.img in super.img by default" 2019-10-29 00:56:21 +00:00
Ryan Prichard fe43a3f2cb Merge "Stop linking libdl.a into static bins" 2019-10-28 20:14:37 +00:00
Roland Levillain 7c39368927 Revert "Remove Core Library JARs from `/system/framework`."
This reverts commit 3ec9ff6b72.

Reason for revert: This change breaks coverage builds (b/143304991)

Change-Id: Ia1a41ea75d1539efeb33b7cdea84516e402b6e00
Test: Device boot test
Test: Check that:
        export EMMA_INSTRUMENT=true
        && unset EMMA_INSTRUMENT_STATIC
        && m installclean
        && m systemimage
      generates a system image that contains these files:
        /system/framework/apex-jacocoagent.vdex
        /system/framework/boot-jacocoagent.vdex
        /system/framework/jacocoagent.jar
        /system/framework/<arch>/apex-jacocoagent.art
        /system/framework/<arch>/apex-jacocoagent.oat
        /system/framework/<arch>/apex-jacocoagent.vdex
        /system/framework/<arch>/boot-jacocoagent.art
        /system/framework/<arch>/boot-jacocoagent.oat
        /system/framework/<arch>/boot-jacocoagent.vdex
Test: Test: Run test ATP test avd/avd_boot_health_check on build target
      cf_x86_phone-userdebug_coverage
Bug: 142944799
Bug: 143304991
2019-10-28 15:00:31 +00:00
Treehugger Robot 21403dc2df Merge "Replace framework.jar with framework-minus-apex.jar" 2019-10-28 11:40:09 +00:00
Pete Gillin a466a58bbb Merge "Remove support for EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9." 2019-10-28 10:28:19 +00:00
Jiyong Park 44d357e1ff Replace framework.jar with framework-minus-apex.jar
Bug: 139391334
Test: m, device is bootable
Exempt-From-Owner-Approval: Approved internally
Merged-In: I281f841c164a4813ed4c436fb84680f5ade1ee1d
(cherry picked from commit 219d4ac2b2)
Change-Id: I281f841c164a4813ed4c436fb84680f5ade1ee1d
2019-10-28 09:55:33 +00:00
Pete Gillin 6a88bd49bc Remove support for EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9.
Prior to this change, setting that to "false" turned the default Java
language level back to 8. This change removes that option.

Also remove the unused make variable USE_OPENJDK9.

Bug: 115604102
Test: m java droid docs tests cts
Change-Id: I040cf83a2457227ffbcd1c62649e33b98c0c66f7
2019-10-25 16:55:54 +01:00
Yo Chiang 5eac77c735 Build rules use private vars
Create PRIVATE_TOOLS_PREFIX for VNDK build rules. So that the value of
$(my_prefix) is well-preserved.

Bug: 142350531
Bug: 141971626
Test: lunch aosp_cf_x86_go_phone-userdebug ; m nothing
Change-Id: I06f16708c7165cb909f0031182ffb96a462d6000
2019-10-25 22:14:59 +08:00
Ryan Prichard acf8b0ff00 Stop linking libdl.a into static bins
libdl.a has a no-op dlopen, which breaks static libraries that need a real
dlopen. Instead of automatically linking libdl.a into static executables,
make it optional.

Until recently, the libunwind_llvm.a unwinder, used on arm32, needed the
no-op dladdr, but it's now built using -D_LIBUNWIND_USE_DLADDR=0.

The HWASan run-time uses dlsym and dladdr, so add a libdl dependency for
HWASan-built static binaries. We could also remove the dependency from
libclang_rt.hwasan_static-*.a, but this is also easy to do.

Bug: http://b/141485154
Test: bionic unit tests, device boots, verify that static and dynamic
   executables can throw/catch an exception
Test: verify that a static executable using dlopen doesn't link (unless it
   adds an explicit dependency on libdl)

Change-Id: Id26741f79dca50256a2dc23453af3026a6c88dca
2019-10-24 18:15:05 -07:00
changho.shin a8f9f117cf Include system_other.img in super.img by default
Currently, only dist build makes super.img with system_other.
Let build system include system_other in super image by default.

Test: m -j & check built super.img
Bug: 142669000

Change-Id: I00a8815b30fa6fb8c62e204fdc35e046071bd401
2019-10-24 06:57:58 +00:00
Steven Moreland 12e476cb93 Merge "host_init_verifier: no HIDL_INTERFACE_HIERARCHY"
am: 9126041689

Change-Id: If3597954a216928add218c85a5934550f7e71e95
2019-10-23 16:13:58 -07:00
Steven Moreland 9126041689 Merge "host_init_verifier: no HIDL_INTERFACE_HIERARCHY" 2019-10-23 23:07:30 +00:00
Inseob Kim 65c91ff15a Fix and generate vndk snapshot entirely in Soong
- VNDK snapshot now respects stem and suffix.
- ld.config.txt is removed from snapshot as linkerconfig has become default.
- Soong builds entire snapshot, and make just calls dist-for-goals.

Bug: 142589718
Test: build and install snapshot
Test: development/vndk/snapshot/update.py with past version of snapshot
Change-Id: Ib99f1006d3553b1871b86ab168b1706fe47e1afb
2019-10-23 15:54:08 +09:00
Roland Levillain e517577a45 Merge "Remove Core Library JARs from `/system/framework`."
am: 047f2fd43e

Change-Id: Ic25531c16a71452e659776765185adf8feac5eac
2019-10-22 10:51:10 -07:00
Roland Levillain 047f2fd43e Merge "Remove Core Library JARs from `/system/framework`." 2019-10-22 17:32:21 +00:00
Roland Levillain 3ec9ff6b72 Remove Core Library JARs from `/system/framework`.
These JARs are part of the ART APEX, and are now located in
`/apex/com.android.art/javalib`. Remove the supernumerary copies in
`/system/framework` and save ~11 MiB on the system partition.

(cherry picked from commit d4f09f7752)

Test: Device boot test
Bug: 142944799
Change-Id: Ia6f58d858ecdb80c9701696b8f20d5fa2de0c2c7
Merged-In: Ia6f58d858ecdb80c9701696b8f20d5fa2de0c2c7
2019-10-22 16:42:53 +00:00
Nicolas Geoffray fbdf5ef4df Merge "Remove support for stripping dex."
am: 8567331a4f

Change-Id: I97da8f46547c2cbca103fe7c9301a6086a7017c1
2019-10-22 03:21:28 -07:00
Nicolas Geoffray 8567331a4f Merge "Remove support for stripping dex." 2019-10-22 09:48:06 +00:00
Yifan Hong 9d97d8eb67 Merge "Delete VINTF files from target files package."
am: 371e3c3b6c

Change-Id: Ieb99a77a1fd887a950122d54f504946dcaff3324
2019-10-21 11:51:19 -07:00
Yifan Hong 371e3c3b6c Merge "Delete VINTF files from target files package." 2019-10-21 18:29:04 +00:00
Jerome Gaillard fac0ac32f9 Merge "Allow files generated by droidstubs to be copied in the SDK"
am: aa1c6bb4b3

Change-Id: Iee4b8f2dfcfea343f9c696e230a092d059a344cb
2019-10-21 02:49:32 -07:00
Jerome Gaillard aa1c6bb4b3 Merge "Allow files generated by droidstubs to be copied in the SDK" 2019-10-21 09:32:12 +00:00
Nicolas Geoffray 2ca0e49f61 Remove support for stripping dex.
Stripping is incompatible with ART module updatability.

Bug: 65154345
Bug: 138851227

Test: build and observe no change in output (stripping is not used by
default).

Change-Id: Ic2d9738ef393814c3af3cad116071f7b5938aa84
2019-10-21 09:36:45 +01:00
karenluo 41c41c0215 Merge "Generalize vts config module for other Suites"
am: ef582f1432

Change-Id: I55f9cbebdfdb35810d7e6b7e997443ea18704c6c
2019-10-18 15:46:47 -07:00
Treehugger Robot ef582f1432 Merge "Generalize vts config module for other Suites" 2019-10-18 22:24:52 +00:00
karenluo 97d398f2de Generalize vts config module for other Suites
Removed the vts specific content from the wrapper file
android_vts_host_config.mk to make it more general to be used by other
suites, including C-Suite.

Test: make csuite
Change-Id: I6e79d8f6532376f94a87501683c260c8f3793ca7
Merged-In: I6e79d8f6532376f94a87501683c260c8f3793ca7
2019-10-18 18:28:23 +00:00
Inseob Kim 44090a3b54 Merge changes from topic "fix_treble_sysprop_neverallow"
am: 8de0013551

Change-Id: Ie1c29edbdeca210697b9332beb52faade5431b5c
2019-10-17 20:03:20 -07:00
Treehugger Robot 8de0013551 Merge changes from topic "fix_treble_sysprop_neverallow"
* changes:
  Revert "Do not initialize BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW"
  Revert "Set BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW on sdk and full"
2019-10-18 02:39:48 +00:00
Yifan Hong 289b002427 Delete VINTF files from target files package.
This relands "Check VINTF compatibility at OTA generation time."
This reverts commit 948b259b52.

Reason for revert: blueline_mainline_mixed fixed now

Change-Id: Ib42f7183adb1e6f98692bdfbc73c2619227e646d
Fixes: 131425279
Test: builds
2019-10-18 00:07:23 +00:00
Pete Gillin 77a7d014b2 Merge "Enable Java language level 9 by default."
am: 3e25573c13

Change-Id: I6190f392ef5664fd738221b18b367d2255fb4737
2019-10-17 04:05:13 -07:00
Pete Gillin 3e25573c13 Merge "Enable Java language level 9 by default." 2019-10-17 10:38:35 +00:00
Inseob Kim 5d60c8ac5d Revert "Do not initialize BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW"
This reverts commit 3b82e07023.

Reason for revert: This was a hack and the fix has been merged

Change-Id: Ifa1684d9908f384d3da86acae18bfe4b47cf1529
2019-10-17 10:33:40 +00:00
Steven Moreland bbdb6cbb69 host_init_verifier: no HIDL_INTERFACE_HIERARCHY
Since this is built into host_init_verifier now.

Bug: 141567104
Test: build w/ and w/o host_init_verifier throwing a related error
Change-Id: I75a8c373fcfb054a5074039211134761596600c3
2019-10-16 16:35:17 +00:00
Elliott Hughes c0afb1cd6b Merge "Revert "-D__ANDROID_NDK__ for SDK builds.""
am: be90dc8396

Change-Id: Ica8f2437caa57213889289a60061d96219e6bf39
2019-10-16 09:14:11 -07:00
Elliott Hughes be90dc8396 Merge "Revert "-D__ANDROID_NDK__ for SDK builds."" 2019-10-16 16:01:14 +00:00
Pete Gillin b455f58059 Enable Java language level 9 by default.
This changes the default Java language level from 8 to 9, i.e. javac
invocations now use -source 1.9 -target 1.9.

The environment variable EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9=false is
added to switch back to the language level 8 behaviour. (Previously,
setting that variable to true was required to opt in to language level
9.)

Test: make droid java tests cts docs
Test: javap -v <some class file in output> | grep 'major version' (reports 53, for classes from 'benchmarks' which is in Android.bp and 'ahat' which is in Android.mk)
Test: make RunBluetoothRoboTests RunCarSettingsLibRoboTests (two main flavours of robolectric)
Test: make cts && cts-tradefed help
Test: atest CtsLibcoreTestCases (reasonably low-level device tests)
Test: atest CtsHostTzDataTests (arbitrary host test)
Bug: 115604102
Change-Id: I06c4adb3861db82f4804ac9322a131067f395b4e
Merged-In: I13b2ff61c6423ad99464e0a4d2b1bedfd8ae1080
2019-10-16 11:21:20 +01:00
Martin Brabham a42177adc4 Merge changes Ie9de9576,I14f7cd06
am: 14fcfb8a9a

Change-Id: I9d8688f9681a5821d91c5e1b4105fc6a67cd5c40
2019-10-15 15:15:30 -07:00
Martin Brabham 14fcfb8a9a Merge changes Ie9de9576,I14f7cd06
* changes:
  Set BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW on sdk and full
  Do not initialize BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW
2019-10-15 21:50:42 +00:00
Jerome Gaillard a0171af06f Allow files generated by droidstubs to be copied in the SDK
We need to get files generated by a droidstubs target into the SDK. So
we first copy them into the out/target/common/obj/PACKAGING folder where
they can be picked up by the SDK build.

Bug: 142480924
Test: m sdk
Change-Id: I7a0b22907603e1d17ac05901ee7f8bb9cff89f7f
2019-10-15 17:27:43 +01:00
Inseob Kim 3b82e07023 Do not initialize BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW
BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW is meant to be set depending on
targets, not devices. This allows that value to be set outside
BoardConfig.mk.

Bug: 131162102
Bug: 142684203
Test: m sepolicy_tests
Change-Id: I14f7cd06dcbaf1b5354c648079a815d7b6cc6f3a
2019-10-15 17:24:35 +09:00
vichang bc2a8ead4a Merge "Add libicu_jni into ART APEX"
am: ed02064ed5

Change-Id: If4e6f02703ec50858d7cbf27b790fbb35ed59f8e
2019-10-15 01:09:54 -07:00
vichang ed02064ed5 Merge "Add libicu_jni into ART APEX" 2019-10-15 06:43:10 +00:00
Inseob Kim 7c4ef3b945 Merge "Add BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW"
am: 491f2969d6

Change-Id: Icf9c9d60e7d2532e37edde2d6b2e65b63013be48
2019-10-14 18:54:55 -07:00
Inseob Kim 491f2969d6 Merge "Add BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW" 2019-10-15 01:29:06 +00:00
TreeHugger Robot f0b4aaa83b Merge "DO NOT MERGE - Merge QD1A.190821.011 into stage-aosp-master" into stage-aosp-master 2019-10-15 00:24:21 +00:00
Inseob Kim bc89619724 Add BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW
A new sysprop neverallow rules are mandatory only for devices launching
with R or later. For devices already launched, neverallow rules can be
relaxed with adding following line to BoardConfig.mk:

BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW := true

Bug: 131162102
Test: Set PRODUCT_SHIPPING_API_LEVEL := 30 and try building with
changing some system_public_prop to system_internal_prop
Test: m cts sepolicy_tests

Change-Id: I44a83af19b18b4116f83a3d5dc929f28bb8870ce
Merged-In: I44a83af19b18b4116f83a3d5dc929f28bb8870ce
(cherry picked from commit 06fb4554f4)
2019-10-15 09:24:17 +09:00
Xin Li 9bb4767ad7 DO NOT MERGE - Merge QD1A.190821.011 into stage-aosp-master
Bug: 141248619
Change-Id: I238167158c381b1726628da0617bb6eda33dd9b9
2019-10-14 22:52:58 +00:00
Evgenii Stepanov 62c3058fc9 Merge "Define ro.sanitize.<name> properties in SANITIZE_TARGET builds."
am: 7bebcbaff2

Change-Id: I1f0311fded467e0dd4538e0b461f1669d62d3b3e
2019-10-14 15:00:56 -07:00
Evgenii Stepanov 7bebcbaff2 Merge "Define ro.sanitize.<name> properties in SANITIZE_TARGET builds." 2019-10-14 21:44:09 +00:00
Tao Bao 48ccb46f5f Merge "Include per-partition fingerprint as AVB prop."
am: dc2f0b0abd

Change-Id: Iba6609e92a1b2b7bde8564cbfc5fa59fb8a69935
2019-10-14 08:15:26 -07:00
Tao Bao dc2f0b0abd Merge "Include per-partition fingerprint as AVB prop." 2019-10-14 14:53:46 +00:00
Anton Hansson bde786ca70 Merge "Document SYSTEM_OTHER_ODEX_FILTER matching"
am: 3cc4fa6394

Change-Id: I6e243dc057ce23913a9a33f97a7ecd35c9714de1
2019-10-14 02:40:35 -07:00
Anton Hansson 3cc4fa6394 Merge "Document SYSTEM_OTHER_ODEX_FILTER matching" 2019-10-14 09:29:10 +00:00
Evgenii Stepanov eb3ade924b Define ro.sanitize.<name> properties in SANITIZE_TARGET builds.
This will let us quickly check the system image build type,
and modify *.rc behavior based on that.

Bug: 142430632
Test: adb shell getprop ro.sanitize.hwaddress in hwasan build

Change-Id: If2eb99dee93f0652cada5cb2e02fda963d00a7eb
2019-10-11 16:59:27 -07:00
Colin Cross 30124b4e1e Merge "Remove stray ZIPALIGN_PAGE_ALIGN_FLAGS"
am: d6d27517f7

Change-Id: I6bd69722e8f5fa9b1333b9dc9e374e255d11e234
2019-10-11 06:20:52 -07:00
Victor Chang d272f0ed6f Add libicu_jni into ART APEX
Bug: 138994281
Test: device boots
Change-Id: Ic61d374ef87634ebaa1bb55b2a36176d3606f3d2
2019-10-11 14:20:38 +01:00
Treehugger Robot d6d27517f7 Merge "Remove stray ZIPALIGN_PAGE_ALIGN_FLAGS" 2019-10-11 13:12:29 +00:00
dianlujitao eec39a95f3 Merge "Fix odm output directory for devices w/o vendor partition"
am: 46cfab96d8

Change-Id: Ia132212a1b1cfb909a3f8539ca42af0bdd9c9939
2019-10-11 04:14:06 -07:00
Treehugger Robot 46cfab96d8 Merge "Fix odm output directory for devices w/o vendor partition" 2019-10-11 10:46:43 +00:00
Xin Li 51a7d20229 Merge "DO NOT MERGE - Merge QP1A.191005.007 into master" 2019-10-11 02:56:40 +00:00
Elliott Hughes af11c50e67 Revert "-D__ANDROID_NDK__ for SDK builds."
This reverts commit 401a84071b.

Reason for revert: fixed in bionic instead (https://android-review.googlesource.com/c/platform/bionic/+/1135146).

Change-Id: I85e2ef241684c34fc968fd0e7230b8a88ea3209a
2019-10-11 01:24:39 +00:00
Xin Li 66ec993fe5 DO NOT MERGE - Merge QP1A.191005.007 into master
Bug: 142297020
Merged-In: I063f0430347d9f1e6ea5a8133204585833ed5ddc
Change-Id: I6fe9ad3f71b30ba7c1cf9d6941450809cfc66909
2019-10-10 22:54:06 +00:00
Tao Bao 97c1c9aaa3 Merge "AVB: decouple vbmeta.img from recovery.img for non-A/B devices"
am: 549325427b

Change-Id: Iebb05accc055147051cfecfc2729fbe8cca0a0d1
2019-10-10 13:38:13 -07:00
Colin Cross bf086436b0 Remove stray ZIPALIGN_PAGE_ALIGN_FLAGS
Iae26e4676c29c68fa3f76187512c82786bfa0522 removed the definition
of ZIPALIGN_PAGE_ALIGN_FLAGS in favor of always using the -p flag,
but left accidentaly left one usage.  Replace it with -p.

Bug: 141212627
Test: m checkbuild
Change-Id: Ica69d9195426f8f30039da211ed1a0ad5dffe8e8
2019-10-10 12:52:13 -07:00
cfig 1aeef725a7 AVB: decouple vbmeta.img from recovery.img for non-A/B devices
For following cases:
Case 1: A/B devices: no change
Case 2: non-A/B devices, with unsigned recovery image:
    not allowed anymore by mandating BOARD_AVB_RECOVERY_KEY_PATH
Case 3: non-A/B devices, with signed recovery image:
    vbmeta.img should not include ChainPartitionDescriptor of recovery.img,
    otherwise device can not even boot into normal mode if recovery partition
    is damaged

This CL will cause a build break if BOARD_AVB_RECOVERY_KEY_PATH
is not set for non-A/B targets with recovery.img
The following is an example to fix the build break by specifying
AVB signing configs for the recovery.img.

BOARD_AVB_RECOVERY_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
BOARD_AVB_RECOVERY_ALGORITHM := SHA256_RSA2048
BOARD_AVB_RECOVERY_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
BOARD_AVB_RECOVERY_ROLLBACK_INDEX_LOCATION := 2

Also note that libavb in bootloader needs an update to include this
commit Iaa886037edb18c2ff6c60fa2a7f883ab7303ba1a, to support verifying
recovery.img independently (not through vbmeta.img).

Bug: 130351427
Test (Case 3):
  normal   mode: avb_slot_verify(flags=AVB_SLOT_VERIFY_FLAGS_NONE)
  recovery mode: avb_slot_verify(flags=AVB_SLOT_VERIFY_FLAGS_NO_VBMETA_PARTITION)
Test: PYTHONPATH=build/make/tools/releasetools \
    python -m unittest test_validate_target_files
Test: Use a lunch'd target. `atest --host releasetools_test releasetools_py3_test`
Test: validate_target_files.py with Case-3 target files
Change-Id: I2a73252b385fa463b4abd444923a8acc473df0b4
2019-10-10 14:28:34 +00:00
Tao Bao 19b02fe8e5 Include per-partition fingerprint as AVB prop.
This allows querying per-partition fingerprint via libavb (in
particular, avb_property_lookup).

Bug: 80097573
Test: `m dist`; `avbtool info_image --image /path/to/image` to check the
      written prop.
Test: `atest --host releasetools_test releasetools_py3_test`
Test: Run sign_target_files_apks to sign a target_files.zip that's built
      with the change. Check the AVB prop in the signed images.
Change-Id: Id4f06df82c29e77aca128439c8c11f0367fe587e
2019-10-09 21:25:19 -07:00
dianlujitao 339ef4cf3f Fix odm output directory for devices w/o vendor partition
Change-Id: Iba6c169630ea6bf61b9057a9994e5eb824915304
2019-10-10 09:55:09 +08:00
Bowgo Tsai 68130ccb4a Merge "Adding boot-test-harness.img"
am: 818df7b0d0

Change-Id: I550d6e5eebe84f9e1971ef23a21c40d22de0d0b8
2019-10-09 17:32:04 -07:00
Treehugger Robot 818df7b0d0 Merge "Adding boot-test-harness.img" 2019-10-09 23:49:46 +00:00
Tao Bao 003ae1cde8 Merge "Remove the workaround that forces rebuilding recovery patch."
am: 3d33aa7c2c

Change-Id: I73cf84bf0e85aa61f9a238210c843859a77deb1e
2019-10-09 11:55:07 -07:00
Tao Bao cbd6d498d2 Remove the workaround that forces rebuilding recovery patch.
The issue has been addressed on releasetools script side, by specifying
UUID and AVB salt to get reproducible images [1].

[1] https://android-review.googlesource.com/c/platform/build/+/1135332

Fixes: 134525174
Test: `m dist` with a non-A/B target.
      `validate_target_files out/dist/target_files.zip` passes.
Change-Id: Ida6750291706036c9b0c192d8abcde6d65155287
2019-10-08 22:23:37 +00:00
Bowgo Tsai 5c40c7166f Adding boot-test-harness.img
In commit I30137c3caef91805d9143d404e5e4d06c0fccc30, we added
a boot-debug.img to allow adb root when using an user build GSI image.

However, to run automated tests, it requires additional properties,
which are not needed for GSI compliance:
    ro.audio.silent=1
    ro.test_harness=1

This CL adds an additional boot-test-harness.img for automated tests,
and keeps the original boot-debug.img for GSI compliance.

Note: boot-test-harness.img won't be built by default, it needs
      explicit `make bootimage_test_harness`.

Bug: 140036184
Test: `m bootimage_test_harness`, flashes boot-test-harness.img and checks
      adb root works and test harness props are set.
Test: `m bootimage_test_harness dist -j32`, checks both
      boot-test-harness.img and ramdisk-test-harness.img are under ./out/dist/.
Test: `system/tools/mkbootimg/unpack_bootimg.py --boot_img $OUT/boot-test-harness.img --out ramdisk-test-harness`,
      checks the extracted out/ramdisk is as expected
Test: Run `gunzip -c ramdisk | cpio -idm` for the ramdisk extracted from
      $OUT/boot-test-harness.img and $OUT/boot-debug.img, respectively.
      Then compare the root dirs of both, e.g.,
      `diff -rq --no-dereference ./ramdisk-test-harness ./ramdisk-debug`
Test: `m ramdisk_test_harness-nodeps` and `m bootimage_test_harness-nodeps`
Change-Id: Iadea0b5c933c3b7fa10dcf3d9e85596916b3333d
2019-10-08 10:22:13 +00:00
Jooyung Han 6ba261edf0 Merge "Check if installable before installing unstripped"
am: 4dc0c25643

Change-Id: I74287511c49395e94a57e18539e13c8eafdfdf94
2019-10-07 17:14:36 -07:00
Treehugger Robot 4dc0c25643 Merge "Check if installable before installing unstripped" 2019-10-07 23:56:05 +00:00
Tao Bao 34bd354511 Merge "Enforce the consistency between AB_OTA_UPDATER and AB_OTA_PARTITIONS."
am: e3c95f71e7

Change-Id: Id19d9ed15cea91022d2693ab8ffa01a989b1ffaa
2019-10-07 12:28:52 -07:00
Tao Bao e3c95f71e7 Merge "Enforce the consistency between AB_OTA_UPDATER and AB_OTA_PARTITIONS." 2019-10-07 19:06:46 +00:00
Jooyung Han 66bd7385d2 Check if installable before installing unstripped
When LOCAL_UNINSTALLABLE_MODULE is true, the module is not installed.
But its unstripped output is installed to the path based on
my_module_path which is not set for it is not installable. Moreover,
my_module_path is not reset after use.

As a result, when LOCAL_UNINSTALLABLE_MODULE is true, the path for
unstripped output is unexpected.

The installation is guarded by LOCAL_UNINSTALLABLE_MODULE now,
which was LOCAL_VNDK_DEPEND_ON_CORE_VARIANT.

Test: m
Change-Id: If18cf76118e058a9e0701a8d66f7ff0f534e5881
2019-10-07 22:33:47 +09:00
Anton Hansson 3c5a18fc16 Document SYSTEM_OTHER_ODEX_FILTER matching
...and add a CleanSpec for the moving preopt files.

Bug: 141707536
Test: N/A
Change-Id: I2f5bc4e2c8e6a9fa4c562d55623c13682d3f93ba
2019-10-07 14:29:58 +01:00
Roland Levillain 0a24633ef5 Merge "Introduce build variable `OVERRIDE_TARGET_FLATTEN_APEX`."
am: 81681abfef

Change-Id: I1dea79a8ff7ee4f1e12cd731e87b124dca324ecc
2019-10-07 03:35:27 -07:00
Roland Levillain 81681abfef Merge "Introduce build variable `OVERRIDE_TARGET_FLATTEN_APEX`." 2019-10-07 10:27:41 +00:00
Bill Peckham 2c4d3a7b6c Merge "Moving recovery resources from /system to /vendor"
am: 959b5ebbf8

Change-Id: Ied05e3765ea8afbc29b4d9bf713217d0d3753fa5
2019-10-04 20:24:19 -07:00
Bill Peckham 959b5ebbf8 Merge "Moving recovery resources from /system to /vendor" 2019-10-05 03:14:12 +00:00
Roland Levillain b3a503df7f Introduce build variable `OVERRIDE_TARGET_FLATTEN_APEX`.
When `OVERRIDE_TARGET_FLATTEN_APEX` is defined (e.g. set in the
environment), `TARGET_FLATTEN_APEX` is forcibly assigned its value.

This is useful to enable/disable APEX flattening from the command
line (thus ignoring the product's default configuration), for testing
purposes.

Note: Previously it was possible to set `TARGET_FLATTEN_APEX` directly
and have the same effect, but recent changes in the build
configuration now prevent that option.

Test: Check that:
        export OVERRIDE_TARGET_FLATTEN_APEX=true \
          && . ./build/envsetup.sh \
          && lunch aosp_walleye-userdebug \
          && export OVERRIDE_TARGET_FLATTEN_APEX=true \
          && build/soong/soong_ui.bash --dumpvar-mode TARGET_FLATTEN_APEX
      returns:
        true
Bug: 121117762

Change-Id: Ib9ccae38430340de38e4758b4f55df2c65ea60d5
2019-10-04 18:35:49 +01:00
Colin Cross ad3ac35f8e Merge "Use -nostdlib++ instead of -nodefaultlibs"
am: a63ce3af4c

Change-Id: Iba432c7761f8e24d0e0f693cd9131b4862930653
2019-10-03 20:36:49 -07:00
Colin Cross a63ce3af4c Merge "Use -nostdlib++ instead of -nodefaultlibs" 2019-10-04 03:26:11 +00:00
Bill Peckham e868aec14b Moving recovery resources from /system to /vendor
This change is part of a topic that moves the recovery resources from the
system partition to the vendor partition, if it exists, or the vendor directory
on the system partition otherwise. The recovery resources are moving from the
system image to the vendor partition so that a single system image may be used
with either an A/B or a non-A/B vendor image. The topic removes a delta in the
system image that prevented such reuse in the past.

The recovery resources that are moving are involved with updating the recovery
partition after an update. In a non-A/B configuration, the system boots from
the recovery partition, updates the other partitions (system, vendor, etc.)
Then, the next time the system boots normally, a script updates the recovery
partition (if necessary). This script, the executables it invokes, and the data
files that it uses were previously on the system partition. The resources that
are moving include the following.

* install-recovery.sh
* applypatch
* recovery-resource.dat (if present)
* recovery-from-boot.p (if present)

This change includes the platform build system and release tools changes to
move the recovery resources from system to vendor (or /system/vendor). The
release tools need to know where to generate the recovery patch, and they
discover this from misc_info.txt variable board_uses_vendorimage, which the
platform build system generates.

We remove applypatch from PRODUCT_PACKAGES, but it is added back as a required
module in target/product/base_vendor.mk.

Several release tools rely on the misc_info.txt board_uses_vendorimage variable
to know how to generate and detect the recovery patch.

This change partially removes the --rebuild_recovery flag from the
merge_target_files.py script. The flag will be fully removed in a follow-on
change.

Bug: 68319577
Test: Ensure that recovery partition is updated correctly.
Change-Id: Ia4045bd67ffb3d899efa8d20dab4c4299b87ee5f
2019-10-04 00:04:34 +00:00