Commit graph

17915 commits

Author SHA1 Message Date
Yifan Hong
d58e70bf21 Fix size check for devices with multiple groups
The old code calls check-sum-of-partition-sizes within a foreach
loop, causing syntax error:
... fi partition_size_list=...

Add a semicolon after fi to fix this.
Test: build with multiple groups, each group with a partition in it

Change-Id: Ic4387408f3efc1744871619c300546765c678a61
2019-01-11 13:21:11 -08:00
Treehugger Robot
82f2cb078f Merge "Stop trying to read depfile from vtsc" 2019-01-10 17:46:34 +00:00
Treehugger Robot
56645f7d88 Merge "Support LOCAL_DEX_PREOPT := nostripping" 2019-01-10 08:58:01 +00:00
Colin Cross
723a22feea Support LOCAL_DEX_PREOPT := nostripping
Support LOCAL_DEX_PREOPT := nostripping by passing it to
dexpreopt_gen.

Bug: 122610462
Test: m
Change-Id: I05f7009d38505f995cd16cc8dbb4ecd6ecc3d71c
2019-01-09 21:27:53 -08:00
Dan Willemsen
5125746561 Stop trying to read depfile from vtsc
vtsc just ignores the -d argument and apparently can't write a depfile.
So for now, just stop assuming it produces one.

Bug: 121058584
Bug: 120496070
Test: NINJA_ARGS="-w missingdepfile=err" m libvts_interfacespecification
Change-Id: Ie1483fbeead9f710d8a6636df07ce44bbc4a6e2d
2019-01-09 16:40:58 -08:00
Jiyong Park
8d95a14476 Merge "Add PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES" 2019-01-09 23:33:51 +00:00
Nicolas Geoffray
9ce12752dc Merge "Preopt: Pass -Xbootclasspath: arg to dex2oat." 2019-01-09 12:37:15 +00:00
Jiyong Park
185d41e84d Add PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES
It is a list of <module_name>:<manifest_name> pairs. When the module
name of an APK or an APEX matches with <module_name>, then its app
manifest name is overridden to <manifest_name>.

<module_name> and <manifest_name> can be patterns as in
com.android.%:com.mycompany.android.%.release

Test: m with PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES for
1) an APK in Android.mk
2) an APK in ANdroid.bp
3) an APEX
and check that manifest names are modified as specified

Change-Id: Ic09e059ea7b7ea99a50a1cf423a25aa587ef4466
2019-01-09 21:08:10 +09:00
Anton Hansson
fe9f373e10 Merge "Fix qemu image definition conditionals" 2019-01-09 10:33:51 +00:00
Treehugger Robot
d968c5dab1 Merge "Remove data binding from master build" 2019-01-08 04:56:01 +00:00
Treehugger Robot
dc1f4499d0 Merge "Fix depfile output from dexpreopt strip script" 2019-01-08 02:19:35 +00:00
Yigit Boyar
a53f680352 Remove data binding from master build
Data Binding only works as part of tools. It also only builds there
(in studio-master-dev branch). This CL removes references to the data
binding checkout which will be followed by removal of data binding
from master manifest.

Bug: 122478832
Change-Id: I338cc1aa10a5ad39114bc0ed14a529365016e9a4
2019-01-08 00:43:03 +00:00
Tao Bao
9f1eda65e6 Merge "Don't build retrofit OTA package if vendor.img is unavailable." 2019-01-07 23:49:23 +00:00
Dan Willemsen
07b73576e4 Fix depfile output from dexpreopt strip script
strip.sh uses $2.d to write the depfile, while this had been passing in
$@.tmp in as $2. Instead, move the file first, then use strip.sh with
the real output file so that we can find the depfile.

Also don't specify a depfile (or other dependencies) when
LOCAL_CERTIFICATE==PRESIGNED, as we'll skip all of that in the rule in
that case.

Bug: 121058584
Test: NINJA_ARGS="-w missingdepfile=true" m
Change-Id: I1323e775e3a6ce5a06a19d59f3fb07495f116f34
2019-01-07 15:06:48 -08:00
Treehugger Robot
4ab7bb3ee8 Merge "Save invocation info of dex2oat runs." 2019-01-07 21:38:16 +00:00
Tao Bao
519d18286e Don't build retrofit OTA package if vendor.img is unavailable.
We used to build retrofit full OTA package as long as
PRODUCT_RETROFIT_DYNAMIC_PARTITIONS is true. This doesn't work with AOSP
targets that have the flag set but without any available vendor image.

This CL detects such a condition and uses a separate flag to guard the
retrofit OTA building as well as the split super images generation.

Bug: 120852744
Test: `m -j dist` on blueline (w/ vendor images) and aosp_blueline (w/o
      vendor images).
Change-Id: I65726f24f8fc546be6802941a6a06590a3804c16
2019-01-07 12:22:48 -08:00
Yifan Hong
b3f5918890 Merge "Allow devices launched with DAP to override super partition name." 2019-01-07 18:26:17 +00:00
Treehugger Robot
575402b967 Merge "Fix hiddenapi-greylist.csv generation." 2019-01-07 16:28:31 +00:00
Treehugger Robot
c3efc773aa Merge "Update OWNERS for dex preopt related files." 2019-01-07 15:28:43 +00:00
Mathew Inwood
0fa280036b Fix hiddenapi-greylist.csv generation.
It was referring to a non-existant macro paramater resulting in empty
output.

Test: m out/target/common/obj/PACKAGING/hiddenapi-greylist.csv
& then check output.

(cherry picked from commit 8626c8ea95)

Change-Id: Ib48042ecca320c4d7c3a27959e41e5c55099b27a
Merged-In: Ib48042ecca320c4d7c3a27959e41e5c55099b27a
2019-01-07 14:59:51 +00:00
Tor Norbye
5ca77c512c Merge "Switch apicheck over from doclava to metalava" 2019-01-06 16:04:33 +00:00
Yifan Hong
035c0ea0d4 Allow devices launched with DAP to override super partition name.
Test: on cuttlefish
Bug: 111801737
Change-Id: Ibb9b7132898d3c871186ded01432de4419809e7c
2019-01-04 16:03:50 -08:00
Treehugger Robot
a84df446be Merge "Fix dep filename for rs.srcjar" 2019-01-04 15:17:50 +00:00
Tianjie Xu
daf0839f0b Merge "recovery text images: Use center_alignment for background texts" 2019-01-04 07:26:32 +00:00
Dan Willemsen
a9cb7e3392 Fix dep filename for rs.srcjar
Caught by https://android-review.googlesource.com/861510

Bug: 121058584
Test: m out/target/common/obj/APPS/Gallery2_intermediates/renderscript/rs.srcjar
Test: NINJA_ARGS="-t deps out/target/common/obj/APPS/Gallery2_intermediates/renderscript/rs.srcjar" m
Change-Id: I92a803963f4431e8506b1f2517a7186d16667709
2019-01-03 22:14:56 -08:00
Treehugger Robot
28bad7a498 Merge "Pack libsquashfs_utils.so into otatools.zip." 2019-01-04 00:32:06 +00:00
Treehugger Robot
6fee1039af Merge "Rename to LOCAL_PREFER_CODE_INTEGRITY" 2019-01-03 22:22:26 +00:00
Tao Bao
beea6c0828 Pack libsquashfs_utils.so into otatools.zip.
Overlooked the transitive dependency on this lib in my previous CL that
packs libfec.so.

Bug: 122280472
Test: Build `otatools.zip`. Unzip and check that
      `ldd bin/delta_generator` no longer shows any missing lib.
Change-Id: I7b633ea870f05b86ee7760c736dac7c74dee5dc2
2019-01-03 12:34:40 -08:00
Jiyong Park
b6c095ff4d Read all product makefiles even when TARGET_BUILD_APPS is set
This allows us to have vendor-specific product makefiles for building
unbundled artifacts. The makefile could be used to specify path to the
keystore used to sign the artifacts for the vendor.

Bug: 121224311
Test: m
Change-Id: I260bfddc5fc438fc0986b39d9010087bf758c7ca
2019-01-04 04:04:38 +09:00
Victor Hsieh
330d21d53b Rename to LOCAL_PREFER_CODE_INTEGRITY
During code review, the name change was suggested.

Test: local CTS passed
Bug: 112037137
Change-Id: I1782c532ad6dd36ee8aad7987e47a14f5c1895ee
2019-01-03 09:48:39 -08:00
Tao Bao
a19f8e993b Pack libfec.so into otatools.zip.
delta_generator now has a dependency on libfec.so [1], for generating
A/B incrementals.

[1] https://android-review.googlesource.com/c/platform/system/update_engine/+/854154

Bug: 122280472
Test: `m -j otatools-package` with aosp_marlin-userdebug. Check that
      `otatools.zip` contains libfec.so.
Change-Id: Ia6642bb2c7ccb0f89ad3079bdf65e4dbffee13f5
2019-01-02 23:24:51 -08:00
Tor Norbye
cb58fa13df Switch apicheck over from doclava to metalava
Apicheck seems to only be used for signature file
conversion and diffing at this point.

Test: make dist
Not Yet Merged In Ib8c09ba7f85fbb48526132ca8cc85856d63ca407
Change-Id: I5ca70a019ef4f7828f0a566f7745fc2dbf673b2e
2019-01-01 13:18:04 -08:00
Dan Willemsen
ad6a15433e Produce ro.build.version.preview_sdk_fingerprint
This is just a hash of the current.txt and system-current.txt right now,
though it may expand to include other API surfaces in the future.

Once prebuilts/sdk/current is populated with api_fingerprint.txt files,
we can use those for unbundled builds, but until then, just use the
PLATFORM_PREVIEW_SDK_VERSION as a placeholder.

MD5 was just the most convenient, since we don't have a sha tool that we
can use on Mac currently. I'm hoping we can get a toybox-based tool in
the future that standardizes that, but we aren't currently using sha*sum
from toybox on Linux, much less on Darwin yet.

Test: m dist out/dist/api_fingerprint.txt
Test: m out/target/product/.../system/build.prop
Change-Id: If69f270560d05135cb81a9bb2d1b208ea78f86df
2018-12-27 12:30:05 -08:00
Vladimir Marko
3266d6ef22 Preopt: Pass -Xbootclasspath: arg to dex2oat.
Test: Pixel 2 XL boots.
Bug: 119868597
Change-Id: I951c0953ad336b6a3af441da396fe7705258623c
2018-12-21 15:52:24 +00:00
Mikhail Naganov
aa73cefbc4 Use ASAN linker for native tests
Native tests (BUILD_NATIVE_TEST) use their own MODULE_CLASS.
Check for it when selecting the linker for ASAN.

Test: build a native test, readelf -l <test> | grep linker
Change-Id: I34ca8c443c792bdf8b4b1fa812806c56f13a72d0
2018-12-20 16:15:54 -08:00
Treehugger Robot
92b623259b Merge "Don't write vendor to dynamic_partitions_info.txt if it's unavailable." 2018-12-20 20:45:40 +00:00
xunchang
dbe55e147e recovery text images: Use center_alignment for background texts
It's desirable that the background texts display in the center of the
screen. So we will add the flag "--center_alignment" when generating
these images.

Bug: 121280655
Test: check and run the graphic tests
Change-Id: I6ba73ba7ef130288e950f95748e0e3fe28aa0827
2018-12-20 11:18:26 -08:00
Colin Cross
059edc0a96 Merge "Add a flag to allow unbundled builds to build SDKs from source" 2018-12-20 00:35:59 +00:00
Colin Cross
cff1cee3f1 Hide unzip warning when zip file is empty
unzip prints a warning and exits with code 1 when a zip file is empty.
Pipe the output of unzip through grep -v to hide the warning,
using PIPESTATUS to preserve the exit code of unzip, and then
filter out exit codes that are not 0 or 1.

Test: m
Change-Id: If2cf725fc3315d5996d5a7190288df46d84a59e2
2018-12-19 23:47:10 +00:00
Treehugger Robot
17e9a79fb0 Merge "Log only errors when invoking veridex." 2018-12-19 23:46:04 +00:00
Tao Bao
943fa4c523 Don't write vendor to dynamic_partitions_info.txt if it's unavailable.
If an AOSP target is built with dynamic partitions support but without
vendor.img available at build time, don't write 'vendor' to
dynamic_partitions_info.txt that will be used for building OTA packages.

We can't remove the partition from BoardConfig file, because the name
will be still needed in other places, such as generating the partition
metadata (super_empty.img). Otherwise manually flashing vendor.img at a
later point would require additional steps (e.g. `fastboot
create-logical-partition`).

Bug: 120852744
Test: `m -j dist` with and without vendor projects.
Change-Id: Ia1c3ed5bbea0255f1908958140dac97a1597586d
2018-12-19 14:17:55 -08:00
Dario Freni
ee835c736b Log only errors when invoking veridex.
Test: m
Bug: 121225084
Change-Id: I7e8cfbb7b0bcdb3f8d941086ce920da38d558145
2018-12-19 18:24:53 +00:00
Nicolas Geoffray
c857ed2acd Merge "Fix build time preopt with shared library uses." 2018-12-19 08:37:01 +00:00
Colin Cross
8e0ff1c370 Add a flag to allow unbundled builds to build SDKs from source
Mainline modules are tightly coupled to the platform, and should
build against the current SDK from source and not prebuilts. Add
a flag UNBUNDLED_BUILD_SDKS_FROM_SOURCE to specify that a
TARGET_BUILD_APPS build should build the current SDK instead of
using the prebuilts.

Bug: 121194841
Bug: 121231426
Test: no change to out/build-aosp_sailfish.ninja
Test: forrest unbundled build
Test: forrest master apps build
Test: forrest mainline modules build
Change-Id: I9ebc08745409a817d831817cb282aba1de6d81bb
2018-12-18 22:43:16 -08:00
Alex Light
2c108e08e4 Save invocation info of dex2oat runs.
It is useful to have the exact dex2oat invocation used to generate
artifacts for some tests. This adds the --write-invocation-to= flag to
the build to save this information.

Test: m droid
Bug: 119332327
Change-Id: Ie17ac73c790b0c55ef5569f03d11e7f03b5ef035
2018-12-18 14:30:27 -08:00
Treehugger Robot
81e29e0969 Merge "Add missing dependency on common javalib.jar" 2018-12-18 21:17:07 +00:00
Nicolas Geoffray
c892b60bdc Update OWNERS for dex preopt related files.
Test: N/A

Change-Id: Ib3a33c508b06a51e4b9da39658ba118a63cdc7c9
2018-12-18 19:39:20 +00:00
Colin Cross
54a71e229b Add missing dependency on common javalib.jar
Building $OUT/obj/JAVA_LIBRARIES/core-tests_intermediates/javalib.jar
is no longer updating the common intermediates:
out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates/javalib.jar
out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates/classes.jar
after I25163e91886cea6941afa25cdb529ed053278dcb.  Add the missing
dependency on common javalib.jar, which already depends on common
classes.jar.

Bug: 119412419
Bug: 121194944
Test: rm out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates/classes.jar &&
      m core-tests &&
      ls out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates/classes.jar

Change-Id: Id463d159e46c82656c364fdb2dbe53f33ee1a103
2018-12-18 11:06:25 -08:00
Nicolas Geoffray
c04f3126f4 Fix build time preopt with shared library uses.
- Handle hidl libraries.
- Handle new shared library encoding.

Test: no mismatch preopt during boot.
bug: 117845483
bug: 111174995
Change-Id: Ie4bca653594c72df2eb2fdd827bc73cfcb76b1d7
2018-12-18 17:33:02 +00:00
Colin Cross
19fbc1b9e9 Don't install boot.art when WITH_DEXPREOPT is false
Don't create the install rules for boot.art when WITH_DEXPREOPT
is not set to true, which will ensure there is no dependency on
boot.art in a normal build, which matches the behavior before
I25163e91886cea6941afa25cdb529ed053278dcb.

This should fix the Mac build, which never sets WITH_DEXPREOPT
and does not support running dex2oat.

Bug: 119412419
Bug: 121130576
Bug: 121183382
Test: lunch aosp_sailfish-eng && m WITH_DEXPREOPT=false
      files does not depend on out/target/product/sailfish/dex_bootjars/system/framework/arm/boot.art
Change-Id: I39e96b1f35f6808d3007cf1785ec3db89e0decb6
2018-12-18 15:36:36 +00:00