diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2017-10-09 19:09:24 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2017-10-09 19:22:38 +0000 |
commit | b4f1c9629f51eea37f34fcf2ade420d3c370ed7e (patch) | |
tree | e7f9a7c72bedab938a05ddb5c42342f0699fad88 | |
parent | de0954d1421807b31654a1b32f8096a9aa5a4359 (diff) | |
parent | 7c4817bf4a03fcf88bbc99a0de1057f1295ab1e3 (diff) | |
download | platform_build-b4f1c9629f51eea37f34fcf2ade420d3c370ed7e.tar.gz platform_build-b4f1c9629f51eea37f34fcf2ade420d3c370ed7e.tar.bz2 platform_build-b4f1c9629f51eea37f34fcf2ade420d3c370ed7e.zip |
Make change and version bump to OPM2.171009.001
Change-Id: Icefba6a1df46239ccb8043a36ce98ccd5eeb310f
-rw-r--r-- | core/build_id.mk | 2 | ||||
-rw-r--r-- | core/config.mk | 8 | ||||
-rw-r--r-- | target/board/generic_arm_a/BoardConfig.mk | 2 | ||||
-rw-r--r-- | target/board/generic_arm_ab/BoardConfig.mk | 3 | ||||
-rw-r--r-- | target/product/go_defaults.mk | 57 | ||||
-rw-r--r-- | target/product/product_launched_with_o_mr1.mk | 2 | ||||
-rw-r--r-- | target/product/treble_common.mk | 5 | ||||
-rwxr-xr-x | tools/dump-package-stats | 12 | ||||
-rwxr-xr-x | tools/releasetools/add_img_to_target_files.py | 12 | ||||
-rwxr-xr-x | tools/releasetools/build_image.py | 13 | ||||
-rw-r--r-- | tools/releasetools/common.py | 4 |
11 files changed, 103 insertions, 17 deletions
diff --git a/core/build_id.mk b/core/build_id.mk index 8104589d4d..f6dec53e2b 100644 --- a/core/build_id.mk +++ b/core/build_id.mk @@ -18,4 +18,4 @@ # (like "CRB01"). It must be a single word, and is # capitalized by convention. -export BUILD_ID=OPM2.170928.004 +export BUILD_ID=OPM2.171009.001 diff --git a/core/config.mk b/core/config.mk index 94277de78b..cc2b2af12b 100644 --- a/core/config.mk +++ b/core/config.mk @@ -727,6 +727,14 @@ else ifneq ($(call math_gt_or_eq,$(PRODUCT_SHIPPING_API_LEVEL),26),) PRODUCT_FULL_TREBLE := true endif +ifdef PRODUCT_SHIPPING_API_LEVEL + ifneq ($(call math_gt_or_eq,$(PRODUCT_SHIPPING_API_LEVEL),27),) + ifneq ($(TARGET_USES_MKE2FS),true) + $(error When PRODUCT_SHIPPING_API_LEVEL >= 27, TARGET_USES_MKE2FS must be true) + endif + endif +endif + # The default key if not set as LOCAL_CERTIFICATE ifdef PRODUCT_DEFAULT_DEV_CERTIFICATE DEFAULT_SYSTEM_DEV_CERTIFICATE := $(PRODUCT_DEFAULT_DEV_CERTIFICATE) diff --git a/target/board/generic_arm_a/BoardConfig.mk b/target/board/generic_arm_a/BoardConfig.mk index e3a670784d..d930749241 100644 --- a/target/board/generic_arm_a/BoardConfig.mk +++ b/target/board/generic_arm_a/BoardConfig.mk @@ -17,7 +17,7 @@ include build/make/target/board/treble_common_32.mk # Overwrite the setting in treble_common_32.mk for non-A/B arm GSI -BOARD_SYSTEMIMAGE_PARTITION_SIZE := 950009856 +BOARD_SYSTEMIMAGE_PARTITION_SIZE := 805306368 # 768MB TARGET_ARCH := arm TARGET_ARCH_VARIANT := armv7-a-neon diff --git a/target/board/generic_arm_ab/BoardConfig.mk b/target/board/generic_arm_ab/BoardConfig.mk index ae8de14681..011bcdf60c 100644 --- a/target/board/generic_arm_ab/BoardConfig.mk +++ b/target/board/generic_arm_ab/BoardConfig.mk @@ -16,6 +16,9 @@ include build/make/target/board/treble_common_32.mk +# Overwrite the setting in treble_common_32.mk for non-A/B arm GSI +BOARD_SYSTEMIMAGE_PARTITION_SIZE := 805306368 # 768MB + TARGET_ARCH := arm TARGET_ARCH_VARIANT := armv7-a-neon TARGET_CPU_ABI := armeabi-v7a diff --git a/target/product/go_defaults.mk b/target/product/go_defaults.mk new file mode 100644 index 0000000000..fbb95677fb --- /dev/null +++ b/target/product/go_defaults.mk @@ -0,0 +1,57 @@ +# +# Copyright (C) 2017 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Sets Android Go recommended default values for propreties. + +# Set lowram options +PRODUCT_PROPERTY_OVERRIDES += \ + ro.config.low_ram=true \ + ro.lmk.critical_upgrade=true \ + ro.lmk.upgrade_pressure=40 + +# set threshold to filter unused apps +PRODUCT_PROPERTY_OVERRIDES += \ + pm.dexopt.downgrade_after_inactive_days=10 + + +# Speed profile services and wifi-service to reduce RAM and storage. +PRODUCT_SYSTEM_SERVER_COMPILER_FILTER := speed-profile + +# Always preopt extracted APKs to prevent extracting out of the APK for gms +# modules. +PRODUCT_ALWAYS_PREOPT_EXTRACTED_APK := true + +# Use a profile based boot image for this device. Note that this is currently a +# generic profile and not Android Go optimized. +PRODUCT_USE_PROFILE_FOR_BOOT_IMAGE := true +PRODUCT_DEX_PREOPT_BOOT_IMAGE_PROFILE_LOCATION := frameworks/base/config/boot-image-profile.txt + +# set the compiler filter for shared apks to quicken. +# Rationale: speed has a lot of dex code expansion, it uses more ram and space +# compared to quicken. Using quicken for shared APKs on Go devices may save RAM. +# Note that this is a trade-off: here we trade clean pages for dirty pages, +# extra cpu and battery. That's because the quicken files will be jit-ed in all +# the processes that load of shared apk and the code cache is not shared. +# Some notable apps that will be affected by this are gms and chrome. +# b/65591595. +PRODUCT_PROPERTY_OVERRIDES += \ + pm.dexopt.shared=quicken + +# Default heap sizes. Allow up to 256m for large heaps to make sure a single app +# doesn't take all of the RAM. +PRODUCT_PROPERTY_OVERRIDES += dalvik.vm.heapgrowthlimit=128m +PRODUCT_PROPERTY_OVERRIDES += dalvik.vm.heapsize=256m + diff --git a/target/product/product_launched_with_o_mr1.mk b/target/product/product_launched_with_o_mr1.mk new file mode 100644 index 0000000000..25620aa14c --- /dev/null +++ b/target/product/product_launched_with_o_mr1.mk @@ -0,0 +1,2 @@ +#PRODUCT_SHIPPING_API_LEVEL indicates the first api level, device has been commercially launced on. +PRODUCT_SHIPPING_API_LEVEL := 27 diff --git a/target/product/treble_common.mk b/target/product/treble_common.mk index f885646adc..13b7769f8c 100644 --- a/target/product/treble_common.mk +++ b/target/product/treble_common.mk @@ -26,6 +26,11 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/telephony.mk) # Split selinux policy PRODUCT_FULL_TREBLE_OVERRIDE := true +# The Messaging app: +# Needed for android.telecom.cts.ExtendedInCallServiceTest#testOnCannedTextResponsesLoaded +PRODUCT_PACKAGES += \ + messaging + # All VNDK libraries (HAL interfaces, VNDK, VNDK-SP, LL-NDK) PRODUCT_PACKAGES += vndk_package diff --git a/tools/dump-package-stats b/tools/dump-package-stats index d11e727461..7814368cd4 100755 --- a/tools/dump-package-stats +++ b/tools/dump-package-stats @@ -77,7 +77,7 @@ do then fail "$file doesn't exist or isn't a file" fi - unzip -lv "$file" | awk ' + unzip -lvq "$file" | awk ' BEGIN { total_compressed = 0; total_uncompressed = 0; @@ -88,16 +88,6 @@ do # Make sure the output of unzip -lv looks like something we expect. # NR == "1" { - if ($1 != "Archive:") { - print "'$PROGNAME': ERROR: Unexpected zip listing format" > \ - "/dev/stderr"; - print "'$PROGNAME': ERROR: Line 1 is \"" $0 "\"" > \ - "/dev/stderr"; - failed = 1; - exit 1; - } - } - NR == "2" { if (NF != "8" || $1 != "Length" || $2 != "Method" || diff --git a/tools/releasetools/add_img_to_target_files.py b/tools/releasetools/add_img_to_target_files.py index 02f2000a07..1a08cb6fa7 100755 --- a/tools/releasetools/add_img_to_target_files.py +++ b/tools/releasetools/add_img_to_target_files.py @@ -53,6 +53,7 @@ if sys.hexversion < 0x02070000: import datetime import errno +import hashlib import os import shlex import shutil @@ -546,6 +547,17 @@ def AddImagesToTargetFiles(filename): has_recovery = (OPTIONS.info_dict.get("no_recovery") != "true") + if OPTIONS.info_dict.get("avb_enable") == "true": + fp = None + if "build.prop" in OPTIONS.info_dict: + build_prop = OPTIONS.info_dict["build.prop"] + if "ro.build.fingerprint" in build_prop: + fp = build_prop["ro.build.fingerprint"] + elif "ro.build.thumbprint" in build_prop: + fp = build_prop["ro.build.thumbprint"] + if fp: + OPTIONS.info_dict["avb_salt"] = hashlib.sha256(fp).hexdigest() + def banner(s): print("\n\n++++ " + s + " ++++\n\n") diff --git a/tools/releasetools/build_image.py b/tools/releasetools/build_image.py index 1b9bb04f1f..ccfa35fc10 100755 --- a/tools/releasetools/build_image.py +++ b/tools/releasetools/build_image.py @@ -120,7 +120,7 @@ def AVBCalcMaxImageSize(avbtool, footer_type, partition_size, additional_args): return int(output) def AVBAddFooter(image_path, avbtool, footer_type, partition_size, - partition_name, key_path, algorithm, + partition_name, key_path, algorithm, salt, additional_args): """Adds dm-verity hashtree and AVB metadata to an image. @@ -132,6 +132,7 @@ def AVBAddFooter(image_path, avbtool, footer_type, partition_size, partition_name: The name of the partition - will be embedded in metadata. key_path: Path to key to use or None. algorithm: Name of algorithm to use or None. + salt: The salt to use (a hexadecimal string) or None. additional_args: Additional arguments to pass to 'avbtool add_hashtree_image'. Returns: @@ -144,6 +145,8 @@ def AVBAddFooter(image_path, avbtool, footer_type, partition_size, if key_path and algorithm: cmd.extend(["--key", key_path, "--algorithm", algorithm]) + if salt: + cmd.extend(["--salt", salt]) cmd.extend(shlex.split(additional_args)) @@ -590,10 +593,11 @@ def BuildImage(in_dir, prop_dict, out_file, target_out=None): # key_path and algorithm are only available when chain partition is used. key_path = prop_dict.get("avb_key_path") algorithm = prop_dict.get("avb_algorithm") + salt = prop_dict.get("avb_salt") # avb_add_hash_footer_args or avb_add_hashtree_footer_args additional_args = prop_dict["avb_add_" + avb_footer_type + "_footer_args"] if not AVBAddFooter(out_file, avbtool, avb_footer_type, original_partition_size, - partition_name, key_path, algorithm, additional_args): + partition_name, key_path, algorithm, salt, additional_args): return False if run_fsck and prop_dict.get("skip_fsck") != "true": @@ -639,8 +643,9 @@ def ImagePropFromGlobalDict(glob_dict, mount_point): "verity_signer_cmd", "verity_fec", "avb_enable", - "avb_avbtool" - ) + "avb_avbtool", + "avb_salt", + ) for p in common_props: copy_prop(p, p) diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py index 34c334e40f..f3096c924b 100644 --- a/tools/releasetools/common.py +++ b/tools/releasetools/common.py @@ -353,6 +353,10 @@ def AppendAVBSigningArgs(cmd, partition): algorithm = OPTIONS.info_dict.get("avb_" + partition + "_algorithm") if key_path and algorithm: cmd.extend(["--key", key_path, "--algorithm", algorithm]) + avb_salt = OPTIONS.info_dict.get("avb_salt") + # make_vbmeta_image doesn't like "--salt" (and it's not needed). + if avb_salt and partition != "vbmeta": + cmd.extend(["--salt", avb_salt]) def _BuildBootableImage(sourcedir, fs_config_file, info_dict=None, |