diff options
-rw-r--r-- | core/Makefile | 58 | ||||
-rw-r--r-- | core/android_soong_config_vars.mk | 1 | ||||
-rw-r--r-- | core/board_config.mk | 24 | ||||
-rw-r--r-- | core/config.mk | 8 | ||||
-rw-r--r-- | core/main.mk | 46 | ||||
-rw-r--r-- | core/product.mk | 5 | ||||
-rw-r--r-- | core/sysprop.mk | 15 | ||||
-rw-r--r-- | core/tasks/platform_availability_check.mk | 7 | ||||
-rw-r--r-- | envsetup.sh | 48 | ||||
-rw-r--r-- | target/product/full_base.mk | 8 | ||||
-rw-r--r-- | target/product/full_base_telephony.mk | 12 | ||||
-rw-r--r-- | target/product/handheld_product.mk | 6 | ||||
-rw-r--r-- | target/product/virtual_ab_ota/launch.mk | 11 | ||||
-rw-r--r-- | target/product/virtual_ab_ota/launch_with_vendor_ramdisk.mk | 2 | ||||
-rwxr-xr-x | tools/buildinfo.sh | 8 | ||||
-rwxr-xr-x | tools/post_process_props.py | 6 | ||||
-rw-r--r-- | tools/releasetools/common.py | 19 | ||||
-rw-r--r-- | tools/releasetools/edify_generator.py | 12 | ||||
-rw-r--r-- | tools/releasetools/make_recovery_patch.py | 12 | ||||
-rw-r--r-- | tools/releasetools/non_ab_ota.py | 9 | ||||
-rwxr-xr-x | tools/releasetools/ota_from_target_files.py | 2 | ||||
-rw-r--r-- | tools/releasetools/ota_utils.py | 8 | ||||
-rwxr-xr-x | tools/releasetools/sign_target_files_apks.py | 2 |
23 files changed, 246 insertions, 83 deletions
diff --git a/core/Makefile b/core/Makefile index 790d72289d..78a92577a6 100644 --- a/core/Makefile +++ b/core/Makefile @@ -1035,8 +1035,10 @@ INTERNAL_BOOTIMAGE_ARGS := \ # TODO(b/229701033): clean up BOARD_BUILD_GKI_BOOT_IMAGE_WITHOUT_RAMDISK. ifneq ($(BOARD_BUILD_GKI_BOOT_IMAGE_WITHOUT_RAMDISK),true) - ifneq ($(BUILDING_INIT_BOOT_IMAGE),true) - INTERNAL_BOOTIMAGE_ARGS += --ramdisk $(INSTALLED_RAMDISK_TARGET) + ifneq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true) + ifneq ($(BUILDING_INIT_BOOT_IMAGE),true) + INTERNAL_BOOTIMAGE_ARGS += --ramdisk $(INSTALLED_RAMDISK_TARGET) + endif endif endif @@ -1048,6 +1050,9 @@ endif INTERNAL_BOOTIMAGE_FILES := $(filter-out --%,$(INTERNAL_BOOTIMAGE_ARGS)) +# TODO(b/241346584) Remove this when BOARD_BUILD_SYSTEM_ROOT_IMAGE is deprecated +INTERNAL_KERNEL_CMDLINE := $(strip $(INTERNAL_KERNEL_CMDLINE) buildvariant=$(TARGET_BUILD_VARIANT)) + # kernel cmdline/base/pagesize in boot. # - If using GKI, use GENERIC_KERNEL_CMDLINE. Remove kernel base and pagesize because they are # device-specific. @@ -2061,6 +2066,8 @@ $(if $(BOARD_AVB_ENABLE),\ $(hide) echo "avb_system_dlkm_rollback_index_location=$(BOARD_SYSTEM_SYSTEM_DLKM_ROLLBACK_INDEX_LOCATION)" >> $(1))) $(if $(filter true,$(BOARD_USES_RECOVERY_AS_BOOT)),\ $(hide) echo "recovery_as_boot=true" >> $(1)) +$(if $(filter true,$(BOARD_BUILD_SYSTEM_ROOT_IMAGE)),\ + $(hide) echo "system_root_image=true" >> $(1)) $(if $(filter true,$(BOARD_BUILD_GKI_BOOT_IMAGE_WITHOUT_RAMDISK)),\ $(hide) echo "gki_boot_image_without_ramdisk=true" >> $(1)) $(hide) echo "root_dir=$(TARGET_ROOT_OUT)" >> $(1) @@ -2337,18 +2344,20 @@ endif # (BOARD_USES_FULL_RECOVERY_IMAGE = true); # b) We build a single image that contains boot and recovery both - no recovery image to install # (BOARD_USES_RECOVERY_AS_BOOT = true); -# c) We include the recovery DTBO image within recovery - not needing the resource file as we +# c) We mount the system image as / and therefore do not have a ramdisk in boot.img +# (BOARD_BUILD_SYSTEM_ROOT_IMAGE = true). +# d) We include the recovery DTBO image within recovery - not needing the resource file as we # do bsdiff because boot and recovery will contain different number of entries # (BOARD_INCLUDE_RECOVERY_DTBO = true). -# d) We include the recovery ACPIO image within recovery - not needing the resource file as we +# e) We include the recovery ACPIO image within recovery - not needing the resource file as we # do bsdiff because boot and recovery will contain different number of entries # (BOARD_INCLUDE_RECOVERY_ACPIO = true). -# e) We build a single image that contains vendor_boot and recovery both - no recovery image to +# f) We build a single image that contains vendor_boot and recovery both - no recovery image to # install # (BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT = true). ifeq (,$(filter true, $(BOARD_USES_FULL_RECOVERY_IMAGE) $(BOARD_USES_RECOVERY_AS_BOOT) \ - $(BOARD_INCLUDE_RECOVERY_DTBO) $(BOARD_INCLUDE_RECOVERY_ACPIO) \ + $(BOARD_BUILD_SYSTEM_ROOT_IMAGE) $(BOARD_INCLUDE_RECOVERY_DTBO) $(BOARD_INCLUDE_RECOVERY_ACPIO) \ $(BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT))) # Named '.dat' so we don't attempt to use imgdiff for patching it. RECOVERY_RESOURCE_ZIP := $(TARGET_OUT_VENDOR)/etc/recovery-resource.dat @@ -2470,7 +2479,8 @@ $(INTERNAL_RECOVERY_RAMDISK_FILES_TIMESTAMP): $(MKBOOTFS) $(COMPRESSION_COMMAND_ # Use rsync because "cp -Rf" fails to overwrite broken symlinks on Mac. rsync -a --exclude=sdcard $(IGNORE_RECOVERY_SEPOLICY) $(IGNORE_CACHE_LINK) $(TARGET_ROOT_OUT) $(TARGET_RECOVERY_OUT) # Modifying ramdisk contents... - ln -sf /system/bin/init $(TARGET_RECOVERY_ROOT_OUT)/init + $(if $(filter true,$(BOARD_BUILD_SYSTEM_ROOT_IMAGE)),, \ + ln -sf /system/bin/init $(TARGET_RECOVERY_ROOT_OUT)/init) # Removes $(TARGET_RECOVERY_ROOT_OUT)/init*.rc EXCEPT init.recovery*.rc. find $(TARGET_RECOVERY_ROOT_OUT) -maxdepth 1 -name 'init*.rc' -type f -not -name "init.recovery.*.rc" | xargs rm -f cp $(TARGET_ROOT_OUT)/init.recovery.*.rc $(TARGET_RECOVERY_ROOT_OUT)/ 2> /dev/null || true # Ignore error when the src file doesn't exist. @@ -3245,7 +3255,7 @@ INSTALLED_SYSTEMIMAGE := $(INSTALLED_SYSTEMIMAGE_TARGET) ifneq ($(INSTALLED_BOOTIMAGE_TARGET),) ifneq ($(INSTALLED_RECOVERYIMAGE_TARGET),) ifneq ($(BOARD_USES_FULL_RECOVERY_IMAGE),true) -ifneq (,$(filter true,$(BOARD_INCLUDE_RECOVERY_DTBO) $(BOARD_INCLUDE_RECOVERY_ACPIO))) +ifneq (,$(filter true, $(BOARD_BUILD_SYSTEM_ROOT_IMAGE) $(BOARD_INCLUDE_RECOVERY_DTBO) $(BOARD_INCLUDE_RECOVERY_ACPIO))) diff_tool := $(HOST_OUT_EXECUTABLES)/bsdiff else diff_tool := $(HOST_OUT_EXECUTABLES)/imgdiff @@ -4506,6 +4516,18 @@ $(foreach partition,$(BOARD_CUSTOMIMAGES_PARTITION_LIST), \ $(eval $(call check-and-set-custom-avb-chain-args,$(partition)))) endif +# Add kernel cmdline descriptor for kernel to mount system.img as root with +# dm-verity. This works when system.img is either chained or not-chained: +# - chained: The --setup_as_rootfs_from_kernel option will add dm-verity kernel +# cmdline descriptor to system.img +# - not-chained: The --include_descriptors_from_image option for make_vbmeta_image +# will include the kernel cmdline descriptor from system.img into vbmeta.img +ifeq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true) +ifeq ($(filter system, $(BOARD_SUPER_PARTITION_PARTITION_LIST)),) +BOARD_AVB_SYSTEM_ADD_HASHTREE_FOOTER_ARGS += --setup_as_rootfs_from_kernel +endif +endif + BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --padding_size 4096 BOARD_AVB_MAKE_VBMETA_SYSTEM_IMAGE_ARGS += --padding_size 4096 BOARD_AVB_MAKE_VBMETA_VENDOR_IMAGE_ARGS += --padding_size 4096 @@ -5404,6 +5426,9 @@ endif ifeq ($(BOARD_USES_FULL_RECOVERY_IMAGE),true) $(hide) echo "full_recovery_image=true" >> $@ endif +ifdef BUILDING_VENDOR_IMAGE + $(hide) echo "board_builds_vendorimage=true" >> $@ +endif ifdef BOARD_USES_VENDORIMAGE $(hide) echo "board_uses_vendorimage=true" >> $@ endif @@ -5552,6 +5577,9 @@ endif ifeq ($(TARGET_FLATTEN_APEX),false) $(hide) echo "target_flatten_apex=false" >> $@ endif +ifneq ($(TARGET_OTA_ASSERT_DEVICE),) + $(hide) echo "ota_override_device=$(TARGET_OTA_ASSERT_DEVICE)" >> $@ +endif $(call declare-0p-target,$(INSTALLED_MISC_INFO_TARGET)) @@ -5763,6 +5791,10 @@ ifdef BUILDING_VENDOR_BOOT_IMAGE endif endif +ifdef BUILDING_VENDOR_KERNEL_BOOT_IMAGE + $(BUILT_TARGET_FILES_PACKAGE): $(INSTALLED_FILES_FILE_VENDOR_KERNEL_RAMDISK) +endif + ifdef BUILDING_RECOVERY_IMAGE # TODO(b/30414428): Can't depend on INTERNAL_RECOVERYIMAGE_FILES alone like other # BUILT_TARGET_FILES_PACKAGE dependencies because currently there're cp/rsync/rm @@ -5935,8 +5967,10 @@ endif # INSTALLED_RECOVERYIMAGE_TARGET defined or BOARD_USES_RECOVERY_AS_BOOT is $(TARGET_ROOT_OUT),$(zip_root)/ROOT) @# If we are using recovery as boot, this is already done when processing recovery. ifneq ($(BOARD_USES_RECOVERY_AS_BOOT),true) +ifneq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true) $(hide) $(call package_files-copy-root, \ $(TARGET_RAMDISK_OUT),$(zip_root)/BOOT/RAMDISK) +endif ifdef INSTALLED_KERNEL_TARGET $(hide) cp $(INSTALLED_KERNEL_TARGET) $(zip_root)/BOOT/ endif @@ -6244,8 +6278,10 @@ ifdef BUILDING_SYSTEM_DLKM_IMAGE endif @# ROOT always contains the files for the root under normal boot. $(hide) $(call fs_config,$(zip_root)/ROOT,) > $(zip_root)/META/root_filesystem_config.txt - @# BOOT/RAMDISK contains the first stage and recovery ramdisk. +ifeq ($(BOARD_USES_RECOVERY_AS_BOOT),true) + @# BOOT/RAMDISK exists and contains the ramdisk for recovery if using BOARD_USES_RECOVERY_AS_BOOT. $(hide) $(call fs_config,$(zip_root)/BOOT/RAMDISK,) > $(zip_root)/META/boot_filesystem_config.txt +endif ifdef BUILDING_INIT_BOOT_IMAGE $(hide) $(call package_files-copy-root, $(TARGET_RAMDISK_OUT),$(zip_root)/INIT_BOOT/RAMDISK) $(hide) $(call fs_config,$(zip_root)/INIT_BOOT/RAMDISK,) > $(zip_root)/META/init_boot_filesystem_config.txt @@ -6257,6 +6293,10 @@ endif # BUILDING_INIT_BOOT_IMAGE ifneq ($(INSTALLED_VENDOR_BOOTIMAGE_TARGET),) $(call fs_config,$(zip_root)/VENDOR_BOOT/RAMDISK,) > $(zip_root)/META/vendor_boot_filesystem_config.txt endif +ifneq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true) + @# BOOT/RAMDISK also exists and contains the first stage ramdisk if not using BOARD_BUILD_SYSTEM_ROOT_IMAGE. + $(hide) $(call fs_config,$(zip_root)/BOOT/RAMDISK,) > $(zip_root)/META/boot_filesystem_config.txt +endif ifneq ($(INSTALLED_RECOVERYIMAGE_TARGET),) $(hide) $(call fs_config,$(zip_root)/RECOVERY/RAMDISK,) > $(zip_root)/META/recovery_filesystem_config.txt endif diff --git a/core/android_soong_config_vars.mk b/core/android_soong_config_vars.mk index 140acf0f16..dfc4e4eb4d 100644 --- a/core/android_soong_config_vars.mk +++ b/core/android_soong_config_vars.mk @@ -35,6 +35,7 @@ $(call add_soong_config_var_value,ANDROID,MIXED_SEPOLICY_VERSION,$(BOARD_SEPOLIC endif $(call add_soong_config_var,ANDROID,BOARD_USES_ODMIMAGE) $(call add_soong_config_var,ANDROID,BOARD_USES_RECOVERY_AS_BOOT) +$(call add_soong_config_var,ANDROID,BOARD_BUILD_SYSTEM_ROOT_IMAGE) $(call add_soong_config_var,ANDROID,PRODUCT_INSTALL_DEBUG_POLICY_TO_SYSTEM_EXT) # Default behavior for the tree wrt building modules or using prebuilts. This diff --git a/core/board_config.mk b/core/board_config.mk index 284239de51..a06a4d4926 100644 --- a/core/board_config.mk +++ b/core/board_config.mk @@ -405,6 +405,12 @@ define check_image_config endef ########################################### +# Now we can substitute with the real value of TARGET_COPY_OUT_RAMDISK +ifeq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true) +TARGET_COPY_OUT_RAMDISK := $(TARGET_COPY_OUT_ROOT) +endif + +########################################### # Configure whether we're building the system image BUILDING_SYSTEM_IMAGE := true ifeq ($(PRODUCT_BUILD_SYSTEM_IMAGE),) @@ -553,8 +559,15 @@ endif # Are we building a debug vendor_boot image BUILDING_DEBUG_VENDOR_BOOT_IMAGE := +# Can't build vendor_boot-debug.img if BOARD_BUILD_SYSTEM_ROOT_IMAGE is true, +# because building debug vendor_boot image requires a ramdisk. +ifeq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true) + ifeq ($(PRODUCT_BUILD_DEBUG_VENDOR_BOOT_IMAGE),true) + $(warning PRODUCT_BUILD_DEBUG_VENDOR_BOOT_IMAGE is true, but so is BOARD_BUILD_SYSTEM_ROOT_IMAGE. \ + Skip building the debug vendor_boot image.) + endif # Can't build vendor_boot-debug.img if we're not building a ramdisk. -ifndef BUILDING_RAMDISK_IMAGE +else ifndef BUILDING_RAMDISK_IMAGE ifeq ($(PRODUCT_BUILD_DEBUG_VENDOR_BOOT_IMAGE),true) $(warning PRODUCT_BUILD_DEBUG_VENDOR_BOOT_IMAGE is true, but we're not building a ramdisk image. \ Skip building the debug vendor_boot image.) @@ -591,8 +604,15 @@ endif # Are we building a debug boot image BUILDING_DEBUG_BOOT_IMAGE := +# Can't build boot-debug.img if BOARD_BUILD_SYSTEM_ROOT_IMAGE is true, +# because building debug boot image requires a ramdisk. +ifeq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true) + ifeq ($(PRODUCT_BUILD_DEBUG_BOOT_IMAGE),true) + $(warning PRODUCT_BUILD_DEBUG_BOOT_IMAGE is true, but so is BOARD_BUILD_SYSTEM_ROOT_IMAGE. \ + Skip building the debug boot image.) + endif # Can't build boot-debug.img if we're not building a ramdisk. -ifndef BUILDING_RAMDISK_IMAGE +else ifndef BUILDING_RAMDISK_IMAGE ifeq ($(PRODUCT_BUILD_DEBUG_BOOT_IMAGE),true) $(warning PRODUCT_BUILD_DEBUG_BOOT_IMAGE is true, but we're not building a ramdisk image. \ Skip building the debug boot image.) diff --git a/core/config.mk b/core/config.mk index 42ad321a06..081e3759e0 100644 --- a/core/config.mk +++ b/core/config.mk @@ -170,7 +170,6 @@ $(KATI_obsolete_var PRODUCT_SUPPORTS_BOOT_SIGNER,VB 1.0 and related variables ar $(KATI_obsolete_var PRODUCT_VERITY_SIGNING_KEY,VB 1.0 and related variables are no longer supported) $(KATI_obsolete_var BOARD_PREBUILT_PVMFWIMAGE,pvmfw.bin is now built in AOSP and custom versions are no longer supported) $(KATI_obsolete_var BUILDING_PVMFW_IMAGE,BUILDING_PVMFW_IMAGE is no longer used) -$(KATI_obsolete_var BOARD_BUILD_SYSTEM_ROOT_IMAGE) # Used to force goals to build. Only use for conditionally defined goals. .PHONY: FORCE @@ -410,6 +409,10 @@ endif # See envsetup.mk for a description of SCAN_EXCLUDE_DIRS FIND_LEAVES_EXCLUDES := $(addprefix --prune=, $(SCAN_EXCLUDE_DIRS) .repo .git) +ifneq ($(ICE_BUILD),) +include vendor/ice/target/board/BoardConfigICE.mk +endif + # The build system exposes several variables for where to find the kernel # headers: # TARGET_DEVICE_KERNEL_HEADERS is automatically created for the current @@ -941,6 +944,9 @@ ifeq ($(PRODUCT_RETROFIT_DYNAMIC_PARTITIONS),true) endif ifeq ($(PRODUCT_USE_DYNAMIC_PARTITIONS),true) + ifeq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true) + $(error BOARD_BUILD_SYSTEM_ROOT_IMAGE cannot be true for devices with dynamic partitions) + endif ifneq ($(PRODUCT_USE_DYNAMIC_PARTITION_SIZE),true) $(error PRODUCT_USE_DYNAMIC_PARTITION_SIZE must be true for devices with dynamic partitions) endif diff --git a/core/main.mk b/core/main.mk index fe537cf788..a7d128cb03 100644 --- a/core/main.mk +++ b/core/main.mk @@ -1887,28 +1887,30 @@ else ifeq ($(TARGET_BUILD_UNBUNDLED),$(TARGET_BUILD_UNBUNDLED_IMAGE)) $(INSTALLED_FILES_JSON_ROOT) \ ) - $(call dist-for-goals, droidcore-unbundled, \ - $(INSTALLED_FILES_FILE_RAMDISK) \ - $(INSTALLED_FILES_JSON_RAMDISK) \ - $(INSTALLED_FILES_FILE_DEBUG_RAMDISK) \ - $(INSTALLED_FILES_JSON_DEBUG_RAMDISK) \ - $(INSTALLED_FILES_FILE_VENDOR_RAMDISK) \ - $(INSTALLED_FILES_JSON_VENDOR_RAMDISK) \ - $(INSTALLED_FILES_FILE_VENDOR_KERNEL_RAMDISK) \ - $(INSTALLED_FILES_JSON_VENDOR_KERNEL_RAMDISK) \ - $(INSTALLED_FILES_FILE_VENDOR_DEBUG_RAMDISK) \ - $(INSTALLED_FILES_JSON_VENDOR_DEBUG_RAMDISK) \ - $(INSTALLED_DEBUG_RAMDISK_TARGET) \ - $(INSTALLED_DEBUG_BOOTIMAGE_TARGET) \ - $(INSTALLED_TEST_HARNESS_RAMDISK_TARGET) \ - $(INSTALLED_TEST_HARNESS_BOOTIMAGE_TARGET) \ - $(INSTALLED_VENDOR_DEBUG_BOOTIMAGE_TARGET) \ - $(INSTALLED_VENDOR_TEST_HARNESS_RAMDISK_TARGET) \ - $(INSTALLED_VENDOR_TEST_HARNESS_BOOTIMAGE_TARGET) \ - $(INSTALLED_VENDOR_RAMDISK_TARGET) \ - $(INSTALLED_VENDOR_DEBUG_RAMDISK_TARGET) \ - $(INSTALLED_VENDOR_KERNEL_RAMDISK_TARGET) \ - ) + ifneq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true) + $(call dist-for-goals, droidcore-unbundled, \ + $(INSTALLED_FILES_FILE_RAMDISK) \ + $(INSTALLED_FILES_JSON_RAMDISK) \ + $(INSTALLED_FILES_FILE_DEBUG_RAMDISK) \ + $(INSTALLED_FILES_JSON_DEBUG_RAMDISK) \ + $(INSTALLED_FILES_FILE_VENDOR_RAMDISK) \ + $(INSTALLED_FILES_JSON_VENDOR_RAMDISK) \ + $(INSTALLED_FILES_FILE_VENDOR_KERNEL_RAMDISK) \ + $(INSTALLED_FILES_JSON_VENDOR_KERNEL_RAMDISK) \ + $(INSTALLED_FILES_FILE_VENDOR_DEBUG_RAMDISK) \ + $(INSTALLED_FILES_JSON_VENDOR_DEBUG_RAMDISK) \ + $(INSTALLED_DEBUG_RAMDISK_TARGET) \ + $(INSTALLED_DEBUG_BOOTIMAGE_TARGET) \ + $(INSTALLED_TEST_HARNESS_RAMDISK_TARGET) \ + $(INSTALLED_TEST_HARNESS_BOOTIMAGE_TARGET) \ + $(INSTALLED_VENDOR_DEBUG_BOOTIMAGE_TARGET) \ + $(INSTALLED_VENDOR_TEST_HARNESS_RAMDISK_TARGET) \ + $(INSTALLED_VENDOR_TEST_HARNESS_BOOTIMAGE_TARGET) \ + $(INSTALLED_VENDOR_RAMDISK_TARGET) \ + $(INSTALLED_VENDOR_DEBUG_RAMDISK_TARGET) \ + $(INSTALLED_VENDOR_KERNEL_RAMDISK_TARGET) \ + ) + endif ifeq ($(PRODUCT_EXPORT_BOOT_IMAGE_TO_DIST),true) $(call dist-for-goals, droidcore-unbundled, $(INSTALLED_BOOTIMAGE_TARGET)) diff --git a/core/product.mk b/core/product.mk index 5b04ebb011..5b64b7e0e2 100644 --- a/core/product.mk +++ b/core/product.mk @@ -22,6 +22,9 @@ _product_single_value_vars := # Variables that are lists of values. _product_list_vars := +# Add support to override build.prop values +_product_list_vars += PRODUCT_BUILD_PROP_OVERRIDES + _product_single_value_vars += PRODUCT_NAME _product_single_value_vars += PRODUCT_MODEL _product_single_value_vars += PRODUCT_NAME_FOR_ATTESTATION @@ -516,9 +519,11 @@ _readonly_late_variables := \ # Modified internally in the build system _readonly_late_variables += \ + PRODUCT_CFI_INCLUDE_PATHS \ PRODUCT_COPY_FILES \ PRODUCT_DEX_PREOPT_NEVER_ALLOW_STRIPPING \ PRODUCT_DEX_PREOPT_BOOT_FLAGS \ + PRODUCT_SOONG_NAMESPACES _readonly_early_variables := $(filter-out $(_readonly_late_variables),$(_product_var_list)) diff --git a/core/sysprop.mk b/core/sysprop.mk index dc53b3c01e..2e0bfc9a9f 100644 --- a/core/sysprop.mk +++ b/core/sysprop.mk @@ -30,6 +30,8 @@ POST_PROCESS_PROPS := $(HOST_OUT_EXECUTABLES)/post_process_props$(HOST_EXECUTABL # $(1): Partition name # $(2): Output file name define generate-common-build-props + bash -c '\ + $(or $(PRODUCT_BUILD_PROP_OVERRIDES),:);\ echo "####################################" >> $(2);\ echo "# from generate-common-build-props" >> $(2);\ echo "# These properties identify this partition image." >> $(2);\ @@ -42,10 +44,10 @@ define generate-common-build-props echo "ro.product.$(1).name=$(PRODUCT_SYSTEM_NAME)" >> $(2);\ ,\ echo "ro.product.$(1).brand=$(PRODUCT_BRAND)" >> $(2);\ - echo "ro.product.$(1).device=$(TARGET_DEVICE)" >> $(2);\ + echo "ro.product.$(1).device=$${TARGET_DEVICE:-$(TARGET_DEVICE)}" >> $(2);\ echo "ro.product.$(1).manufacturer=$(PRODUCT_MANUFACTURER)" >> $(2);\ - echo "ro.product.$(1).model=$(PRODUCT_MODEL)" >> $(2);\ - echo "ro.product.$(1).name=$(TARGET_PRODUCT)" >> $(2);\ + echo "ro.product.$(1).model=$${PRODUCT_MODEL:-$(PRODUCT_MODEL)}" >> $(2);\ + echo "ro.product.$(1).name=$${TARGET_PRODUCT:-$(TARGET_PRODUCT)}" >> $(2);\ # Attestation specific properties for AOSP/GSI build running on device. echo "ro.product.model_for_attestation=$(PRODUCT_MODEL_FOR_ATTESTATION)" >> $(2);\ echo "ro.product.brand_for_attestation=$(PRODUCT_BRAND_FOR_ATTESTATION)" >> $(2);\ @@ -74,6 +76,7 @@ define generate-common-build-props echo "ro.$(1).build.version.release=$(PLATFORM_VERSION_LAST_STABLE)" >> $(2);\ echo "ro.$(1).build.version.release_or_codename=$(PLATFORM_VERSION)" >> $(2);\ echo "ro.$(1).build.version.sdk=$(PLATFORM_SDK_VERSION)" >> $(2);\ + ';\ endef @@ -163,7 +166,7 @@ endif ifeq ($(DEFAULT_SYSTEM_DEV_CERTIFICATE),build/make/target/product/security/testkey) BUILD_KEYS := test-keys else -BUILD_KEYS := dev-keys +BUILD_KEYS := release-keys endif BUILD_VERSION_TAGS += $(BUILD_KEYS) BUILD_VERSION_TAGS := $(subst $(space),$(comma),$(sort $(BUILD_VERSION_TAGS))) @@ -248,6 +251,7 @@ $(gen_from_buildinfo_sh): $(INTERNAL_BUILD_ID_MAKEFILE) $(API_FINGERPRINT) | $(B $(hide) TARGET_BUILD_TYPE="$(TARGET_BUILD_VARIANT)" \ TARGET_BUILD_FLAVOR="$(TARGET_BUILD_FLAVOR)" \ TARGET_DEVICE="$(TARGET_DEVICE)" \ + ICE_DEVICE="$(TARGET_DEVICE)" \ PRODUCT_DEFAULT_LOCALE="$(call get-default-product-locale,$(PRODUCT_LOCALES))" \ PRODUCT_DEFAULT_WIFI_CHANNELS="$(PRODUCT_DEFAULT_WIFI_CHANNELS)" \ BUILD_ID="$(BUILD_ID)" \ @@ -257,6 +261,7 @@ $(gen_from_buildinfo_sh): $(INTERNAL_BUILD_ID_MAKEFILE) $(API_FINGERPRINT) | $(B BUILD_USERNAME="$(BUILD_USERNAME)" \ BUILD_HOSTNAME="$(BUILD_HOSTNAME)" \ BUILD_NUMBER="$(BUILD_NUMBER_FROM_FILE)" \ + BOARD_BUILD_SYSTEM_ROOT_IMAGE="$(BOARD_BUILD_SYSTEM_ROOT_IMAGE)" \ BOARD_USE_VBMETA_DIGTEST_IN_FINGERPRINT="$(BOARD_USE_VBMETA_DIGTEST_IN_FINGERPRINT)" \ PLATFORM_VERSION="$(PLATFORM_VERSION)" \ PLATFORM_DISPLAY_VERSION="$(PLATFORM_DISPLAY_VERSION)" \ @@ -271,6 +276,7 @@ $(gen_from_buildinfo_sh): $(INTERNAL_BUILD_ID_MAKEFILE) $(API_FINGERPRINT) | $(B PLATFORM_VERSION_KNOWN_CODENAMES="$(PLATFORM_VERSION_KNOWN_CODENAMES)" \ PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION="$(PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION)" \ BUILD_VERSION_TAGS="$(BUILD_VERSION_TAGS)" \ + BUILD_FINGERPRINT="$(BUILD_FINGERPRINT_FROM_FILE)" \ $(if $(OEM_THUMBPRINT_PROPERTIES),BUILD_THUMBPRINT="$(BUILD_THUMBPRINT_FROM_FILE)") \ TARGET_CPU_ABI_LIST="$(TARGET_CPU_ABI_LIST)" \ TARGET_CPU_ABI_LIST_32_BIT="$(TARGET_CPU_ABI_LIST_32_BIT)" \ @@ -278,6 +284,7 @@ $(gen_from_buildinfo_sh): $(INTERNAL_BUILD_ID_MAKEFILE) $(API_FINGERPRINT) | $(B TARGET_CPU_ABI="$(TARGET_CPU_ABI)" \ TARGET_CPU_ABI2="$(TARGET_CPU_ABI2)" \ ZYGOTE_FORCE_64_BIT="$(ZYGOTE_FORCE_64_BIT)" \ + $(PRODUCT_BUILD_PROP_OVERRIDES) \ bash $(BUILDINFO_SH) > $@ ifdef TARGET_SYSTEM_PROP diff --git a/core/tasks/platform_availability_check.mk b/core/tasks/platform_availability_check.mk index 1524758944..4a8906186d 100644 --- a/core/tasks/platform_availability_check.mk +++ b/core/tasks/platform_availability_check.mk @@ -25,9 +25,10 @@ ifeq (,$(TARGET_BUILD_UNBUNDLED)) _modules_not_available_for_platform := \ $(strip $(foreach m,$(product_MODULES),\ $(if $(filter-out FAKE,$(ALL_MODULES.$(m).CLASS)),\ - $(if $(ALL_MODULES.$(m).INSTALLED),\ - $(if $(filter true,$(ALL_MODULES.$(m).NOT_AVAILABLE_FOR_PLATFORM)),\ - $(m)))))) + $(if $(filter-out packages/modules/Bluetooth/android/app,$(ALL_MODULES.$(m).PATH)),\ + $(if $(ALL_MODULES.$(m).INSTALLED),\ + $(if $(filter true,$(ALL_MODULES.$(m).NOT_AVAILABLE_FOR_PLATFORM)),\ + $(m))))))) ifndef ALLOW_MISSING_DEPENDENCIES _violators_with_path := $(foreach m,$(sort $(_modules_not_available_for_platform)),\ diff --git a/envsetup.sh b/envsetup.sh index ae8d331148..94779a7a34 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -101,6 +101,12 @@ Invoke ". build/envsetup.sh" from your shell to add the following functions to y - refreshmod: Refresh list of modules for allmod/gomod/pathmod/outmod/installmod. - syswrite: Remount partitions (e.g. system.img) as writable, rebooting if necessary. +EOF + + __print_ice_functions_help + +cat <<EOF + Environment options: - SANITIZE_HOST: Set to 'address' to use ASAN for all host modules. - ANDROID_QUIET_BUILD: set to 'true' to display only the essential messages. @@ -110,7 +116,7 @@ EOF local T=$(gettop) local A="" local i - for i in `cat $T/build/envsetup.sh | sed -n "/^[[:blank:]]*function /s/function \([a-z_]*\).*/\1/p" | sort | uniq`; do + for i in `cat $T/build/envsetup.sh $T/vendor/ice/build/envsetup.sh | sed -n "/^[[:blank:]]*function /s/function \([a-z_]*\).*/\1/p" | sort | uniq`; do A="$A $i" done echo $A @@ -121,8 +127,8 @@ function build_build_var_cache() { local T=$(gettop) # Grep out the variable names from the script. - cached_vars=(`cat $T/build/envsetup.sh | tr '()' ' ' | awk '{for(i=1;i<=NF;i++) if($i~/get_build_var/) print $(i+1)}' | sort -u | tr '\n' ' '`) - cached_abs_vars=(`cat $T/build/envsetup.sh | tr '()' ' ' | awk '{for(i=1;i<=NF;i++) if($i~/get_abs_build_var/) print $(i+1)}' | sort -u | tr '\n' ' '`) + cached_vars=(`cat $T/build/envsetup.sh $T/vendor/ice/build/envsetup.sh | tr '()' ' ' | awk '{for(i=1;i<=NF;i++) if($i~/get_build_var/) print $(i+1)}' | sort -u | tr '\n' ' '`) + cached_abs_vars=(`cat $T/build/envsetup.sh $T/vendor/ice/build/envsetup.sh | tr '()' ' ' | awk '{for(i=1;i<=NF;i++) if($i~/get_abs_build_var/) print $(i+1)}' | sort -u | tr '\n' ' '`) # Call the build system to dump the "<val>=<value>" pairs as a shell script. build_dicts_script=`\builtin cd $T; build/soong/soong_ui.bash --dumpvars-mode \ --vars="${cached_vars[*]}" \ @@ -204,6 +210,13 @@ function check_product() echo "Couldn't locate the top of the tree. Try setting TOP." >&2 return fi + if (echo -n $1 | grep -q -e "^ice_") ; then + ICE_BUILD=$(echo -n $1 | sed -e 's/^ice_//g') + else + ICE_BUILD= + fi + export ICE_BUILD + TARGET_PRODUCT=$1 \ TARGET_BUILD_VARIANT= \ TARGET_BUILD_TYPE= \ @@ -411,8 +424,6 @@ function set_stuff_for_environment() { set_lunch_paths set_sequence_number - - export ANDROID_BUILD_TOP=$(gettop) } function set_sequence_number() @@ -821,6 +832,21 @@ function lunch() return 1 fi + if ! check_product $product + then + # if we can't find a product, try to grab it off our GitHub + T=$(gettop) + cd $T > /dev/null + vendor/ice/build/tools/roomservice.py $product + cd - > /dev/null + check_product $product + else + T=$(gettop) + cd $T > /dev/null + vendor/ice/build/tools/roomservice.py $product true + cd - > /dev/null + fi + TARGET_PRODUCT=$product \ TARGET_BUILD_VARIANT=$variant \ TARGET_PLATFORM_VERSION=$version \ @@ -831,6 +857,15 @@ function lunch() then echo "Did you mean -${product/*_/}? (dash instead of underscore)" fi + echo + echo "** Don't have a product spec for: '$product'" + echo "** Do you have the right repo manifest?" + product= + fi + + if [ -z "$product" -o -z "$variant" ] + then + echo return 1 fi export TARGET_PRODUCT=$(get_build_var TARGET_PRODUCT) @@ -2149,3 +2184,6 @@ set_global_paths source_vendorsetup addcompletions +export ANDROID_BUILD_TOP=$(gettop) + +. $ANDROID_BUILD_TOP/vendor/ice/build/envsetup.sh diff --git a/target/product/full_base.mk b/target/product/full_base.mk index 39c66da318..dfd63e3a0b 100644 --- a/target/product/full_base.mk +++ b/target/product/full_base.mk @@ -36,16 +36,18 @@ PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \ netutils-wrapper-1.0 +ifeq ($(ICE_BUILD),) # Additional settings used in all AOSP builds PRODUCT_VENDOR_PROPERTIES := \ ro.config.ringtone?=Ring_Synth_04.ogg \ ro.config.notification_sound?=pixiedust.ogg -# Put en_US first in the list, so make it default. -PRODUCT_LOCALES := en_US - # Get some sounds $(call inherit-product-if-exists, frameworks/base/data/sounds/AllAudio.mk) +endif + +# Put en_US first in the list, so make it default. +PRODUCT_LOCALES := en_US # Get a list of languages. $(call inherit-product, $(SRC_TARGET_DIR)/product/languages_full.mk) diff --git a/target/product/full_base_telephony.mk b/target/product/full_base_telephony.mk index d8a54cd7f3..417aa014a7 100644 --- a/target/product/full_base_telephony.mk +++ b/target/product/full_base_telephony.mk @@ -20,12 +20,18 @@ # entirely appropriate to inherit from for on-device configurations. PRODUCT_VENDOR_PROPERTIES := \ - keyguard.no_require_sim?=true \ - ro.com.android.dataroaming?=true + keyguard.no_require_sim?=true PRODUCT_COPY_FILES := \ - device/sample/etc/apns-full-conf.xml:system/etc/apns-conf.xml \ frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml +ifeq ($(ICE_BUILD),) +PRODUCT_VENDOR_PROPERTIES += \ + ro.com.android.dataroaming?=true + +PRODUCT_COPY_FILES += \ + device/sample/etc/apns-full-conf.xml:system/etc/apns-conf.xml +endif + $(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base.mk) $(call inherit-product, $(SRC_TARGET_DIR)/product/telephony.mk) diff --git a/target/product/handheld_product.mk b/target/product/handheld_product.mk index 8755ae6de4..e284d7d19e 100644 --- a/target/product/handheld_product.mk +++ b/target/product/handheld_product.mk @@ -24,7 +24,6 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/media_product.mk) PRODUCT_PACKAGES += \ Browser2 \ Calendar \ - Camera2 \ Contacts \ DeskClock \ Gallery2 \ @@ -35,5 +34,10 @@ PRODUCT_PACKAGES += \ SettingsIntelligence \ frameworks-base-overlays +ifeq ($(ICE_BUILD),) +PRODUCT_PACKAGES += \ + Camera2 +endif + PRODUCT_PACKAGES_DEBUG += \ frameworks-base-overlays-debug diff --git a/target/product/virtual_ab_ota/launch.mk b/target/product/virtual_ab_ota/launch.mk index e4c45758ba..9241a17875 100644 --- a/target/product/virtual_ab_ota/launch.mk +++ b/target/product/virtual_ab_ota/launch.mk @@ -18,4 +18,13 @@ PRODUCT_VIRTUAL_AB_OTA := true PRODUCT_VENDOR_PROPERTIES += ro.virtual_ab.enabled=true -PRODUCT_PACKAGES += e2fsck_ramdisk +PRODUCT_PACKAGES += \ + e2fsck_ramdisk \ + resize2fs_ramdisk \ + tune2fs_ramdisk + +# For dedicated recovery partitions, we need to include fs tools +PRODUCT_PACKAGES += \ + e2fsck.recovery \ + resize2fs.recovery \ + tune2fs.recovery diff --git a/target/product/virtual_ab_ota/launch_with_vendor_ramdisk.mk b/target/product/virtual_ab_ota/launch_with_vendor_ramdisk.mk index de1f07d8cb..b79340e06b 100644 --- a/target/product/virtual_ab_ota/launch_with_vendor_ramdisk.mk +++ b/target/product/virtual_ab_ota/launch_with_vendor_ramdisk.mk @@ -25,3 +25,5 @@ PRODUCT_PACKAGES += \ linker.vendor_ramdisk \ e2fsck.vendor_ramdisk \ fsck.f2fs.vendor_ramdisk \ + resize2fs.vendor_ramdisk \ + tune2fs.vendor_ramdisk diff --git a/tools/buildinfo.sh b/tools/buildinfo.sh index 35c9a0e91e..e316212f78 100755 --- a/tools/buildinfo.sh +++ b/tools/buildinfo.sh @@ -33,6 +33,9 @@ echo "ro.build.user=$BUILD_USERNAME" echo "ro.build.host=$BUILD_HOSTNAME" echo "ro.build.tags=$BUILD_VERSION_TAGS" echo "ro.build.flavor=$TARGET_BUILD_FLAVOR" +if [ -n "$BOARD_BUILD_SYSTEM_ROOT_IMAGE" ] ; then + echo "ro.build.system_root_image=$BOARD_BUILD_SYSTEM_ROOT_IMAGE" +fi # These values are deprecated, use "ro.product.cpu.abilist" # instead (see below). @@ -48,9 +51,12 @@ if [ -n "$PRODUCT_DEFAULT_LOCALE" ] ; then fi echo "ro.wifi.channels=$PRODUCT_DEFAULT_WIFI_CHANNELS" -echo "# Do not try to parse thumbprint" +echo "# Do not try to parse fingerprint or thumbprint" +echo "ro.build.fingerprint=$BUILD_FINGERPRINT" if [ -n "$BUILD_THUMBPRINT" ] ; then echo "ro.build.thumbprint=$BUILD_THUMBPRINT" fi +echo "ro.ice.device=$ICE_DEVICE" + echo "# end build properties" diff --git a/tools/post_process_props.py b/tools/post_process_props.py index 31a460d008..92e671201f 100755 --- a/tools/post_process_props.py +++ b/tools/post_process_props.py @@ -28,9 +28,9 @@ PROP_VALUE_MAX = 91 # Put the modifications that you need to make into the */build.prop into this # function. def mangle_build_prop(prop_list): - # If ro.debuggable is 1, then enable adb on USB by default - # (this is for userdebug builds) - if prop_list.get_value("ro.debuggable") == "1": + # If ro.adb.secure is 0, then enable adb on USB by default + # (this is for eng builds) + if prop_list.get_value("ro.adb.secure") == "0": val = prop_list.get_value("persist.sys.usb.config") if "adb" not in val: if val == "": diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py index 119999e018..6266371b3b 100644 --- a/tools/releasetools/common.py +++ b/tools/releasetools/common.py @@ -433,7 +433,7 @@ class BuildInfo(object): "system_other"] = self._partition_fingerprints["system"] # These two should be computed only after setting self._oem_props. - self._device = self.GetOemProperty("ro.product.device") + self._device = info_dict.get("ota_override_device", self.GetOemProperty("ro.product.device")) self._fingerprint = self.CalculateFingerprint() check_fingerprint(self._fingerprint) @@ -654,7 +654,7 @@ class BuildInfo(object): return self.GetBuildProp(key) def GetPartitionFingerprint(self, partition): - return self._partition_fingerprints.get(partition, None) + return self._partition_fingerprints.get(partition, self.CalculateFingerprint()) def CalculatePartitionFingerprint(self, partition): try: @@ -1210,9 +1210,10 @@ def LoadRecoveryFSTab(read_helper, fstab_version, recovery_fstab_path, context = i mount_point = pieces[1] - d[mount_point] = Partition(mount_point=mount_point, fs_type=pieces[2], - device=pieces[0], length=length, context=context, - slotselect=slotselect) + if not d.get(mount_point): + d[mount_point] = Partition(mount_point=mount_point, fs_type=pieces[2], + device=pieces[0], length=length, context=context, + slotselect=slotselect) # / is used for the system mount point when the root directory is included in # system. Other areas assume system is always at "/system" so point /system @@ -3774,12 +3775,10 @@ def MakeRecoveryPatch(input_dir, output_sink, recovery_img, boot_img, # In this case, the output sink is rooted at VENDOR recovery_img_path = "etc/recovery.img" recovery_resource_dat_path = "VENDOR/etc/recovery-resource.dat" - sh_dir = "bin" else: # In this case the output sink is rooted at SYSTEM recovery_img_path = "vendor/etc/recovery.img" recovery_resource_dat_path = "SYSTEM/vendor/etc/recovery-resource.dat" - sh_dir = "vendor/bin" if full_recovery_image: output_sink(recovery_img_path, recovery_img.data) @@ -3864,11 +3863,7 @@ fi # The install script location moved from /system/etc to /system/bin in the L # release. In the R release it is in VENDOR/bin or SYSTEM/vendor/bin. - sh_location = os.path.join(sh_dir, "install-recovery.sh") - - logger.info("putting script in %s", sh_location) - - output_sink(sh_location, sh.encode()) + output_sink("bin/install-recovery.sh", sh.encode()) class DynamicPartitionUpdate(object): diff --git a/tools/releasetools/edify_generator.py b/tools/releasetools/edify_generator.py index 033c02e60c..f8247ee196 100644 --- a/tools/releasetools/edify_generator.py +++ b/tools/releasetools/edify_generator.py @@ -137,11 +137,13 @@ class EdifyGenerator(object): def AssertDevice(self, device): """Assert that the device identifier is the given string.""" - cmd = ('getprop("ro.product.device") == "%s" || ' - 'abort("E%d: This package is for \\"%s\\" devices; ' - 'this is a \\"" + getprop("ro.product.device") + "\\".");') % ( - device, common.ErrorCode.DEVICE_MISMATCH, device) - self.script.append(cmd) + cmd = ('assert(' + + ' || \0'.join(['getprop("ro.product.device") == "%s" || getprop("ro.build.product") == "%s"' + % (i, i) for i in device.split(",")]) + + ' || abort("E%d: This package is for device: %s; ' + + 'this device is " + getprop("ro.product.device") + ".");' + + ');') % (common.ErrorCode.DEVICE_MISMATCH, device) + self.script.append(self.WordWrap(cmd)) def AssertSomeBootloader(self, *bootloaders): """Asert that the bootloader version is one of *bootloaders.""" diff --git a/tools/releasetools/make_recovery_patch.py b/tools/releasetools/make_recovery_patch.py index 1497d69ed7..b52289b8a2 100644 --- a/tools/releasetools/make_recovery_patch.py +++ b/tools/releasetools/make_recovery_patch.py @@ -49,13 +49,19 @@ def main(argv): board_uses_vendorimage = OPTIONS.info_dict.get( "board_uses_vendorimage") == "true" + board_builds_vendorimage = OPTIONS.info_dict.get( + "board_builds_vendorimage") == "true" + target_files_dir = None - if board_uses_vendorimage: + if board_builds_vendorimage: target_files_dir = "VENDOR" - else: - target_files_dir = "SYSTEM" + elif not board_uses_vendorimage: + target_files_dir = "SYSTEM/vendor" def output_sink(fn, data): + if target_files_dir is None: + return + with open(os.path.join(output_dir, target_files_dir, *fn.split("/")), "wb") as f: f.write(data) diff --git a/tools/releasetools/non_ab_ota.py b/tools/releasetools/non_ab_ota.py index c4fd809447..ae1acb7383 100644 --- a/tools/releasetools/non_ab_ota.py +++ b/tools/releasetools/non_ab_ota.py @@ -663,12 +663,17 @@ def _WriteRecoveryImageToBoot(script, output_zip): def HasRecoveryPatch(target_files_zip, info_dict): board_uses_vendorimage = info_dict.get("board_uses_vendorimage") == "true" + board_builds_vendorimage = info_dict.get("board_builds_vendorimage") == "true" + target_files_dir = None - if board_uses_vendorimage: + if board_builds_vendorimage: target_files_dir = "VENDOR" - else: + elif not board_uses_vendorimage: target_files_dir = "SYSTEM/vendor" + if target_files_dir is None: + return True + patch = "%s/recovery-from-boot.p" % target_files_dir img = "%s/etc/recovery.img" % target_files_dir diff --git a/tools/releasetools/ota_from_target_files.py b/tools/releasetools/ota_from_target_files.py index 1a4a895a6b..b55760cb47 100755 --- a/tools/releasetools/ota_from_target_files.py +++ b/tools/releasetools/ota_from_target_files.py @@ -706,7 +706,7 @@ def GetTargetFilesZipForRetrofitDynamicPartitions(input_file, os.rename(source_path, target_path) # Write new ab_partitions.txt file - new_ab_partitions = os.paht.join(input_file, AB_PARTITIONS) + new_ab_partitions = os.path.join(input_file, AB_PARTITIONS) with open(new_ab_partitions, 'w') as f: for partition in ab_partitions: if (partition in dynamic_partition_list and diff --git a/tools/releasetools/ota_utils.py b/tools/releasetools/ota_utils.py index fa9516edcb..03f7660c01 100644 --- a/tools/releasetools/ota_utils.py +++ b/tools/releasetools/ota_utils.py @@ -221,8 +221,12 @@ def UpdateDeviceState(device_state, build_info, boot_variable_values, # TODO(xunchang) set the boot image's version with kmi. Note the boot # image doesn't have a file map. - partition_state.version = build_info.GetPartitionBuildProp( - 'ro.build.date.utc', partition) + try: + partition_state.version = build_info.GetPartitionBuildProp( + 'ro.build.date.utc', partition) + except common.ExternalError: + partition_state.version = build_info.GetPartitionBuildProp( + 'ro.build.date.utc', 'system') # TODO(xunchang), we can save a call to ComputeRuntimeBuildInfos. build_devices, build_fingerprints = \ diff --git a/tools/releasetools/sign_target_files_apks.py b/tools/releasetools/sign_target_files_apks.py index 8291448249..c3205955fd 100755 --- a/tools/releasetools/sign_target_files_apks.py +++ b/tools/releasetools/sign_target_files_apks.py @@ -1087,6 +1087,8 @@ def BuildKeyMap(misc_info, key_mapping_options): devkeydir + "/shared": d + "/shared", devkeydir + "/platform": d + "/platform", devkeydir + "/networkstack": d + "/networkstack", + devkeydir + "/sdk_sandbox" : d + "/sdk_sandbox", + devkeydir + "/bluetooth" : d + "/bluetooth", }) else: OPTIONS.key_map[s] = d |