Commit Graph

52418 Commits

Author SHA1 Message Date
Jaewoong Jung 8f9d08a185 Add LOCAL_APKCERTS_FILE support.
This is used when Soong and Make don't know the full output file list,
and so use a tool to generate a per-module apkcerts.txt file instead.

Bug: 160119159
Bug: 162464887
Test: m apkcerts-list
Merged-In: I48183bc8cbf9dcc521f791812734205ed3f28f4c
Change-Id: I48183bc8cbf9dcc521f791812734205ed3f28f4c
2020-07-30 17:43:32 -07:00
Jaewoong Jung a6bcbd8a4a Mark android_app_set modules PRESIGNED.
Test: m apkcerts-list
Bug: 159921591
Bug: 162464887
Merged-In: Ie83a05be0d71280644843eddffdbea6bcb429c74
Change-Id: Ie83a05be0d71280644843eddffdbea6bcb429c74
2020-07-30 17:43:07 -07:00
Sasha Smundak eefa8e954e Implement android_app_set module.
Bug: 152319766
Test: manual and builtin
Change-Id: I66edc5b423898a11dbba1c3d9796c7bd4d6b4428
Merged-In: I66edc5b423898a11dbba1c3d9796c7bd4d6b4428
2020-06-03 09:50:48 -07:00
Kavi Gupta 3ed9021f87 Modify build to put dumpcoverage agent into /system/lib
This location allows the agent to be attached to arbitrary processes.

It only makes sense to include libdumpcoverage.so on coverage builds,
as these are the only builds that have any information to be dumped.

Bug: 148178774
Test: manual, used examples in README (see other CL) to test whether
it works on a userdebug_coverage build on cuttlefish

Change-Id: Ib2fece1b41a3b5d16c8a2a444c5486137e475fda
Merged-In: Ib2fece1b41a3b5d16c8a2a444c5486137e475fda
(cherry picked from commit 7185f8cc2d)
2020-02-03 19:07:26 +00:00
Pirama Arumuga Nainar a21e8527a5 Add libprofile-extras to all link steps when NATIVE_COVERAGE is enabled.
libprofile-extras has a wrapper to getenv() that appends the effective
userid (euid) of the current process to GCOV_PREFIX.  This avoids
conflicts and permissions issues when multiple processes try to
create/access the same directories and files under /data/misc/trace.

This library needs to be added and the -Wl,--wrap,getenv flag needs to
be passed to all link steps.  Since Android.mk does not propagate flags
and libraries across dependencies, this change just adds the library and
flag to all non-static-library Android.mk modules.  As a consequence,
*ALL* binaries created via Android.mk will have the signal handler and
property watcher thread in libprofile-extras but they are no-ops in
non-coverage-enabled binaries.

The dependency is added early enough in core/binary.mk so that the
LOCAL_SOONG_LINK_TYPE resolutions occur correctly.

Bug: 148178774
Test: Verify that coverage files are written to
/data/misc/trace/<euid>/proc/... instead of /data/misc/trace/proc/...

Change-Id: I4d5f849c15e9a278253f2148185ddf3ab2878e2f
Merged-In: I4d5f849c15e9a278253f2148185ddf3ab2878e2f
(cherry picked from commit b8f898ef88)
2020-02-03 19:03:24 +00:00
Oliver Nguyen 71640a3296 Package coverage files as a zip.
Bug: 148178774
Test: make NATIVE_COVERAGE=true COVERAGE_PATHS="*"
Change-Id: I7ee9253ef47a502a9d29f7e15a4402cbb90e34ae
Merged-In: I7ee9253ef47a502a9d29f7e15a4402cbb90e34ae
(cherry picked from commit e91ab2397f)
2020-02-03 19:00:36 +00:00
Jerome Gaillard 7aa3039ef9 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
Merged-In: I7a0b22907603e1d17ac05901ee7f8bb9cff89f7f
2019-11-18 10:38:13 +00:00
TreeHugger Robot 5d0a024d7b Merge "Update OWNERS for version_defaults.mk with pscovanner & lubomir Bug: 141272605" into qt-dev 2019-10-16 17:58:38 +00:00
Adam Seaton 3b5bdbb68d Update OWNERS for version_defaults.mk with pscovanner & lubomir
Bug: 141272605
2019-09-20 21:51:11 +00:00
Lubo Hristov 73aa913b77 Update SPL to 2019-11-05
bug:141272605
2019-09-20 21:00:52 +00:00
Lubo Hristov 89b18c02ae Update SPL to 2019-11-01
bug:141272605
2019-09-19 19:54:07 +00:00
Baligh Uddin 39b8f9fc7d DO NOT MERGE - Add a guard against deleting AVB_PUBKey.
The avb_pubkey may not be present, if the apex was initially
unsigned or generated from a bundle.  In this case, running
sign_apex to generate a signed apex binary would result in an error.
This fix checks for presense of avbpubkey before attempting the
deletion

BUG: 139994107
Change-Id: I3cb2e88a11ad8797e38ba5fb98c96a4ec4135fc8
2019-08-25 22:20:36 -07:00
Paul Scovanner e840881168 [automerger skipped] [DO NOT MERGE] Update Security Strings to 2019-10-01
am: 3250cbd459 -s ours
am skip reason: subject contains skip directive

Change-Id: Icabb27f1fbad9a61104dd9a8421a5c87d1c18b64
2019-08-15 17:35:19 -07:00
Paul Scovanner 3250cbd459 [DO NOT MERGE] Update Security Strings to 2019-10-01
Bug:139434268
Change-Id: Ie9e36ac0ace5c67468391650ad2fa1fa02941f6e
2019-08-15 02:52:20 +00:00
Paul Scovanner 616d794540 [automerger skipped] [DO NOT MERGE] Update Security Strings to 2019-09-01
am: b88c9853aa -s ours
am skip reason: subject contains skip directive

Change-Id: I9454feb6965bf8a9e56342a3f8348d5933ece914
2019-08-14 19:24:52 -07:00
Paul Scovanner b88c9853aa [DO NOT MERGE] Update Security Strings to 2019-09-01
Bug:139434268
Change-Id: I802a7aeb0c65240ff71f91506b8932bfa44090bc
2019-08-14 22:17:07 +00:00
Paul Scovanner 84633edb22 Update Security Strings to 2019-10-05
Bug:139434268
Change-Id: I063f0430347d9f1e6ea5a8133204585833ed5ddc
2019-08-14 21:11:01 +00:00
Baligh Uddin df238b4e41 Select all .pem and .avbpubkey in otatools
Apex payload dev keys are stored as .pem files.
Apex payload also utilizes .avbpubkey as public keys.

Change-Id: I65ced74be02008b666d7bb608f0d0a3ef3769c9c
BUG: 138623265
2019-07-29 21:35:05 -07:00
TreeHugger Robot 66893b698c Merge "Disable apex update for GSI" into qt-dev 2019-07-17 03:23:16 +00:00
Dan Shi 8d5459fc6d Update auto-gen test config template with EXTRA_CONFIGS placeholder
Bug: 134509111
Bug: 136633978
Test: add "require_root: true" to init_benchmarks and libpower_test
build the modules, confirm the extra target preparer is added in the
test config.

Change-Id: I2fdae79d45fd1e5866ee94d1f0e59df106be2a87
Merged-In: I2fdae79d45fd1e5866ee94d1f0e59df106be2a87
2019-07-15 17:29:42 +00:00
Chen Zhu 3538cebfc7 Merge "Add Mainline Test Suite (MTS) to build." into qt-dev 2019-07-12 18:05:00 +00:00
TreeHugger Robot 61920cbf99 Merge "Update Security String to 2019-09-05 Bug: 137199979" into qt-dev 2019-07-12 03:26:43 +00:00
TreeHugger Robot a6935cc16a Merge "releasetools: Ignore nonexistent APEX overrides." into qt-dev 2019-07-11 23:03:00 +00:00
Elisa Pascual Trevino ac6e24e5b1 Update Security String to 2019-09-05
Bug: 137199979
2019-07-11 22:26:27 +00:00
Elisa Pascual Trevino 4364982766 Update Security String to 2019-09-01
Bug: 137199979
2019-07-11 22:20:00 +00:00
Tao Bao b369c7226a releasetools: Ignore nonexistent APEX overrides.
This allows sharing the same signing config on different target_files
zips. Nonexistent APEX will be ignored with a warning.

Bug: 137249701
Test: Run sign_target_files_apks with APEX overrides.
Change-Id: I2bad0f5c00753ed36ec5ae3431c7dc2ff1fc3e9c
2019-07-11 11:54:39 -07:00
Colin Cross 3f8eb7ec99 temporarily disable vendor file check for mainline
We want to use prebuilts for apex modules for qt-dev, but it is
running afoul of the vendor file check.  Disable the check for
now until we figure out a better solution.

Using Merged-In instead of DNM

Bug: 137033385
Test: Forrest run build_test
Change-Id: I9db5cb227780ede6aaff0070cd2fd59e95e635e6
Merged-In: 874b7a7766a569613dcd3ae526eaa6e1d4b78866
Merged-In: I99431a9a342e9b0617510e250597f3024ef39322
2019-07-09 15:36:28 -07:00
Justin Yun 25065c44cc Do not allow building product_services image
product_services partition is designed for the test purpose only. It
must not be included in the target devices.

Bug: 134359158
Test: Build configuration for product_services partition must return
      error message.

Change-Id: I6f8cdf73d18ad3174c7b31edb5d5ee10df75a776
2019-07-05 20:38:01 +09:00
SzuWei Lin 9547929af4 Add default LMK properties to GSI
These LMK properties are product properties. The configuration will
be absent when GSI is installed as GSI doesn't mount the product
partition. Without these settings, some CTS test cases could
fail due to an aggressive LMK.

The patch puts these properties in GSI as default values.

Bug: 136212765
Bug: 134460917
Test: `run cts -m CtsFileSystemTestCases`, all pass
Change-Id: I6fde8db51debcb9bb269aece3a3e4c7e5bb991f6
2019-07-03 17:59:03 +08:00
Anton Hansson d8d0821252 Remove lmk.log_stats sysprop from mainline_system
It is now set on the /product partition by relevant devices.

Bug: 135569569
Test: lunch mainline_system_arm64; inspect system/etc/prop.default
Test: boot crosshatch and check the sysprop is still true via "adb shell getprop"
Change-Id: I34696977f584a65741c6002e6688d86e66a1f121
Merged-In: I34696977f584a65741c6002e6688d86e66a1f121
2019-06-27 10:32:46 +00:00
Isaac Chen 9550ce161f Disable apex update for GSI
Currently, GSI does not include apex support and TARGET_FLATTEN_APEX is true.
This will cause issues for vendors with apex support (e.g. Cuttlefish).
This change set ro.apex.updatable to false in product to override that sets
in vendor.

Bug: 135411972
Bug: 134673003
Test: $ lunch aosp_x86-userdebug; m -j; emulator
      $ lunch aosp_cf_x86_phone-userdebug
      # Replace system.img in super.img with GSI
      # The resulted CF could boot and browse the web successfully.

Change-Id: I08fd7a1b254aac276926329e064c35b714764936
Merged-In: I08fd7a1b254aac276926329e064c35b714764936
(cherry picked from commit fae280264e)
2019-06-21 00:36:42 +00:00
SzuWei Lin e40cc936ff Enforce property split in GSI
Pure GSI build targets has no vendor partition, such as
aosp_$arch_ab and gsi_$arch. The system properties defined by
PRODUCT_PROPERTY_OVERRIDES will be in /system/build.prop.

The patch defined a fake BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE to
let these system properties flow to vendor and won't pollute the
system.img.

The bug also move some properties to /product/build.prop.

Bug: 135508595
Bug: 131162245
Bug: 134781120
Test: check the /system/build.prop do not have "ro.carrier=unknown"
Test: adb remount on GSI Q on P
Change-Id: Ib200d66cf98fea572c26338e058bce29eb5e0cd7
Merged-In: Ib200d66cf98fea572c26338e058bce29eb5e0cd7
(cherry picked from commit 711d696eb3af759c63c416b0224faeac1f6c04f1)
2019-06-21 00:35:45 +00:00
Chen Zhu ce72964fa1 Add Mainline Test Suite (MTS) to build.
Test: m mts

Bug: 126277867
Bug: 123411735
Change-Id: Iba6bf89bd4457ed0f5c1eb3351bf5ffd6720441d
2019-06-19 15:14:23 -07:00
Adam Seaton 0c355124bf Revert "Update Security String from 08-05 to 2019-08-01 Bug:126590667"
This reverts commit ef7c2c7915.

Reason for revert: Resolve string downgrade issue

Change-Id: I28831f2592bba09907b76c7d5ac46326a9c1e9f8
2019-06-17 17:03:51 +00:00
Paul Scovanner ef7c2c7915 Update Security String from 08-05 to 2019-08-01 Bug:126590667
am: ead61ed19e

Change-Id: Iaf434bf5690c3c50371bb11266d300ab7d335184
2019-06-14 13:22:34 -07:00
Paul Scovanner 3a25bc8b55 Update Security String to 2019-08-05 Bug:126590667
am: a3e1c57a95

Change-Id: I0b10bab75834759c3bd216fc77c38c84b445c4e2
2019-06-12 16:06:18 -07:00
Paul Scovanner ead61ed19e Update Security String from 08-05 to 2019-08-01
Bug:126590667
2019-06-12 22:51:45 +00:00
Paul Scovanner a3e1c57a95 Update Security String to 2019-08-05
Bug:126590667
2019-06-11 19:46:33 +00:00
Tim Joines 6d98e83561 Merge "Enabled traced on Android Go devices by default." into qt-dev 2019-06-11 17:21:04 +00:00
Tim Joines 84c0d23f75 Enabled traced on Android Go devices by default.
Memory impact of this change: ~1.5MB idle PSS.

Test: build low_ram enabled target
Bug: 123542916
Change-Id: I5afec17cd0b60cab9c6f336df8a09d3861473394
2019-06-07 21:22:31 +00:00
Tao Bao 97a6690a23 Rebuild recovery-from-boot patch when calling add_img_to_target_files.
When using Verified Boot 2.0, releasetools specifies a salt value based
on build fingerprint, so that to give idempotent images.

However, the change that removed static `ro.build.fingerprint` [1] broke
the behavior, as common.LoadInfoDict still relies on fingerprints.
Without a fixed salt, the first call to make_recovery_patch.py and the
second one (which writes IMAGES/{boot,recovery}.img) will see different
images, which leads to install-recovery.sh failure.

Note that currently there's a dependency that requires getting bootable
images through two separate calls. make_recovery_patch.py has to happen
first to get (placeholder) files in the system image. We then generate
canned fs_config files, and finally use add_img_to_target_files.py to
write the images.

This CL adds a quick workaround to force rebuilding the
recovery-from-boot patch while calling add_img_to_target_files.py.

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

Bug: 134123803
Bug: 134525174
Test: TreeHugger
Test: Build a non-A/B target that uses AVB. Run validate_target_files.py
      on the generated target_files.zip.
Change-Id: I5859e30be63bfd54398cf41fd2d907f15285f560
Merged-In: I5859e30be63bfd54398cf41fd2d907f15285f560
(cherry picked from commit 4978fa99d1)
2019-06-05 22:04:47 -07:00
Alan Viverette c45849fc0c Remove obsolete Support Library guidance from version_defaults.mk
Test: n/a docs only
Fixes: 133228727
Change-Id: I10cdd9a4dfe8c508417f7b80320e308c236f2c8e
2019-05-30 16:57:25 +00:00
TreeHugger Robot f862715103 Merge "Allow for the DTB image to be built by the Android build system." into qt-dev 2019-05-24 17:34:27 +00:00
TreeHugger Robot 1230a18b5c Merge "Add AOSP WallpaperPicker to GSI" into qt-dev 2019-05-23 20:02:08 +00:00
SzuWei Lin 78318c9a6e Add AOSP WallpaperPicker to GSI
The patch also update the mainline whitelist.

Bug: 133295307
Test: build gsi_arm64-userdebug and flash on a Pixel device,
Test: long press on the homescreen, WallpaperPicker is in the selection
Change-Id: I7831471cc920a24d64512341f0e4f3fef5024b30
(cherry picked from commit 5f23fee45f)
2019-05-23 20:05:22 +08:00
Hridya Valsaraju 5b8f78fbe8 Allow for the DTB image to be built by the Android build system.
The current solution expects BOARD_PREBUILT_DTBIMAGE_DIR to
contain prebuilt DTB files that are concatenated by the build system
to create $OUT/dtb.img. In order to accommodate devices that build
the dtb image locally, when BOARD_PREBUILT_DTBIMAGE_DIR is undefined,
make boot.img creation depend only on $OUT/dtb.img.

Bug: 133161451
Test: Build with BOARD_PREBUILT_DTBIMAGE_DIR undefined and verify
using unpack_bootimg.py that $OUT/dtb.img was included in boot.img.

Change-Id: Iae2c634ccdc1d83589b26d382882f75fb8565a31
Merged-In: Iae2c634ccdc1d83589b26d382882f75fb8565a31
2019-05-22 15:55:47 -07:00
Bowgo Tsai 33ff602070 Moving /odm/build.prop to /odm/etc/buid.prop
In device root directory, we have the following symlinks:
  - /odm/app -> /vendor/odm/app
  - /odm/bin -> /vendor/odm/bin
  - /odm/etc -> /vendor/odm/etc
  ...

This allows the Generic System Image (GSI) to be used on both devices:
  1) Has a physical odm partition, where those symlink will be hidden
     when /odm is used as the mount point
  2) Has no physical odm partition and fallback to /vendor/odm/.

We can't just have the symlink /odm -> /vendor/odm, because the former
devices won't have /vendor/odm directory, which leads to mount failure
when the mount point /odm is resolved to /vendor/odm.

The existing /vendor/odm/build.prop won't be loaded in the latter
devices, because there is no symlink:
    - /odm/build.prop -> /vendor/odm/build.prop.

Note that init blocks reading through direct symlinks (O_NOFOLLOW) so
the above symlink won't work either. This CL moves the odm build.prop
to /odm/etc/build.prop for init to load it (symlinks in earlier
components of the path will still be followed by O_NOFOLLOW).

Bug: 132128501
Test: boot a device and checks /odm/etc/build.prop is loaded
Test: make dist with an odm.img, checks $OUT/odm/etc/build.prop is loaded
Change-Id: I6f88763db755c9ec6068bfdd9cee81c19d72e9d7
Merged-In: I6f88763db755c9ec6068bfdd9cee81c19d72e9d7
(cherry picked from commit 6c62884000)
2019-05-22 16:14:53 +08:00
Tao Bao f52dbb81fe Add sign_apex.py that signs a given APEX file.
Bug: 132687993, 131687150
This CL moves SignApex() from sign_target_files_apks into apex_utils,
and adds sign_apex that allows signing a standalone APEX file directly.

Test: Run the following command and check the output file.
$ build/make/tools/releasetools/sign_apex.py \
     -v \
     --container_key \
         build/make/target/product/security/testkey.x509.pem \
     --payload_key external/avb/test/data/testkey_rsa4096.pem \
     --payload_extra_args \
         "--signing_helper_with_files ./signing-helper.sh" \
     foo.apex \
     signed-foo.apex
Test: Run sign_target_files_apks.py on crosshatch target_files.zip.
Change-Id: I4b2422fd5cb1c60a3aa94511475e2a0e5b1666ca
2019-05-19 11:33:31 -07:00
TreeHugger Robot 8b6b22e593 Merge "Remove a few libs used by soft omx from vndk" into qt-dev 2019-05-17 20:11:29 +00:00
TreeHugger Robot 61c5d29655 Merge "Appending per-partition os_version into AVB props" into qt-dev 2019-05-17 16:45:44 +00:00