Commit graph

38202 commits

Author SHA1 Message Date
Dan Willemsen
c0a0f2dc1f Convert to Android.bp
Test: m atree fs_config fs_config_generate_test fs_config-unit-tests fs_get_stats zipalign
Test: cd out/host/linux-x86/nativetest64/fs_config-unit-tests ./fs_config-unit-tests
Change-Id: I3c5403a7f1cf221715eb52a41c640af9afcee175
2017-09-09 13:47:34 -07:00
Tianjie Xu
149b7fbf08 Add a verbose option to RunCommand in build_image.py
Make the build log less verbose; also print the result for
AdjustPartitionSizeForVerity().

Bug: 65292710
Test: Run add_img_to_target_files with and without "-v" and check
the logs.

Change-Id: Icdc86197ce69db036658ea9e77cc4ebe1750463b
2017-09-09 03:42:31 +00:00
Treehugger Robot
952f1e5161 Merge "Make -ldl -lrt -lpthread implicit for host builds" 2017-09-09 01:32:23 +00:00
Colin Cross
0bd335f9b0 Make -ldl -lrt -lpthread implicit for host builds
Instead of requiring every host module to specify -ldl -lrt -lpthread
and then break the mac build because -lrt doesn't exist, make them
implicit to match the behavior of modules built for the device.

Test: m -j checkbuild
Change-Id: I7b5b5289a41cd8f6e7dc2da59400955d867ee783
2017-09-08 16:43:55 -07:00
Treehugger Robot
c9916ddbd7 Merge "Remove (TARGET|HOST)_BUILD_TYPE path modifications" 2017-09-08 23:40:36 +00:00
Dan Willemsen
d6ed368fde Remove (TARGET|HOST)_BUILD_TYPE path modifications
They don't really affect anything general in android except for the
output path. Debug builds have been broken due to Soong not respecting
*_BUILD_TYPE, and with ninja, we'll properly rebuild if you switch
between release and debug flags. So just remove the path difference.

Bug: 65453318
Test: TARGET_BUILD_TYPE=debug m
Test: code search to find all the users
Change-Id: I5c6a322e0187d96cdaeef891778508c698f841e0
2017-09-08 14:33:34 -07:00
Treehugger Robot
28e1862411 Merge "Support excluding overlays when enforcing RRO" 2017-09-08 03:21:26 +00:00
Jaekyun Seok
ccee95e6ec Support excluding overlays when enforcing RRO
PRODUCT_ENFORCE_RRO_EXCLUDED_OVERLAYS will be used to specify overlays
to be excluded from enforcing RRO.

The excluded overlays will be applied into the original package.

Bug: 63600240
Bug: 65001751
Test: succeeded building with
PRODUCT_ENFORCE_RRO_EXCLUDED_OVERLAYS := \
    vendor/google/google_overlay/static_only \
    vendor/google/nexus_overlay/common/static_only
and confirmed that config_webview_packages existed in framework-res.apk
with the overlayed value, but not in framework-res__auto_generated_rro.apk.

Change-Id: I0bfb44fc7726710bb78d9100404bc6dd29d06a73
2017-09-08 10:00:46 +09:00
Treehugger Robot
11d1c9b02f Merge "Use soong_java_prebuilt.mk to export soong jars to java" 2017-09-07 22:57:21 +00:00
Treehugger Robot
0b14739e0f Merge "Accept alternative email addresses." 2017-09-07 22:16:25 +00:00
Colin Cross
be1f792a83 Use soong_java_prebuilt.mk to export soong jars to java
Instead of trying to squeeze soong jars through prebuilt_internal.mk,
make a separate soong_java_prebuilt.mk.

Test: m -j checkbuild
Change-Id: I078e67ce58b2b2e0acf4b1ec28823e96b16a0cec
2017-09-07 13:46:02 -07:00
Chih-Hung Hsieh
2b1efe63cf Accept alternative email addresses.
Some OWNERS files use secondary email addresses, so we only
check existence of _account_id and email attributes.

Test: run against existing OWNERS files
Change-Id: I6f0804a8a90b7a23783c3fe45686d4d973876ed1
2017-09-07 13:07:26 -07:00
Tao Bao
aa599f3916 Merge "Skip checking files that have less blocks in block map." 2017-09-07 17:50:51 +00:00
Tao Bao
631b3a031c Merge "releasetools: Validate A/B OTA payload signatures." 2017-09-06 20:35:07 +00:00
Tao Bao
b418c30e3a Skip checking files that have less blocks in block map.
When creating ext4 images with mke2fs, it may skip allocating some
blocks if they contain all zeros. As a result, there could be less
blocks listed in the block map than the actual file length.

For example, for a file with a length of 112200-byte (27+ blocks),
the listed blocks in block.map could be '43665-43688' (24 blocks).
Because some all-zero blocks are not taking actual space.

The generated ext4 images are perfectly valid - kernel will figure out
that data block is not allocated and writes all zeros into user buffer.
However, we can't fully reconstruct a file from its block list in our
Python script. Ideally this can be avoided by mounting or parsing an
ext4 image directly, which is yet to be supported in our script.

This CL skips checking for such files to avoid failing
validate_target_files.py.

Bug: 65213616
Test: validate_target_files.py passes on targets with mke2fs generated
      images (e.g. marlin).
Change-Id: Id9cc59e345b9283844044ef94ceb5702f0ca0526
2017-09-05 15:53:24 -07:00
Steven Moreland
fdce598ed8 aosp_arm64_ab is vndk
Test: builds with BOARD_VNDK_VERSION=current
Test: test only one product is using this w/ multiproduct_kati
Bug: 65375837
Merged-In: I972ab897a8bc23ba5c5f6bf133db0017e4334f40
Change-Id: I972ab897a8bc23ba5c5f6bf133db0017e4334f40
2017-09-05 22:31:30 +00:00
Mathieu Chartier
71f622e247 Merge "Fix boot image profile in make files" 2017-09-05 17:14:08 +00:00
Mathieu Chartier
a2cc65b099 Fix boot image profile in make files
Update location to framework/base/config instead of frameworks/base

Fixed dex2oat dependency to my_out_boot_image_profile_location
instead of my_out_profile_location.

Bug: 37966211
Test: make and flash

Merged-In: I446f11216cf6342861bbbf56ac5c4da2f36fb755

(cherry picked from commit 75edf540e2)

Change-Id: I4a34be8a344880d3e2ccaea3ed0e6390616e0d6c
2017-09-02 23:47:32 +00:00
Treehugger Robot
2fc0f4e484 Merge "Fix the build breakage on git-wear-master/mirror-aosp-master-with-vendor" 2017-09-02 19:26:48 +00:00
Nan Zhang
9e37028db0 Fix the build breakage on git-wear-master/mirror-aosp-master-with-vendor
git-wear-master/mirror-aosp-master-with-vendor were still broken due to
my Make synatx mistakes.

Bug: b/64308460

Test: download <git-wear-master> branch locally, and then do:
m -j out/target/product/anglefish/package-stats.txt

Change-Id: Ic1a03b452db7583811a3a3b74067f1fc54f873b4
2017-09-02 10:25:17 -07:00
Nan Zhang
99e44773ba Merge "Fix the build breakage on git-wear-master/mirror-aosp-master-with-vendor" 2017-09-02 04:57:12 +00:00
Nan Zhang
d05e19df41 Fix the build breakage on git-wear-master/mirror-aosp-master-with-vendor
The problem is that when I added .KATI_RESTAT for javalib.jar, I didn't
change the function: create-empty-package to generate javalib.jar.tmp.

The problem causes the build breakage on MacOS/Jack.

Bug: b/64308460

Test: download <git-wear-master> branch locally, and then do:
m -j out/target/product/angelfish/package-stats.txt

Change-Id: I9a5d74caaf164b44676e456050b4f8a5b3bdded0
2017-09-01 18:52:41 -07:00
Tao Bao
a198b1e964 releasetools: Validate A/B OTA payload signatures.
$ PYTHONPATH=$PYTHONPATH:system/update_engine/scripts \
    ./build/make/tools/releasetools/check_ota_package_signature.py \
    build/target/product/security/testkey.x509.pem \
    out/dist/aosp_marlin-ota-eng.zip

Package: out/dist/aosp_marlin-ota-eng.zip
Certificate: build/target/product/security/testkey.x509.pem
...
Whole package signature VERIFIED

Verifying A/B OTA payload signatures...
...
Payload signatures VERIFIED

Bug: 65261072
Test: Signed a package and its payload with the right keys; ran the
      command above.
Test: Signed the payload with a different key; ran the command above and
      observed the reported verification failure.
Change-Id: If626ecb327a9826cd0956eef94914c939068a7d1
2017-09-01 14:33:15 -07:00
Tao Bao
27bfc86d8b Merge "Pack system/update_engine/scripts into otatools.zip." 2017-09-01 16:45:08 +00:00
Miodrag Dinic
0297f39904 Fix mips emulator boot
The following commit introduced regression:
    7b5e1ab emulator: squash misc modifications from oc-emu-dev

Emulators for mips should also use unencrypted data partition like arm.
Encryption is only enabled for Intel.

Change-Id: I3dba08621d8f679a707f516fff735bba31bfc629
Signed-off-by: Miodrag Dinic <miodrag.dinic@imgtec.com>
2017-09-01 17:07:28 +02:00
Bo Hu
cfde9a84bc Merge "sdk: add vendor-qem.img into the deps list" 2017-09-01 00:07:48 +00:00
Treehugger Robot
872246de0f Merge changes from topic "turbine"
* changes:
  Revert "Revert "Add Turbine as part of java build toolchain in Make.""
  Remove GLOBAL_JAVAC_DEBUG_FLAGS
2017-09-01 00:01:31 +00:00
bohu
18d1868580 sdk: add vendor-qem.img into the deps list
if it exists. Fix master-without-vendor sdk_x86-sdk build

Change-Id: I5656e7124d30e71120044cce668c54793f77208a
Merged-In: I5656e7124d30e71120044cce668c54793f77208a
(cherry picked from commit a508578811)
2017-08-31 16:57:44 -07:00
Tao Bao
3f4ea7cb88 Pack system/update_engine/scripts into otatools.zip.
The scripts will be needed by OTA releasetools, for parsing A/B OTA
payload.

Bug: 65261072
Test: `m otatools-package` and check for system/update_engine/scripts.
Change-Id: I5cb54561a5fb0454a37879ca20afa95b82ffdefe
2017-08-31 16:42:38 -07:00
Treehugger Robot
14f225b762 Merge "Only generate breakpad symbols for ELF binaries" 2017-08-31 23:37:41 +00:00
Steve Fung
445beae409 Only generate breakpad symbols for ELF binaries
When BREAKPAD_GENERATE_SYMBOLS is set to true, the build will attempt
to run dump_syms for all dynamic binaries.  However some build targets
are now using cc_prebuilt_binary for installing python host scripts.
This causes dump_syms to return an error, causing the build to fail.
So check instead if the file is an ELF binary before running dump_syms.

Bug: 65065674
Test: Built AT target successfully.
Merged-In: Ibe7d3ebd312376600cf21efa111489451a4e7578
Change-Id: Ibe7d3ebd312376600cf21efa111489451a4e7578
(cherry picked from commit ee848655db)
2017-08-31 15:57:44 -07:00
Bo Hu
35149ca0b7 Merge changes from topic "aosp-emulator-oc"
* changes:
  emulator: fix widevine drm vndbinder denial
  emulator: fix selinux issues
  emulator: squash misc modifications from oc-emu-dev
  emualtor: keep libopenjdkjvmti*.so on sdk images
  emulator: move rild.libpath to vendor
  sdk:enable emulator to launch in build environment
  build-emulator: fully treblize emulator image
  Build vendor image for emulator
2017-08-31 22:56:31 +00:00
Treehugger Robot
e7a0516835 Merge "Move default native bridge value to build.prop" 2017-08-31 22:08:29 +00:00
Nan Zhang
b3ec534bd1 Revert "Revert "Add Turbine as part of java build toolchain in Make.""
This reverts commit 33dcd0c5eb.

Reason for revert: <stub.jar.toc needs classes.jar.toc which is no longer existed after Turbine was introduced. So use classes.jar to represent stub.jar.toc>

Bug: b/64308460
Test: m clean && time m -j32 ANDROID_COMPILE_WITH_JACK=true
Change-Id: If618993f1e0c789d93cc15664212603f994fd460
2017-08-31 14:56:54 -07:00
Colin Cross
9a594e05af Remove GLOBAL_JAVAC_DEBUG_FLAGS
GLOBAL_JAVAC_DEBUG_FLAGS is no longer set, -g is already included
in the javac command line.  Jack is on its way out, just use -g
directly there for now.

Test: m -j checkbuild
Change-Id: Ib99c248bbb8b65fa2cd2b55449a502fc20deffa8
2017-08-31 14:48:31 -07:00
Nan Zhang
91ffbf2fbe Merge "Revert "Add Turbine as part of java build toolchain in Make."" 2017-08-31 20:32:46 +00:00
Jeff Gaston
2c0442238b Merge "Implement LOCAL_TARGET_REQUIRED_MODULES" 2017-08-31 20:14:01 +00:00
Nan Zhang
33dcd0c5eb Revert "Add Turbine as part of java build toolchain in Make."
This reverts commit 0739155c86.

Reason for revert: <sdk_google_aw_x86-sdk (linux) build 4310016 in git_master is broken>

Change-Id: I525d48557bd0425917e61a85f596663ccc63c887
2017-08-31 19:56:59 +00:00
Lev Rumyantsev
be80acfd1a Move default native bridge value to build.prop
Before this change it was part of default.prop, which is applied
before init.rc is executed, so that scripts cannot override the property.

In contrast, build.prop is applied at "init-late" stage,
so that one has a chance to override the property in scripts using
"init" or "init-early" triggers.

(cherry-picked from 74b2da9db67f5da2195c9b07dab22c868934e396)

Test: fugu still works
Bug: 63133475
Merged-In: I0842abaaec1d353ebe4debda6dfe3e2c42146786
Change-Id: I0842abaaec1d353ebe4debda6dfe3e2c42146786
2017-08-31 12:13:37 -07:00
Nan Zhang
0b23748128 Merge "Add Turbine as part of java build toolchain in Make." 2017-08-31 18:01:43 +00:00
Treehugger Robot
6942dfb65e Merge "Build: Change SANITIZE_LITE install settings" 2017-08-31 17:16:26 +00:00
Andreas Gampe
4ed21d10e8 Build: Change SANITIZE_LITE install settings
Under SANITIZE_LITE, the default app_process is not instrumented.
Embedding sanitized libraries into APKs will lead to crashing apps.
So move second-stage APKs to /data/asan.

The tradeoff is that for now we won't run these sanitized binaries.
Adding support for that is future work.

Also do not do a rebuild of the boot image. This would invalidate
the first-stage results. Note that this is technically dangerous,
as stack overflow guard sizes will not be adapted for ASAN runs.
However, this is a general incompatibility.

Also do not rebuild system_other. Apps are not rebuilt, so it will
create an empty image.

(cherry picked from commit 481660ef34)

Bug: 36458146
Test: m && m SANITIZE_TARGET=address SANITIZE_LITE=true
Merged-In: I3898bc53cad264529f126e6bf0af9c6ca1736877
Change-Id: I3898bc53cad264529f126e6bf0af9c6ca1736877
2017-08-31 08:56:18 -07:00
Treehugger Robot
6803a3444a Merge "Copy adbd from system/bin to recovery/root/sbin" 2017-08-31 06:22:16 +00:00
Treehugger Robot
b9710fb602 Merge "master is now P" 2017-08-31 01:14:38 +00:00
bohu
dc745a9090 emulator: fix widevine drm vndbinder denial
[   86.252399] type=1400 audit(1503684692.153:25): avc: denied { read write } for pid=4160 comm="android.hardwar" name="vndbinder" dev="tmpfs" ino=5163 scontext=u:r:hal_drm_widevine:s0 tcontext=u:object_r:vndbinder_device:s0 tclass=chr_file permissive=0

BUG: 64726466

Test: build sdk_gphone_x86-user target, launch it
and the above denial should be fixed.

Change-Id: Ied1268878236c42fbb0751a0f33014b332d78c32
Merged-In: Ied1268878236c42fbb0751a0f33014b332d78c32
2017-08-30 17:13:55 -07:00
bohu
913a990249 emulator: fix selinux issues
with cas/camera/drm hals

BUG: 64726466

Test: build aosp_x86-eng, boot emulator
without camera/drm hals killed by
selinux avc denials; camera can take
pictures

Change-Id: I8a154fdb5d7aa7763aab2b912976eb9e1d329cdb
Merged-In: I8a154fdb5d7aa7763aab2b912976eb9e1d329cdb
2017-08-30 17:13:51 -07:00
bohu
7b5e1abacb emulator: squash misc modifications from oc-emu-dev
Change-Id: I7380292cd4dc851a987683bdf61d511dbf74aff6
Merged-In: I7380292cd4dc851a987683bdf61d511dbf74aff6
2017-08-30 17:13:47 -07:00
bohu
b7e2fabe38 emualtor: keep libopenjdkjvmti*.so on sdk images
BUG: 38353037

Those libopenjdkjvmti*.so files are needed by profilers.
Those files are shipped on real devices as well.

Change-Id: Iac7dd2844b0f3ea5194dec8732fbaacf53c4bf4a
Merged-In: Iac7dd2844b0f3ea5194dec8732fbaacf53c4bf4a
2017-08-30 17:13:42 -07:00
bohu
bc43c4ec29 emulator: move rild.libpath to vendor
BUG: 62137708
Test: buld sdk_gphone_x86-user, launch
emulator make sure radio works

Change-Id: I4ef1483a8d95a74b54deb6f0d4b2461c733c8140
Merged-In: I4ef1483a8d95a74b54deb6f0d4b2461c733c8140
2017-08-30 17:13:37 -07:00
bohu
ac0273f162 sdk:enable emulator to launch in build environment
Recent changes in emulator requires advancedFeatures.ini,
encryptionkey.img and new kernels (such as 3.18) at OUT directory
so emulator can find them.

This CL set those up as part of the build process.

Change-Id: Ib3b7c4c48a22cecb44255e643402fd1c37797522
Merged-In: Ib3b7c4c48a22cecb44255e643402fd1c37797522
2017-08-30 17:13:32 -07:00