Commit graph

41286 commits

Author SHA1 Message Date
Tao Bao
cb73aed1f0 releasetools: Refactor the condition checking for using imgdiff.
In Transfer class, unbundle 'intact' with the monotonicity of the input
ranges. Negate the logic of 'intact', and thus rename it to 'trimmed'.
Move this property from an attribute of Transfer class as the one in
RangeSet.extra. 'trimmed' indicates whether the source / target ranges
have been modified after creating the Transfer() instance.

The logic that determines whether we can apply imgdiff has been
refactored and consolidated into BlockImageDiff.CanUseImgdiff(). Now
both of the two paths call this single copy, i.e. the one that detects
large APKs (before creating Transfer()'s), and the other that's about to
generate the patch for a given Transfer instance.

Bug: 68016761
Test: python -m unittest test_blockimgdiff
Test: Generate an incremental BBOTA package.
Change-Id: Id07195f63f1fa6c3af6e9091940d251cf09fa104
2018-02-09 12:46:01 -08:00
Dan Willemsen
2744cbf190 Merge "Revert "Propagate proguard rules from LOCAL_STATIC_ANDROID_LIBRARIES"" 2018-02-09 19:22:13 +00:00
Dan Willemsen
30d6869faf Revert "Propagate proguard rules from LOCAL_STATIC_ANDROID_LIBRARIES"
This reverts commit df5d7da7d8.

Reason for revert: breaking builds

Bug: 72969557
Change-Id: I27aad65587933c3f760a89c541d27469c916abe8
2018-02-09 19:21:11 +00:00
Tom Cherry
9f25d873bf Merge "Add compile time check that friendly AID names are < 32 characters" 2018-02-09 18:46:27 +00:00
Tom Cherry
ee0610e86c Add compile time check that friendly AID names are < 32 characters
There is an internal buffer in bionic for user/group names that is 32
characters long including the trailing null, so we must restrict the
length of these names during compile time.

Bug: 27999086
Test: Successfully compile a valid config.fs
Test: Fail to compile a config.fs with AID name > 31 characters
Change-Id: I7fe887c630dd4d1033b86a5d8332480eb3b0fa07
2018-02-09 18:46:13 +00:00
Tom Cherry
55d0104f1b Place TARGET_FS_CONFIG_GEN passwd/group files in /vendor/etc
These entries are vendor provided and belong on the /vendor partition.

Bug: 27999086
Test: end to end user/group check via config.fs and getpwnam, etc.
Change-Id: I9a5d56da594bf0d04de2b9ce7fd7d9a8151d4682
2018-02-09 10:44:52 -08:00
Treehugger Robot
74413198b7 Merge "Move to-upper and to-lower to definitions.mk" 2018-02-09 18:20:23 +00:00
Dan Willemsen
13d389ad16 Merge "Propagate proguard rules from LOCAL_STATIC_ANDROID_LIBRARIES" 2018-02-09 18:00:11 +00:00
Treehugger Robot
9963b1af06 Merge "Don't use the same temp directory to uncompress dex" 2018-02-09 07:22:24 +00:00
Treehugger Robot
3c6eaad044 Merge "Fixed pdk build error for pi-release" 2018-02-09 06:57:40 +00:00
Colin Cross
86a596c711 Remove art targets from PARSE_TIME_MAKE_GOALS
The art targets don't check MAKECMDGOALS any more, remove them
from PARSE_TIME_MAKE_GOALS.

Bug: 26275726
Test: m clean-oat
Test: m test-art-host-run-test-dependencies
Change-Id: I75869495c91f142bf8eff681e6e764c9b0464031
2018-02-08 16:40:35 -08:00
Colin Cross
18fae7a32e Move to-upper and to-lower to definitions.mk
So they can be used by art/test/Android.run-test.mk.

Also remove the line wrapping, which was inserting extra characters
at the beginning of the result, and add a sanity check.

Bug: 26275726
Test: no change to out/build-hikey960-test-art.ninja
Change-Id: I35b54c258a1dc76bb1a8a758ec4a08915a2b226d
2018-02-08 16:03:17 -08:00
Dan Willemsen
df5d7da7d8 Propagate proguard rules from LOCAL_STATIC_ANDROID_LIBRARIES
Packages would use proguard rules from their
LOCAL_STATIC_ANDROID_LIBRARIES, but other libraries wouldn't propagate
the rules from their LOCAL_STATIC_ANDROID_LIBRARIES.

Bug: 72969557
Test: m
Change-Id: I514af02627d78c48cf6cd08d4b3c17911c6bac2f
2018-02-08 15:31:02 -08:00
Nan Zhang
f12aec3ca2 Fixed pdk build error for pi-release
due to missing header.jar, build was broken with error:
"android_stubs_current_intermediates/classes-header.jar needed by
android-support-annotations_intermediates/classes-turbine.jar,
missing and no known rule to make it"

Bug: b/72961456
Test: after check-in, I will download platform.zip to built it again.
Change-Id: I32ac8d8713ca31d27de42f87bde72185609d270c
2018-02-08 14:14:32 -08:00
Victor Hsieh
7aecf33efd Don't use the same temp directory to uncompress dex
This was ok for apk because they are in different parent directory.

Test: marlin built
Bug: 63920015
Bug: 30972906
Change-Id: I5ed00824fda9e7e0a99c825402753c21a06ba6c5
2018-02-08 13:24:56 -08:00
Yi Kong
b5751e4bd7 Merge "Compiler-rt libraries now use i386 instead of i686" 2018-02-08 08:21:54 +00:00
Justin Yun
835e296ce1 Merge "Revert "PRODUCT_TREBLE_LINKER_NAMESPACES must be true for BOARD_VNDK_VERSION"" 2018-02-08 07:26:51 +00:00
Justin Yun
fbcc2ad22e Revert "PRODUCT_TREBLE_LINKER_NAMESPACES must be true for BOARD_VNDK_VERSION"
This reverts commit 69ae572779.

Reason for revert: Build breaks on aosp_car

Change-Id: I9c7f0eedf8ea8fb3b4e14dc2024dea376cc14093
2018-02-08 07:06:13 +00:00
Yi Kong
cbcf11cba0 Compiler-rt libraries now use i386 instead of i686
Since Clang-4579689, crt libraries use i386 instead of i686. Update the
hardcoded paths to the new names.

Bug: 72942266
Test: N/A
Change-Id: I24f8f5742ac2fecd374fdaa3be8a11f410d31cbf
2018-02-08 14:08:44 +08:00
Treehugger Robot
1e6b7c553a Merge "PRODUCT_TREBLE_LINKER_NAMESPACES must be true for BOARD_VNDK_VERSION" 2018-02-08 05:54:16 +00:00
Justin Yun
69ae572779 PRODUCT_TREBLE_LINKER_NAMESPACES must be true for BOARD_VNDK_VERSION
If PRODUCT_TREBLE_LINKER_NAMESPACES is not true when
BOARD_VNDK_VERSION is defined, report a build error.
To enable VNDK, linker namespace must be configured.

Bug: 72704254
Test: Try to build with one of them is missing
Change-Id: I804704e2f48fa44c8f998183508741d5cc40e4ce
2018-02-08 05:53:48 +00:00
Tao Bao
acb3cecc46 Merge "releasetools: RangeSet.monotonic is not an optional attribute." 2018-02-08 04:45:44 +00:00
Jaekyun Seok
c227ce7c25 Enable BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED for full-treble products
BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED can be true only if early-mount of
partitions is supported. But the early-mount must be supported for full
treble products, and so BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED should be
set by default for full treble products.

Additionally this CL sets ro.vndk.version regardless of
BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED.

Bug: 73078796
Test: tested with walleye
Change-Id: Icfe1b6957b55b0f9261d34d7e92db3dc5073cb58
2018-02-08 11:49:16 +09:00
Treehugger Robot
058d6c2d1e Merge changes from topic "vintf_matrix_sepolicy"
* changes:
  core/config.mk: Add PLATFORM_SEPOLICY_COMPAT_VERSIONS
  Move PLATFORM_SEPOLICY_VERSION from system/sepolicy/Android.mk
2018-02-07 22:32:44 +00:00
Simran Basi
a132154c18 build: Default test modules to null-suite
The LOCAL_COMPATIBILITY_SUITE tag is used to package tests and
auto-generate test configs for use in the test infrastructure
and locally by atest.

Rather than update hundreds of makefiles across the tree, this
change adds significant atest support to many unittests.

Bug: 73000943, 72969679, 71510529
Test: `atest NotificationStressTests` works as expected.
Change-Id: I1b0a779b8366aee4b4df98181267f72fcb68916a
2018-02-07 11:57:22 -08:00
Michael Wright
0b733a2036 Merge "Revert "Correct some GSI settings to board makefile"" 2018-02-07 15:11:07 +00:00
Michael Wright
87163300c2 Revert "Correct some GSI settings to board makefile"
This reverts commit 6e96487968.

Reason for revert: build_test broken by this change.

Change-Id: I0f48bb84dc8c521540c745814daa11c2900ac2c8
2018-02-07 12:08:51 +00:00
Treehugger Robot
2f7f7ca1c0 Merge "Correct some GSI settings to board makefile" 2018-02-07 09:02:40 +00:00
Treehugger Robot
9f14cf2e49 Merge "Change the naming policy of system_$(VER)" 2018-02-07 06:26:05 +00:00
Tao Bao
67ba60029d Merge "releasetools: Support packaging secondary payload." 2018-02-07 05:24:46 +00:00
Sundong Ahn
7a02001fa9 Change the naming policy of system_$(VER)
The module name of system_$(VER) prebuilt file is system_sdk_v$(VER).
But this is inconsistent with sdk_v$(LOCAL_SDK_VERSION) in prebuilts/sdk.
So, system_sdk_v$(VER) is changed to sdk_vsystem_$(VER) to use the same
naming policy.

Bug: 72031391
Test: build
Change-Id: I379c0f9aa0de7407489eeec2b07ee7727e81d69d
2018-02-07 03:37:24 +00:00
Treehugger Robot
9ffbc10126 Merge "LOCAL_HOST_REQUIRED_MODULES support" 2018-02-07 01:57:18 +00:00
Isaac Chen
b943fb63bf Merge "Add ro.vendor.product.cpu.* to vendor/build.prop" 2018-02-07 01:57:12 +00:00
Tao Bao
fe97dbd4ce releasetools: RangeSet.monotonic is not an optional attribute.
'monotonic' has been non-optional since [1] (L-MR1). Fix the comment in
RangeSet.parse(), as well as the use in blockimgdiff.py.

[1] commit 8b72aefb5a.

Test: Generate an incremental BBOTA package.
Change-Id: I7f95231683473b4f0f07f9c83fccc0e36a1340cb
2018-02-06 16:00:52 -08:00
Treehugger Robot
c82c0a81ec Merge "Support LOCAL_SDK_VERSION := core_current" 2018-02-06 22:37:16 +00:00
Simran Basi
893098b06c LOCAL_HOST_REQUIRED_MODULES support
Allows target modules to directly request host modules they
require to be built and installed as well.

Bug: 72761631
Test: Added LOCAL_HOST_REQUIRED_MODULES to a target apk test and
      the host module was built.

Change-Id: I5aca11b3ba8b54676f068d337f1c9ba0e0b01997
2018-02-06 14:18:45 -08:00
Treehugger Robot
9f573a420e Merge "Replace $(shell find | sort) with $(sort $(shell find))" 2018-02-06 21:21:08 +00:00
Stephen Hines
f733f896d3 Merge "Switch to clang-4579689." 2018-02-06 18:35:41 +00:00
Tao Bao
26fc64da06 Merge "releasetools: Capture stderr output when calling delta_generator." 2018-02-06 17:20:53 +00:00
Treehugger Robot
08ba09ed7f Merge "Clear local robolectric testing variables" 2018-02-06 16:55:09 +00:00
hansson
ee00360292 Merge "Add a base makefile for 64 bit only builds." 2018-02-06 10:08:48 +00:00
Tao Bao
3f15ada51b releasetools: Capture stderr output when calling delta_generator.
Prior to this CL, the call to delta_generator in
check_ota_package_signature.VerifyAbOtaPayload() didn't redirect stderr.
The logs (mostly INFO) on successful verification added noise to the
normal output, which also upset the unittest result parser.

This CL captures stderr outputs from delta_generator, and will only dump
them on error.

Bug: 72884343
Test: `python -m unittest -v test_ota_from_target_files > /dev/null`
      gives clean output.
Test: Inject error into delta_generator. The call to
      check_ota_package_signature correctly dumps both of stdout and
      stderr outputs.
Change-Id: I014a4b21bf758dcf0a4b9963259d6019851935ee
2018-02-05 23:39:23 -08:00
Dan Willemsen
be0b6cee4f Replace $(shell find | sort) with $(sort $(shell find))
Kati's find emulator doesn't understand "| sort", so use use the make
function instead so that we can emulate the find commands.

 before: *kati*: shell time (regen): 1.316989 / 187
 after:  *kati*: shell time (regen): 1.249748 / 184

The time has a lot of variance, the important change is the reduction in
number of shell commands. Kati has other issues with some of these (it
doesn't support find's implicit -a), which is why it only goes down by
3. I'll be fixing Kati separately to handle those cases.

Test: diff out/build-aosp_taimen.ninja before&after
Change-Id: I5c8c2993f01a8a6af84963e903a8a0c186a61e82
2018-02-05 23:07:58 -08:00
Yifan Hong
9bf93017d4 core/config.mk: Add PLATFORM_SEPOLICY_COMPAT_VERSIONS
This is a list of sepolicy versions that the framework supports.

Test: build framework compatibility matrix
Test: boots

Bug: 67920434
Change-Id: I82365742172b653eadb7b5315398e06cace4e000
2018-02-05 15:55:11 -08:00
Yifan Hong
8f4547cde9 Move PLATFORM_SEPOLICY_VERSION from system/sepolicy/Android.mk
Test: builds
Bug: 67920434
Change-Id: I3b29fd188e755039a1fcf4814c578a2220567bf1
2018-02-05 15:55:11 -08:00
James Lemieux
bb426739ce Clear local robolectric testing variables
This prevents them from mistakenly bleeding between test targets.

Bug: 72384841
Test: make Run_TeleService_robotests
Change-Id: Ie2c047be1450420f8e27b8b45e9416e96b477b45
2018-02-05 15:39:18 -08:00
Treehugger Robot
fe34c5b52c Merge "Move system manifest / device matrix build rules" 2018-02-05 22:27:18 +00:00
Tao Bao
f7140c0f8c releasetools: Support packaging secondary payload.
By default, an A/B OTA package doesn't contain the images for the
secondary slot (e.g. system_other.img). Specifying
"--include_secondary" that's introduced in this CL allows generating
a separate payload that will install secondary slot images. Both
payloads will be added to the generated A/B OTA package.

An example A/B OTA package with secondary payload
  |
  +-- payload.bin
  |
  +-- payload_properties.txt
  |
  +-- secondary/payload.bin
  |
  +-- secondary/payload_properties.txt
  |
  +-- ...

Such a package needs to be applied in a two-stage manner. During the
first stage, the updater applies the primary payload only. Upon
finishing, it reboots the device into the newly updated slot. It then
continues to install the secondary payload to the inactive slot, but
without switching the active slot at the end (needs the matching support
in update_engine, i.e. SWITCH_SLOT_ON_REBOOT flag).

Due to the special install procedure, the secondary payload will be
always generated as a full payload.

Bug: 35724498
Test: Generate full and incremental OTAs with --include_secondary. Check
      the generated OTAs.
Test: python -m unittest test_ota_from_target_files
Change-Id: I975e826bec492e86eb400f99de0c355a32420127
2018-02-05 13:28:52 -08:00
Treehugger Robot
ca2ffed06c Merge "releasetools: Fix an issue with pubkey extraction." 2018-02-05 21:25:47 +00:00
Treehugger Robot
a3a211dafe Merge "Add Traceur to user builds." 2018-02-05 20:31:23 +00:00