Commit graph

41286 commits

Author SHA1 Message Date
Treehugger Robot
98fce11494 Merge "Fix INSTALLED_ -> BUILT_ missing refactor piece." 2018-01-25 21:23:28 +00:00
Andreas Gampe
cf528ca79d Warn.py: Update errorprone categories
From current tip-of-tree.

Bug: 72451126
Test: build/make/tools/warn.py errorprone.log
Change-Id: I1d632fb8801b74af695b4f7f464a99792e46637a
2018-01-25 12:25:20 -08:00
David Brazdil
221848b181 Merge "Apply hiddenapi build tool on boot jars" 2018-01-25 19:51:29 +00:00
Steven Moreland
915f35166f Fix INSTALLED_ -> BUILT_ missing refactor piece.
Some of the dependencies for target-files-package were
refactored but only partially. Since these are satisfied
by transitive dependencies, the problem wasn't noticed
earlier.

Bug: N/A
Test: target-files-package finds dependencies

Change-Id: Ibdd7587f87735148e55d3b9835478075b6547efc
2018-01-25 10:45:26 -08:00
Primiano Tucci
27be3bf0e2 Merge "Add perfetto daemons and cmdline client to core makefiles" 2018-01-25 18:38:09 +00:00
Primiano Tucci
90ebe5baf2 Add perfetto daemons and cmdline client to core makefiles
Perfetto is a tracing daemon that allows both to capture
traces from the kernel (via the traced_probes binary)
and allows data to be pushed from userspace (via the
traced binary). Tracing is never enabled by default
and can be kicked off either via statsd or by the shell.
The daemon executables are split only for the sake
of security and isolating SELinux domains. Under the
hoods they are just two shells that run code in the
same shared libarary.
See go/perfetto-sys-health-details for expected
binary / memory / overhead impact.

Bug: 72484603
Test: builds (see go/perfetto-test-spec for test plan)
Change-Id: Ib5fbd7cd2113010398802b622363b75f3eef738d
2018-01-25 15:32:11 +00:00
David Brazdil
b7f00ed2af Apply hiddenapi build tool on boot jars
Restrictions on usage of private APIs require encoding new information
into the dex files of the boot class path. ART now contains a new build
tool called `hiddenapi` which takes three lists of class member
signatures (blacklist, light and dark greylist), finds the class members
in their respective dex files and modifies their access flags in place.

This patch invokes the `hiddenapi` tool on all JARs in
PRODUCT_BOOT_JARS. For Java libraries built with Makefiles the tool is
invoked after the dexer directly on DEX files. For Soong-built
libraries, the build system has to unzip the JAR produced by Soong,
apply `hiddenapi` and rezip again. This is due to the fact that the
PRODUCT_BOOT_JARS variable is not available to Soong.

Bug: 64382372
Test: m
Change-Id: I6ce897d204459c8b6f46ed49e0909ff76c08a9ed
2018-01-25 09:22:08 +00:00
Nicolas Geoffray
f90b7e1948 Merge "For prebuilts, use the built_module for nostripping dexpreopt." 2018-01-25 08:58:48 +00:00
David Brazdil
a5cc50ab4c Merge "Add hidden API list file variables" 2018-01-25 07:55:35 +00:00
Jaekyun Seok
8fe7f9bfa2 Merge "Support /product partition" 2018-01-25 03:53:37 +00:00
Alexey Polyudov
01b873b2de Merge "Fix syntax error in makefile soong namespaces handling" 2018-01-25 03:33:58 +00:00
Treehugger Robot
88114b0b0b Merge "healthd: fix /sys denials." 2018-01-25 02:01:58 +00:00
Alexey Polyudov
ea55e8c86c Fix syntax error in makefile soong namespaces handling
Change-Id: I5254f7877422e23f3c3b69f37f1be849a12e296a
Signed-off-by: Alexey Polyudov <apolyudov@google.com>
2018-01-24 17:01:21 -08:00
Jaekyun Seok
b7735d8105 Support /product partition
This CL adds the following build flags to support building product partition
from Android build system.
- BOARD_AVB_PRODUCT_ADD_HASHTREE_FOOTER_ARGS
- BOARD_AVB_PRODUCT_KEY_PATH
- BOARD_AVB_PRODUCT_ALGORITHM
- BOARD_AVB_PRODUCT_ROLLBACK_INDEX_LOCATION
- BOARD_PREBUILT_PRODUCTIMAGE
- BOARD_PRODUCTIMAGE_EXTFS_INODE_COUNT
- BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE
- BOARD_PRODUCTIMAGE_PARTITION_SIZE
- BOARD_PRODUCTIMAGE_SQUASHFS_BLOCK_SIZE
- BOARD_PRODUCTIMAGE_SQUASHFS_COMPRESSOR
- BOARD_PRODUCTIMAGE_SQUASHFS_COMPRESSOR_OPT
- BOARD_PRODUCTIMAGE_SQUASHFS_DISABLE_4K_ALIGN
- BOARD_USES_PRODUCTIMAGE
- LOCAL_PRODUCT_MODULE
- PRODUCT_FOOTER_ARGS
- PRODUCT_PRODUCT_BASE_FS_PATH
- PRODUCT_PRODUCT_VERITY_PARTITION
- TARGET_COPY_OUT_PRODUCT
- TARGET_OUT_PRODUCT*

And PRODUCT_PRODUCT_PROPERTIES is added to save product-specific
properties in /product/build.prop.

Bug: 64195575
Test: succeeded building product.img with BOARD_PRODUCTIMAGE_PARTITION_SIZE,
BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE and PRODUCT_PRODUCT_VERITY_PARTITION.

Change-Id: I774e6a38003734421591e51bed103802ff84f432
2018-01-25 09:33:58 +09:00
Treehugger Robot
11e95dedd2 Merge "Add Nan to OWNERS" 2018-01-25 00:31:49 +00:00
David Brazdil
ae6915ead0 Add hidden API list file variables
Add variables for the hidden API blacklist and dark and light greylist
files. These are text files with signatures of boot class path class
member with restricted access for non-platform code.

Bug: 64382372
Test: m
Change-Id: I5639c5269872ac626efc69bd3a374a7a7125d502
2018-01-24 20:48:54 +00:00
Tri Vo
82ca9a743a Fix /sys denials.
Labeled files linked from /sys/class/{rtc, net}.
Fixes these denials:
avc: denied { read } for pid=6413 comm="system_server" name="hctosys"
dev="sysfs" ino=10068 scontext=u:r:system_server:s0
tcontext=u:object_r:sysfs:s0 tclass=file permissive=0

avc: denied { write } for pid=4785 comm="Binder:4785_2" name="mtu"
dev="sysfs" ino=9213 scontext=u:r:netd:s0 tcontext=u:object_r:sysfs:s0
tclass=file permissive=0

Test: files labeled as expected; emulator boots without above denials.
Change-Id: I8fd8cc993ede0ddfd4404c0647a60da4867ef128
2018-01-24 12:39:47 -08:00
Tri Vo
30a532a1bf healthd: fix /sys denials.
Label /sys/class/power_supply/* appropriately and give healthd read
permissions to that directory.

Fixes this denial:
avc: denied { read } for pid=1386 comm="healthd" name="power_supply"
dev="sysfs" ino=2562 scontext=u:r:healthd:s0
tcontext=u:object_r:sysfs:s0 tclass=dir permissive=0

Bug: 72437093
Test: emulator boots with no denials from healthd
Change-Id: Ie3853cb5e9167fcd70f393ff589971ad6212c580
2018-01-24 11:13:22 -08:00
Nicolas Geoffray
e3e19f0dfa For prebuilts, use the built_module for nostripping dexpreopt.
Earlier, we would use the prebuilt directly, which doesn't go through
build optimizations like uncompressing the dex files.

bug: 63920015
Test: m -j32 && verify priv-apps prebuilt's vdex don't contain
      the dex code.

Change-Id: I1a69d3b6832e3a940616f71a95c13091a4220b4b
2018-01-24 15:20:33 +00:00
Treehugger Robot
082837365d Merge "Add BOARD_EXT4_SHARE_DUP_BLOCKS to share duplicated blocks on ext4" 2018-01-24 04:10:42 +00:00
Treehugger Robot
3fcaecec8a Merge "Don't use old VNDK and SystemSDK versions for new devices" 2018-01-24 02:25:38 +00:00
Jiyong Park
95f9313445 Don't use old VNDK and SystemSDK versions for new devices
We need to prevent vendors from using old VNDK and SystemSDK versions
for newly launched device. Otherwise, deprecating old versions of the
APIs would be really difficult.

Specifically, it is enforced that

PRODUCT_SHIPPING_API_LEVEL <= BOARD_VNDK_VERSION

PRODUCT_SHIPPING_API_LEVEL <= min(BOARD_SYSTEMSDK_VERSIONS)

Bug: 72126206
Test: manually setting BOARD_VNDK_VERSION to 24 in
device/google/wahoo/BoardConfig.mk and choosecom to walleye
Test: m -j shows an error on BOARD_VNDK_VERSION
Test: BOARD_SYSTEMSDK_VERSION="25 26" m -j shows an error on
BOARD_SYSTEMSDK_VERSION

Change-Id: I17646487a9c77a6a5110749e22ba47f0f75920cf
2018-01-24 09:59:09 +09:00
Treehugger Robot
37cc632f81 Merge "Install ld.config.noenforce.txt instead of copying it" 2018-01-23 22:50:09 +00:00
Justin Yun
e3a7b1b4ca Install ld.config.noenforce.txt instead of copying it
ld.config.noenforce.txt is defined as a module.
For GSI, install the module instead of copying it.

Bug: 70704112
Bug: 70603313
Test: Build GSI and boot on Android-P sailfish device
Change-Id: I894921fa3089411f60d1b4f58ad48e9aa25a519b
2018-01-23 16:13:33 +09:00
Tianjie Xu
07a4299182 Merge "Don't check the stderr output from bsdiff/imgdiff" 2018-01-23 06:10:46 +00:00
Treehugger Robot
ae891fb19e Merge "Add PLATFORM_SYSTEMSDK_VERSIONS and BOARD_SYSTEMSDK_VERSIONS" 2018-01-23 03:35:19 +00:00
Badhri Jagan Sridharan
c8cdf75d1b Merge "Build usbd" 2018-01-23 03:09:27 +00:00
Yifan Hong
c4d2725fc6 Merge "Add System SDK Versions to VINTF." 2018-01-23 02:57:29 +00:00
Tianjie Xu
a2a9f9990f Don't check the stderr output from bsdiff/imgdiff
bsdiff/imgdiff returns non-zero values correctly in case of failures.
So we don't need to check the stderr anymore. This avoids some false
reports of the diff program.

Bug: 72335938
Bug: 71505046
Test: Check the exit value of bsdiff/imgdiff in code search,
      generate a package for angler.

Change-Id: I18f0c3882a40a5288d6aee715713a05270e0db2b
2018-01-23 01:29:56 +00:00
Jin Qian
fde9f7906b Add BOARD_EXT4_SHARE_DUP_BLOCKS to share duplicated blocks on ext4
This option applies to system.img and vendor.img.

Bug: 64109868
Change-Id: Ib4c7384049dca08e57441ef71cc81c2fba4462dd
2018-01-22 17:21:11 -08:00
Yifan Hong
5ff1f0a38a Add System SDK Versions to VINTF.
Add PLATFORM_SYSTEMSDK_VERSIONS to framework manifest
and BOARD_SYSTEMSDK_VERSIONS to device comp matrix.

Test: m framework_manifest.xml -j
Test: BOARD_SYSTEMSDK_VERSIONS=P m device_compatibility_matrix.xml -j

Bug: 69088799
Change-Id: I0b5ac6f1c2802c353b2989b017c1cdfc9fe27987
2018-01-22 14:18:16 -08:00
Treehugger Robot
9b8fc9e3c2 Merge "Add 'blank_screen' to embedded.mk." 2018-01-22 20:27:17 +00:00
Treehugger Robot
12c68db516 Merge "Don't strip for eng builds." 2018-01-22 19:51:12 +00:00
Treehugger Robot
8413824f4b Merge "releasetools: Add PayloadSigner class." 2018-01-22 18:54:57 +00:00
Nicolas Geoffray
ed6ee7b64d Don't strip for eng builds.
bug: 72150787
Test: m
Change-Id: Ifdd403dfecb440e32c4d0c00a7543820b2098359
2018-01-22 15:07:37 +00:00
Nicolas Geoffray
ec1fdc8813 Merge "Tighter control of stripping in dex_preopt_odex_install." 2018-01-22 13:37:56 +00:00
Tobias Thierer
4bb18a8a2e Merge "Experimental feature: LOCAL_PATCH_MODULE option in .mk files." 2018-01-22 11:34:18 +00:00
David Brazdil
33bb091971 Merge "Add new API file names" 2018-01-20 10:06:22 +00:00
Zhi An Ng
8eae9fc5f5 Merge "Fix order of args passed to mksquashfsimage.sh" 2018-01-20 05:59:48 +00:00
Treehugger Robot
a663b8fb1c Merge "Revert "Overflow sanitization in frameworks/ and system/."" 2018-01-20 03:54:23 +00:00
Ivan Lozano
c5ef21febf Revert "Overflow sanitization in frameworks/ and system/."
This reverts commit c2d7db1c7d.

Change-Id: I3bab6a359bcec605a8120bf106bf121090eb63fe
2018-01-20 01:44:11 +00:00
Treehugger Robot
00844ccf77 Merge "Reland: Add boot.art.rel files to system image" 2018-01-20 01:01:29 +00:00
Ng Zhi An
9446c1df98 Fix order of args passed to mksquashfsimage.sh
Bug: 72234456
Test: make systemimage
Change-Id: I1b4b07f0a488eade2f297fea12d02b6e8ccba7d8
2018-01-19 15:55:39 -08:00
Treehugger Robot
3221f0f387 Merge "releasetools: Dump mkfs/fsck/simg2img outputs on error." 2018-01-19 22:35:47 +00:00
Alex Klyubin
a1b5dfe151 Reland: Add boot.art.rel files to system image
This file is used to verify that all differences between /system
boot*.art and /data/dalvik-cache boot*.art only consist of relocation
changes. The goal is to mitigate /data/dalvik-cache boot*.art files
being a persistence vector.

Test: Build and ensure boot.art.rel files are on the image.
Bug: 66697305
Change-Id: I68c445da46b2d3099ee347a04af4fbb84da85b0d
2018-01-19 14:34:32 -08:00
Yifan Hong
65310d6b06 Merge "move VINTF metadata to /etc/vintf/ ." 2018-01-19 22:01:28 +00:00
Tao Bao
fabe08352c releasetools: Add PayloadSigner class.
Create a wrapper class that handles the payload signing, which unifies
the paths with and without external signer. Also add tests for the newly
added class.

The test keys under testdata/ are created with the script in
development/tools/make_key. testdata/testkey_with_passwd.pk8 uses
password "foo".

Test: python -m unittest test_ota_from_target_files
Test: Get identical A/B OTA packages w/ and w/o the CL.
Change-Id: Ic770aec726498a3babb88ec509985e7f1210fb18
2018-01-19 13:25:04 -08:00
Steven Moreland
3ea4e46429 Add 'blank_screen' to embedded.mk.
This utility shuts off the screen.

Bug: 70846424
Test: manual + w/ init
Change-Id: I11bf8b709e81dd127de7d12c50da4ab5be456cfb
2018-01-19 13:01:13 -08:00
Treehugger Robot
a5b48fcf7f Merge "releasetools: Clean up three functions in add_img_to_target_files.py." 2018-01-19 20:33:29 +00:00
Treehugger Robot
1eddcad909 Merge "releasetools: Refactor AddImagesToTargetFiles()." 2018-01-19 20:31:21 +00:00