Commit graph

21617 commits

Author SHA1 Message Date
Roland Levillain
3ec9ff6b72 Remove Core Library JARs from /system/framework.
These JARs are part of the ART APEX, and are now located in
`/apex/com.android.art/javalib`. Remove the supernumerary copies in
`/system/framework` and save ~11 MiB on the system partition.

(cherry picked from commit d4f09f7752)

Test: Device boot test
Bug: 142944799
Change-Id: Ia6f58d858ecdb80c9701696b8f20d5fa2de0c2c7
Merged-In: Ia6f58d858ecdb80c9701696b8f20d5fa2de0c2c7
2019-10-22 16:42:53 +00:00
Jerome Gaillard
aa1c6bb4b3 Merge "Allow files generated by droidstubs to be copied in the SDK" 2019-10-21 09:32:12 +00:00
Treehugger Robot
ef582f1432 Merge "Generalize vts config module for other Suites" 2019-10-18 22:24:52 +00:00
karenluo
97d398f2de Generalize vts config module for other Suites
Removed the vts specific content from the wrapper file
android_vts_host_config.mk to make it more general to be used by other
suites, including C-Suite.

Test: make csuite
Change-Id: I6e79d8f6532376f94a87501683c260c8f3793ca7
Merged-In: I6e79d8f6532376f94a87501683c260c8f3793ca7
2019-10-18 18:28:23 +00:00
Treehugger Robot
8de0013551 Merge changes from topic "fix_treble_sysprop_neverallow"
* changes:
  Revert "Do not initialize BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW"
  Revert "Set BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW on sdk and full"
2019-10-18 02:39:48 +00:00
Pete Gillin
3e25573c13 Merge "Enable Java language level 9 by default." 2019-10-17 10:38:35 +00:00
Inseob Kim
5d60c8ac5d Revert "Do not initialize BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW"
This reverts commit 3b82e07023.

Reason for revert: This was a hack and the fix has been merged

Change-Id: Ifa1684d9908f384d3da86acae18bfe4b47cf1529
2019-10-17 10:33:40 +00:00
Elliott Hughes
be90dc8396 Merge "Revert "-D__ANDROID_NDK__ for SDK builds."" 2019-10-16 16:01:14 +00:00
Pete Gillin
b455f58059 Enable Java language level 9 by default.
This changes the default Java language level from 8 to 9, i.e. javac
invocations now use -source 1.9 -target 1.9.

The environment variable EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9=false is
added to switch back to the language level 8 behaviour. (Previously,
setting that variable to true was required to opt in to language level
9.)

Test: make droid java tests cts docs
Test: javap -v <some class file in output> | grep 'major version' (reports 53, for classes from 'benchmarks' which is in Android.bp and 'ahat' which is in Android.mk)
Test: make RunBluetoothRoboTests RunCarSettingsLibRoboTests (two main flavours of robolectric)
Test: make cts && cts-tradefed help
Test: atest CtsLibcoreTestCases (reasonably low-level device tests)
Test: atest CtsHostTzDataTests (arbitrary host test)
Bug: 115604102
Change-Id: I06c4adb3861db82f4804ac9322a131067f395b4e
Merged-In: I13b2ff61c6423ad99464e0a4d2b1bedfd8ae1080
2019-10-16 11:21:20 +01:00
Martin Brabham
14fcfb8a9a Merge changes Ie9de9576,I14f7cd06
* changes:
  Set BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW on sdk and full
  Do not initialize BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW
2019-10-15 21:50:42 +00:00
Jerome Gaillard
a0171af06f 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
2019-10-15 17:27:43 +01:00
Inseob Kim
3b82e07023 Do not initialize BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW
BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW is meant to be set depending on
targets, not devices. This allows that value to be set outside
BoardConfig.mk.

Bug: 131162102
Bug: 142684203
Test: m sepolicy_tests
Change-Id: I14f7cd06dcbaf1b5354c648079a815d7b6cc6f3a
2019-10-15 17:24:35 +09:00
vichang
ed02064ed5 Merge "Add libicu_jni into ART APEX" 2019-10-15 06:43:10 +00:00
Inseob Kim
491f2969d6 Merge "Add BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW" 2019-10-15 01:29:06 +00:00
Inseob Kim
bc89619724 Add BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW
A new sysprop neverallow rules are mandatory only for devices launching
with R or later. For devices already launched, neverallow rules can be
relaxed with adding following line to BoardConfig.mk:

BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW := true

Bug: 131162102
Test: Set PRODUCT_SHIPPING_API_LEVEL := 30 and try building with
changing some system_public_prop to system_internal_prop
Test: m cts sepolicy_tests

Change-Id: I44a83af19b18b4116f83a3d5dc929f28bb8870ce
Merged-In: I44a83af19b18b4116f83a3d5dc929f28bb8870ce
(cherry picked from commit 06fb4554f4)
2019-10-15 09:24:17 +09:00
Evgenii Stepanov
7bebcbaff2 Merge "Define ro.sanitize.<name> properties in SANITIZE_TARGET builds." 2019-10-14 21:44:09 +00:00
Tao Bao
dc2f0b0abd Merge "Include per-partition fingerprint as AVB prop." 2019-10-14 14:53:46 +00:00
Anton Hansson
3cc4fa6394 Merge "Document SYSTEM_OTHER_ODEX_FILTER matching" 2019-10-14 09:29:10 +00:00
Evgenii Stepanov
eb3ade924b Define ro.sanitize.<name> properties in SANITIZE_TARGET builds.
This will let us quickly check the system image build type,
and modify *.rc behavior based on that.

Bug: 142430632
Test: adb shell getprop ro.sanitize.hwaddress in hwasan build

Change-Id: If2eb99dee93f0652cada5cb2e02fda963d00a7eb
2019-10-11 16:59:27 -07:00
Victor Chang
d272f0ed6f Add libicu_jni into ART APEX
Bug: 138994281
Test: device boots
Change-Id: Ic61d374ef87634ebaa1bb55b2a36176d3606f3d2
2019-10-11 14:20:38 +01:00
Treehugger Robot
d6d27517f7 Merge "Remove stray ZIPALIGN_PAGE_ALIGN_FLAGS" 2019-10-11 13:12:29 +00:00
Treehugger Robot
46cfab96d8 Merge "Fix odm output directory for devices w/o vendor partition" 2019-10-11 10:46:43 +00:00
Xin Li
51a7d20229 Merge "DO NOT MERGE - Merge QP1A.191005.007 into master" 2019-10-11 02:56:40 +00:00
Elliott Hughes
af11c50e67 Revert "-D__ANDROID_NDK__ for SDK builds."
This reverts commit 401a84071b.

Reason for revert: fixed in bionic instead (https://android-review.googlesource.com/c/platform/bionic/+/1135146).

Change-Id: I85e2ef241684c34fc968fd0e7230b8a88ea3209a
2019-10-11 01:24:39 +00:00
Xin Li
66ec993fe5 DO NOT MERGE - Merge QP1A.191005.007 into master
Bug: 142297020
Merged-In: I063f0430347d9f1e6ea5a8133204585833ed5ddc
Change-Id: I6fe9ad3f71b30ba7c1cf9d6941450809cfc66909
2019-10-10 22:54:06 +00:00
Colin Cross
bf086436b0 Remove stray ZIPALIGN_PAGE_ALIGN_FLAGS
Iae26e4676c29c68fa3f76187512c82786bfa0522 removed the definition
of ZIPALIGN_PAGE_ALIGN_FLAGS in favor of always using the -p flag,
but left accidentaly left one usage.  Replace it with -p.

Bug: 141212627
Test: m checkbuild
Change-Id: Ica69d9195426f8f30039da211ed1a0ad5dffe8e8
2019-10-10 12:52:13 -07:00
cfig
1aeef725a7 AVB: decouple vbmeta.img from recovery.img for non-A/B devices
For following cases:
Case 1: A/B devices: no change
Case 2: non-A/B devices, with unsigned recovery image:
    not allowed anymore by mandating BOARD_AVB_RECOVERY_KEY_PATH
Case 3: non-A/B devices, with signed recovery image:
    vbmeta.img should not include ChainPartitionDescriptor of recovery.img,
    otherwise device can not even boot into normal mode if recovery partition
    is damaged

This CL will cause a build break if BOARD_AVB_RECOVERY_KEY_PATH
is not set for non-A/B targets with recovery.img
The following is an example to fix the build break by specifying
AVB signing configs for the recovery.img.

BOARD_AVB_RECOVERY_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
BOARD_AVB_RECOVERY_ALGORITHM := SHA256_RSA2048
BOARD_AVB_RECOVERY_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
BOARD_AVB_RECOVERY_ROLLBACK_INDEX_LOCATION := 2

Also note that libavb in bootloader needs an update to include this
commit Iaa886037edb18c2ff6c60fa2a7f883ab7303ba1a, to support verifying
recovery.img independently (not through vbmeta.img).

Bug: 130351427
Test (Case 3):
  normal   mode: avb_slot_verify(flags=AVB_SLOT_VERIFY_FLAGS_NONE)
  recovery mode: avb_slot_verify(flags=AVB_SLOT_VERIFY_FLAGS_NO_VBMETA_PARTITION)
Test: PYTHONPATH=build/make/tools/releasetools \
    python -m unittest test_validate_target_files
Test: Use a lunch'd target. `atest --host releasetools_test releasetools_py3_test`
Test: validate_target_files.py with Case-3 target files
Change-Id: I2a73252b385fa463b4abd444923a8acc473df0b4
2019-10-10 14:28:34 +00:00
Tao Bao
19b02fe8e5 Include per-partition fingerprint as AVB prop.
This allows querying per-partition fingerprint via libavb (in
particular, avb_property_lookup).

Bug: 80097573
Test: `m dist`; `avbtool info_image --image /path/to/image` to check the
      written prop.
Test: `atest --host releasetools_test releasetools_py3_test`
Test: Run sign_target_files_apks to sign a target_files.zip that's built
      with the change. Check the AVB prop in the signed images.
Change-Id: Id4f06df82c29e77aca128439c8c11f0367fe587e
2019-10-09 21:25:19 -07:00
dianlujitao
339ef4cf3f Fix odm output directory for devices w/o vendor partition
Change-Id: Iba6c169630ea6bf61b9057a9994e5eb824915304
2019-10-10 09:55:09 +08:00
Treehugger Robot
818df7b0d0 Merge "Adding boot-test-harness.img" 2019-10-09 23:49:46 +00:00
Tao Bao
cbd6d498d2 Remove the workaround that forces rebuilding recovery patch.
The issue has been addressed on releasetools script side, by specifying
UUID and AVB salt to get reproducible images [1].

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

Fixes: 134525174
Test: `m dist` with a non-A/B target.
      `validate_target_files out/dist/target_files.zip` passes.
Change-Id: Ida6750291706036c9b0c192d8abcde6d65155287
2019-10-08 22:23:37 +00:00
Bowgo Tsai
5c40c7166f Adding boot-test-harness.img
In commit I30137c3caef91805d9143d404e5e4d06c0fccc30, we added
a boot-debug.img to allow adb root when using an user build GSI image.

However, to run automated tests, it requires additional properties,
which are not needed for GSI compliance:
    ro.audio.silent=1
    ro.test_harness=1

This CL adds an additional boot-test-harness.img for automated tests,
and keeps the original boot-debug.img for GSI compliance.

Note: boot-test-harness.img won't be built by default, it needs
      explicit `make bootimage_test_harness`.

Bug: 140036184
Test: `m bootimage_test_harness`, flashes boot-test-harness.img and checks
      adb root works and test harness props are set.
Test: `m bootimage_test_harness dist -j32`, checks both
      boot-test-harness.img and ramdisk-test-harness.img are under ./out/dist/.
Test: `system/tools/mkbootimg/unpack_bootimg.py --boot_img $OUT/boot-test-harness.img --out ramdisk-test-harness`,
      checks the extracted out/ramdisk is as expected
Test: Run `gunzip -c ramdisk | cpio -idm` for the ramdisk extracted from
      $OUT/boot-test-harness.img and $OUT/boot-debug.img, respectively.
      Then compare the root dirs of both, e.g.,
      `diff -rq --no-dereference ./ramdisk-test-harness ./ramdisk-debug`
Test: `m ramdisk_test_harness-nodeps` and `m bootimage_test_harness-nodeps`
Change-Id: Iadea0b5c933c3b7fa10dcf3d9e85596916b3333d
2019-10-08 10:22:13 +00:00
Treehugger Robot
4dc0c25643 Merge "Check if installable before installing unstripped" 2019-10-07 23:56:05 +00:00
Tao Bao
e3c95f71e7 Merge "Enforce the consistency between AB_OTA_UPDATER and AB_OTA_PARTITIONS." 2019-10-07 19:06:46 +00:00
Jooyung Han
66bd7385d2 Check if installable before installing unstripped
When LOCAL_UNINSTALLABLE_MODULE is true, the module is not installed.
But its unstripped output is installed to the path based on
my_module_path which is not set for it is not installable. Moreover,
my_module_path is not reset after use.

As a result, when LOCAL_UNINSTALLABLE_MODULE is true, the path for
unstripped output is unexpected.

The installation is guarded by LOCAL_UNINSTALLABLE_MODULE now,
which was LOCAL_VNDK_DEPEND_ON_CORE_VARIANT.

Test: m
Change-Id: If18cf76118e058a9e0701a8d66f7ff0f534e5881
2019-10-07 22:33:47 +09:00
Anton Hansson
3c5a18fc16 Document SYSTEM_OTHER_ODEX_FILTER matching
...and add a CleanSpec for the moving preopt files.

Bug: 141707536
Test: N/A
Change-Id: I2f5bc4e2c8e6a9fa4c562d55623c13682d3f93ba
2019-10-07 14:29:58 +01:00
Roland Levillain
81681abfef Merge "Introduce build variable OVERRIDE_TARGET_FLATTEN_APEX." 2019-10-07 10:27:41 +00:00
Bill Peckham
959b5ebbf8 Merge "Moving recovery resources from /system to /vendor" 2019-10-05 03:14:12 +00:00
Roland Levillain
b3a503df7f Introduce build variable OVERRIDE_TARGET_FLATTEN_APEX.
When `OVERRIDE_TARGET_FLATTEN_APEX` is defined (e.g. set in the
environment), `TARGET_FLATTEN_APEX` is forcibly assigned its value.

This is useful to enable/disable APEX flattening from the command
line (thus ignoring the product's default configuration), for testing
purposes.

Note: Previously it was possible to set `TARGET_FLATTEN_APEX` directly
and have the same effect, but recent changes in the build
configuration now prevent that option.

Test: Check that:
        export OVERRIDE_TARGET_FLATTEN_APEX=true \
          && . ./build/envsetup.sh \
          && lunch aosp_walleye-userdebug \
          && export OVERRIDE_TARGET_FLATTEN_APEX=true \
          && build/soong/soong_ui.bash --dumpvar-mode TARGET_FLATTEN_APEX
      returns:
        true
Bug: 121117762

Change-Id: Ib9ccae38430340de38e4758b4f55df2c65ea60d5
2019-10-04 18:35:49 +01:00
Colin Cross
a63ce3af4c Merge "Use -nostdlib++ instead of -nodefaultlibs" 2019-10-04 03:26:11 +00:00
Bill Peckham
e868aec14b Moving recovery resources from /system to /vendor
This change is part of a topic that moves the recovery resources from the
system partition to the vendor partition, if it exists, or the vendor directory
on the system partition otherwise. The recovery resources are moving from the
system image to the vendor partition so that a single system image may be used
with either an A/B or a non-A/B vendor image. The topic removes a delta in the
system image that prevented such reuse in the past.

The recovery resources that are moving are involved with updating the recovery
partition after an update. In a non-A/B configuration, the system boots from
the recovery partition, updates the other partitions (system, vendor, etc.)
Then, the next time the system boots normally, a script updates the recovery
partition (if necessary). This script, the executables it invokes, and the data
files that it uses were previously on the system partition. The resources that
are moving include the following.

* install-recovery.sh
* applypatch
* recovery-resource.dat (if present)
* recovery-from-boot.p (if present)

This change includes the platform build system and release tools changes to
move the recovery resources from system to vendor (or /system/vendor). The
release tools need to know where to generate the recovery patch, and they
discover this from misc_info.txt variable board_uses_vendorimage, which the
platform build system generates.

We remove applypatch from PRODUCT_PACKAGES, but it is added back as a required
module in target/product/base_vendor.mk.

Several release tools rely on the misc_info.txt board_uses_vendorimage variable
to know how to generate and detect the recovery patch.

This change partially removes the --rebuild_recovery flag from the
merge_target_files.py script. The flag will be fully removed in a follow-on
change.

Bug: 68319577
Test: Ensure that recovery partition is updated correctly.
Change-Id: Ia4045bd67ffb3d899efa8d20dab4c4299b87ee5f
2019-10-04 00:04:34 +00:00
Colin Cross
84783a776e Use -nostdlib++ instead of -nodefaultlibs
Host builds using libc++ used -nodefaultlibs to turn off the default
C++ runtime, and then added back all the other necessary libraries.
Clang supports -nostdlib++ since https://reviews.llvm.org/D47115
that removes the C++ runtime without affecting the other default
libraries.  Use -nostdlib++, and remove the lists of default
libraries.

Test: m checkbuild
Change-Id: Ib8b761534f64fd7f881e14598e514783678e0b35
2019-10-03 16:04:52 -07:00
Elliott Hughes
bda45088a2 Merge "Remove ro.bionic.ld.warning." 2019-10-03 20:10:50 +00:00
Logan Chien
455d7e545a Merge "Always check ELF files for check-elf-files" 2019-10-03 15:51:09 +00:00
Elliott Hughes
787ac2ed38 Remove ro.bionic.ld.warning.
Bug: http://b/141754375
Test: treehugger
Change-Id: I07c0d5424dde16e85bcd6d5639bc594ee8582b20
2019-10-02 11:40:59 -07:00
Tao Bao
a835f38f0b Enforce the consistency between AB_OTA_UPDATER and AB_OTA_PARTITIONS.
They are designed to be used as a pair -- we should create separate
flags when there's a need.

Fixes: 130433003
Test: TreeHugger
Test: Define only one of them. `m dist` fails.
Change-Id: Ied57bd67fbed59b160c407dbb4c0d624581c58f7
2019-10-02 05:53:31 +00:00
Yo Chiang
9c683dc968 Merge "Change RRO enforcement logic" 2019-10-02 02:34:35 +00:00
Yifan Hong
4ba2bdb13e Merge "Add virtual_ab to dynamic_partitions_info.txt" 2019-10-02 00:36:24 +00:00
Treehugger Robot
7a4bf49fb9 Merge "Generation of C Flags Artifacts" 2019-10-01 19:25:50 +00:00
Yo Chiang
4693fd1d05 Change RRO enforcement logic
Change RRO logic from
"Enforce RRO for all modules when PRODUCT_ENFORCE_RRO_TARGETS is '*'"
to
"Enforce RRO for all modules when PRODUCT_ENFORCE_RRO_TARGETS includes '*'"

Bug: b/137727426
Test: test build on local machine
Change-Id: I10b215c28919988ec58deb1fe3d5498ad4e73eb4
2019-10-01 15:08:36 +08:00