Commit Graph

47279 Commits

Author SHA1 Message Date
Colin Cross e0006c91ca Merge "Pass privileged dexpreopt module configuration to Soong" 2018-10-26 00:00:12 +00:00
Treehugger Robot fea4263ec1 Merge "releasetools: Fix the error message." 2018-10-25 22:35:37 +00:00
Tao Bao f3fc62c8a0 releasetools: Fix the error message.
This avoids showing a message as below:

raise BuildImageError("Failed to get tune2fs usage:\n{}".format(output))
UnboundLocalError: local variable 'output' referenced before assignment

The `output` won't be set under such a case, which unfortunately hides
the real cause. This CL addresses the issue by letting it throw
implicitly, which contains the command and outputs.

Test: `m dist`
Test: `python -m unittest test_build_image`
Change-Id: Icf015bab8869d150516246ed73552f6502127cdf
2018-10-25 12:29:44 -07:00
Treehugger Robot 1bc81731c8 Merge "build_image: improvements to right size for dynamic partitions" 2018-10-25 15:25:49 +00:00
Treehugger Robot 73b998ad2e Merge "Revert "ATest: GTest auto gen config support run-test-as."" 2018-10-25 08:53:24 +00:00
Bill Yang a8fcf6c893 Revert "ATest: GTest auto gen config support run-test-as."
This reverts commit fab820c5f1.

Reason for revert: sed -i requires an argument on mac, break build on mac.

Change-Id: I0b72e28968072afbbb862bd827ee59764dd8a0be
2018-10-25 07:11:26 +00:00
Bill Yi 470dacd220 Merge pie-platform-release to aosp-master - DO NOT MERGE
Change-Id: I37435c7f41f3c040f4aaecfb7efc259b353a6388
2018-10-24 14:54:21 -07:00
Treehugger Robot 79c6c5b8be Merge "Allow target to specify LOCAL_PREFER_INTEGRITY" 2018-10-24 21:46:23 +00:00
Victor Hsieh e53dd7b20b Allow target to specify LOCAL_PREFER_INTEGRITY
The option will:
 - Produce APK with uncompressed dex
 - Declare to prefer integrity in manifest

Test: unzip -vl, dex compression looks correct with the option provided
      or not.
Test: similarly, aapt dump correct attribute
Bug: None

Change-Id: I16b9a37255150c2ad84af84087dfabb536a3b07a
2018-10-24 11:40:07 -07:00
Colin Cross aefeae367e Merge "Reduce the propagation of LOCAL_DEX_PREOPT := nostripping" 2018-10-24 16:47:12 +00:00
Treehugger Robot 2fc5669b62 Merge "ATest: GTest auto gen config support run-test-as." 2018-10-24 13:53:50 +00:00
David Brazdil 70b26e5c98 Merge "Revert "Change command-line flags of hiddenapi"" 2018-10-24 12:38:57 +00:00
David Brazdil 5381eb684e Revert "Change command-line flags of hiddenapi"
This reverts commit 6b00bfd2fb.

Reason for revert: marlin running out of space

Exempted-From-Owner-Approval: Needed to unblock build, no
  buildcops on call in EMEA today.
Change-Id: I9e86545c8ada2523bc21116c6e958f69fb94dc26
2018-10-24 12:37:41 +00:00
David Brazdil 7658657ee4 Merge "Change command-line flags of hiddenapi" 2018-10-24 09:19:00 +00:00
Colin Cross 3aa2f8f69b Pass privileged dexpreopt module configuration to Soong
Pass DONT_UNCOMPRESS_PRIV_APPS_DEXS, PRODUCT_LOADED_BY_PRIVILEGED_MODULES,
DEX_PREOPT_DEFAULT, and WITH_DEXPREOPT to Soong so it can determine when
to store uncompressed dex files in APKs and when to strip them.

Also convert DEXPREOPT.$(TARGET_PRODUCT).$(LOCAL_MODULE).CONFIG=disabled
to a DEXPREOPT_DISABLED_MODULES list, and export it to Soong.

Test: m checkbuild
Change-Id: I8652032d4b9f5d2e119e73acdf91b8148563eedd
2018-10-23 22:33:07 -07:00
Colin Cross fc782ad949 Reduce the propagation of LOCAL_DEX_PREOPT := nostripping
nostripping causes confusing double negatives, allow nostripping
in LOCAL_DEX_PREOPT and DEFAULT_DEX_PREOPT, but convert to
LOCAL_STRIP_DEX outside of dex_preopt_odex_install.mk.

Test: m checkbuild
Change-Id: I996e9258ce20c394900d9fe937d638bc2ab8589d
2018-10-23 22:33:07 -07:00
Treehugger Robot f26f313d17 Merge "libvixl-arm and -arm64 are no longer VNDK libraries." 2018-10-24 01:41:57 +00:00
Julien Desprez b8ca22ca30 Merge "Remove host proto lib from cts jars" 2018-10-23 23:05:09 +00:00
Mark Salyzyn 780f595fac build_image: improvements to right size for dynamic partitions
If partition_reserved_size is 0 or undefined, and
use_dynamic_partition_size is true, we should approach no space
and no free inodes automatically.

Estimate the space and number of inodes required, then do a first
pass build to see how much space actually used, and use those values
to refine the estimate.

Depends on tune2fs to report the characteristics of the filesystem,
so only support for ext filesystems.  In the future if there has to
be a more generic ability, either a tool per a filesystem has to be
found, or we will need root capabilities to mount the filesystem to
acquire the characteristics live from the host system.

Test: manual + python -m unittest test_build_image
Bug: 111302946
Change-Id: I933a388be43516b6de7b5007b296765bd5556fde
2018-10-23 15:14:00 -07:00
Tao Bao 7ceac730cf Merge "releasetools: Include descriptor of `vbmeta_system.img` in `vbmeta.img`." 2018-10-23 20:03:47 +00:00
Julien Desprez e483544cf5 Remove host proto lib from cts jars
The lib is already statically included in tradefed.jar.

Test: run cts-unit-tests
Bug: 118297021
Change-Id: I073b68216870b1e744ee35db82a7e03f11db6782
2018-10-23 09:38:09 -07:00
Tianjie Xu 1e0742e2c3 Merge "Install the ota keys under recovery as a zipfile" 2018-10-23 02:40:55 +00:00
Treehugger Robot b64a0f3b03 Merge "Only set set_hashtree_disabled_flag in top-level vbmeta.img." 2018-10-22 22:44:54 +00:00
Tao Bao 7106420add releasetools: Include descriptor of `vbmeta_system.img` in `vbmeta.img`.
Chained vbmeta images should be included into the top-level vbmeta.img
as chained partitions. It's done in the path of `m`, but not `m dist`.

Bug: 118115607
Test: `m dist` a target that uses chained vbmeta.
    a) Check that the `vbmeta.img` in target-img.zip contains the image
       descriptor of `vbmeta_system.img` (`avbtool info_image`).
    b) `avbtool verify_image --image vbmeta.img \
            --expected_chain_partition \
                vbmeta_system:1:/path/to/vbmeta_system/pubkey`
    c) `avbtool verify_image --image vbmeta_system.img`
Change-Id: I064e583b247c44b9b2f19355838550bb5dbb8f26
2018-10-22 15:27:54 -07:00
Tianjie Xu ffbe6b9785 Install the ota keys under recovery as a zipfile
Recovery can now parse the pem encoded x509 keys from a zipfile. So
instead of dumping the keys into a text file with some intermediate format,
we can simply create a zipfile with the keys.

Bug: 116655889
Test: make bootimage and check the generated zipfile, run sign_target_files_apks
Change-Id: Ib76feecfb26d6be713a07644e80ec96133759004
2018-10-22 14:47:15 -07:00
Treehugger Robot 4c95ffa8ef Merge "Remove USE_CLANG_LLD[=false]" 2018-10-22 20:26:27 +00:00
Tao Bao 240dcb8c45 Only set set_hashtree_disabled_flag in top-level vbmeta.img.
It's sufficient to have the flag in top-level vbmeta.img, and libavb
expects no disable flag in chained vbmeta.img.

Bug: 118115607
Test: `m vbmetaimage` with an -eng target using vbmeta_system.img. Check
      the flag in the generated image
      (`avbtool info_image --image vbmeta_system.img`).
Change-Id: Ia429dd8a5cf0243e16ae305da210d3ea27c68abf
2018-10-22 13:06:49 -07:00
Colin Cross 1e0b2296ad Merge "Always define sdk_addon as phony" 2018-10-22 18:22:48 +00:00
Colin Cross d0dbeb3758 Always define sdk_addon as phony
dist-write-files will add dist targets to the sdk_addon target,
but the sdk_addon target is not declared as phony when building
with mm (ONE_SHOT_MAKEFILE set), causing:
build/make/core/main.mk:1495: error: writing to readonly directory: "sdk_addon"

Always define sdk_addon as phony even if ONE_SHOT_MAKEFILE is set.

Bug: 118144231
Test: mm
Change-Id: I99d14a98a7597ebd694c765f94b0d6f4486860dc
2018-10-22 10:42:44 -07:00
Treehugger Robot 5546a543ce Merge "Put maxTargetSdk=P APIs onto light greylist." 2018-10-22 15:56:49 +00:00
David Brazdil 6b00bfd2fb Change command-line flags of hiddenapi
The `hiddenapi` build tool now reads a dex file from one filename
and writes a modified dex file to another. Change the build rule
to reflect it.

Test: m
Change-Id: I2c4b080dbfdf348f230e7544c228cfd7419d1c64
2018-10-22 14:08:21 +01:00
Mathew Inwood bcde1c52a6 Put maxTargetSdk=P APIs onto light greylist.
Since the per-SDK level enforcement support is not ready in ART yet, we
can't implement the correct enforcement for maxTargetSdk=P. Putting these
APIs on the dark greylist causes problems for existing apps, so put them
on the light greylist instead.

Test: m
Bug: 117899984
Change-Id: Ib3dad2f50eb6a769ba9f21cec4bac01275888ef6
2018-10-22 13:44:15 +01:00
David Brazdil 6a038d662b Merge "Add UNSAFE_DISABLE_HIDDENAPI_FLAGS to skip hiddenapi processing" 2018-10-22 12:43:39 +00:00
Anton Hansson 2bfa7401c7 Merge "Re-add product_MODULES" 2018-10-22 12:28:56 +00:00
Dan Willemsen 2eea59973b Remove USE_CLANG_LLD[=false]
Test: treehugger
Change-Id: I6dd632e9501f82b22f3f0c084039808e37b37742
2018-10-21 19:55:40 -07:00
Treehugger Robot f1dafa30e4 Merge "Fix creating _dist_<goal> targets under !dist" 2018-10-21 17:55:58 +00:00
Dan Willemsen c2fdc230fc Fix creating _dist_<goal> targets under !dist
I had initially thought that we would have created the rule when marking
it as PHONY, but that's apparently not the case.

Bug: 117463001
Test: m test-art-host-gtest
Change-Id: I5e397423dfb138725db0e3e07b2630f8e872bb12
2018-10-21 08:56:27 -07:00
Treehugger Robot b519ed5983 Merge "Stop passing DIST_DIR to Soong" 2018-10-21 07:59:14 +00:00
Dan Willemsen 3e8eb377db Stop passing DIST_DIR to Soong
Test: m dist
Change-Id: I812606595703299f5e333d4e62bc1abeaad15c05
2018-10-20 21:37:44 -07:00
Treehugger Robot b4b876f6a9 Merge "Fix dist-for-goals with no targets" 2018-10-21 03:07:04 +00:00
Dan Willemsen c904e48cc5 Fix dist-for-goals with no targets
Bug: 117463001
Test: m dist vts
Change-Id: I9bfe01472dcf3d3729a109e4de383d35e3af9df0
2018-10-20 16:59:41 -07:00
Dan Willemsen ac270964f1 Merge changes from topic "refactor_dist"
* changes:
  Create a new kati packaging step; move dist
  Refactor common makefile fragments
2018-10-20 22:50:10 +00:00
Dan Willemsen 78c40be560 Create a new kati packaging step; move dist
Instead of looking at `dist` and DIST_DIR directly in the Kati Build
step, always write out information about every call to dist, then create
the rules in another ckati run.

So instead of having:

  dist:    <goal> -> <dist> -> <output>
                \______________↑

  nodist:  <goal> -----------> <output>

Always use another phony target in the Kati Build step:

   <goal> ---> <output>
        \----> _dist_<goal>

Then in the packaging step (which is much faster), choose between dist
and no dist:

  dist:   _dist_<goal> -> <dist> -> <output>

  nodist: _dist_<goal>

Bug: 117463001
Test: m dist
Change-Id: Ic96bb6356740300dd3113f6ed699e6a619360c40
2018-10-20 21:44:44 +00:00
Dan Willemsen 7ddc50a066 Refactor common makefile fragments
In preparation for setting up another Kati stage, move some common
settings and tools into a common folder. This way it's a bit easier to
see that they're safe to use, and that they shouldn't depend on anything
outside of the common folder.

Bug: 117463001
Test: build-aosp_arm.ninja is the same before and after
Change-Id: Ief4b75a4dbe45b73ffd03bf32c60695c816d979d
2018-10-20 14:43:58 -07:00
Treehugger Robot 17c9e2a296 Merge "Workaround Legancy GSI for some Wifi firmware" 2018-10-19 22:22:03 +00:00
Bill Yi 0f693d3f25 Merge "Merge pi-dr1-dev to aosp-master" 2018-10-19 21:21:30 +00:00
Florian Mayer 0c41ee3b35 Merge "Build heapprofd per default." 2018-10-19 20:45:02 +00:00
Bill Yi 342e71668c Merge pi-dr1-dev to aosp-master
Change-Id: I3d070795c58033b318ff9e3e1e7acd0511b84c4d
2018-10-19 12:20:09 -07:00
David Brazdil 8a6b9a7baf Add UNSAFE_DISABLE_HIDDENAPI_FLAGS to skip hiddenapi processing
Setting environment variable UNSAFE_DISABLE_HIDDENAPI_FLAGS=true
will skip the build step which annotates dex files with information
about public and non-public API membership. This is meant to speed
up incremental local builds.

USE AT OWN RISK: Dex files built with this flag will execute with
hidden API access checks disabled and therefore may exhibit different
behaviour compared to production code.

WARNING: Some JARs cannot be compiled with this flag as ART hardcodes
hidden API access flags of intrinsified methods. Attempting to compile
dex files containing such methods will trigger an assertion.

Test: UNSAFE_DISABLE_HIDDENAPI_FLAGS=true mmm frameworks/base
Bug: 113278235
Bug: 112388925
Change-Id: I51fe99ab53e1bb2aa0db64b22a321dd1e1ed47e1
2018-10-19 20:16:49 +01:00
SzuWei Lin 11892a4b9a Workaround Legancy GSI for some Wifi firmware
Bug: 117963911
Test: Turn on wifi with aosp_arm64_ab-userdebug on Pixel 1/2/3 devices
Change-Id: I0d516876522a687709ff21cbfc5bc0cc415b8335
2018-10-19 17:37:20 +08:00