diff options
-rw-r--r-- | core/Makefile | 10 | ||||
-rw-r--r-- | core/board_config.mk | 1 | ||||
-rw-r--r-- | core/config.mk | 8 | ||||
-rw-r--r-- | core/envsetup.mk | 2 | ||||
-rw-r--r-- | core/product.mk | 5 | ||||
-rw-r--r-- | core/soong_config.mk | 5 | ||||
-rw-r--r-- | core/sysprop.mk | 14 | ||||
-rw-r--r-- | envsetup.sh | 48 | ||||
-rw-r--r-- | target/product/cfi-common.mk | 1 | ||||
-rw-r--r-- | target/product/full_base.mk | 8 | ||||
-rw-r--r-- | target/product/full_base_telephony.mk | 6 | ||||
-rw-r--r-- | target/product/generic_ramdisk.mk | 3 | ||||
-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 | 5 | ||||
-rwxr-xr-x | tools/post_process_props.py | 6 | ||||
-rw-r--r-- | tools/releasetools/common.py | 10 | ||||
-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 |
21 files changed, 138 insertions, 46 deletions
diff --git a/core/Makefile b/core/Makefile index 8e4805d476..2d36ee13a6 100644 --- a/core/Makefile +++ b/core/Makefile @@ -5264,6 +5264,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 @@ -5403,6 +5406,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)) @@ -5614,6 +5620,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 diff --git a/core/board_config.mk b/core/board_config.mk index dc50a689ad..a7cb809ff0 100644 --- a/core/board_config.mk +++ b/core/board_config.mk @@ -207,6 +207,7 @@ endif # ############################################################### $(foreach v,$(_build_broken_var_list),$(eval $(v) :=)) BUILD_BROKEN_NINJA_USES_ENV_VARS := +BUILD_BROKEN_USES_BUILD_COPY_HEADERS := true # Boards may be defined under $(SRC_TARGET_DIR)/board/$(TARGET_DEVICE) # or under vendor/*/$(TARGET_DEVICE). Search in both places, but diff --git a/core/config.mk b/core/config.mk index 3bfd90e54a..c02e561185 100644 --- a/core/config.mk +++ b/core/config.mk @@ -158,8 +158,8 @@ $(KATI_obsolete_var COVERAGE_PATHS,Use NATIVE_COVERAGE_PATHS instead) $(KATI_obsolete_var COVERAGE_EXCLUDE_PATHS,Use NATIVE_COVERAGE_EXCLUDE_PATHS instead) $(KATI_obsolete_var BOARD_VNDK_RUNTIME_DISABLE,VNDK-Lite is no longer supported) $(KATI_obsolete_var LOCAL_SANITIZE_BLACKLIST,Use LOCAL_SANITIZE_BLOCKLIST instead) -$(KATI_deprecated_var BOARD_PLAT_PUBLIC_SEPOLICY_DIR,Use SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS instead) -$(KATI_deprecated_var BOARD_PLAT_PRIVATE_SEPOLICY_DIR,Use SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS instead) +$(KATI_obsolete_var BOARD_PLAT_PUBLIC_SEPOLICY_DIR,Use SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS instead) +$(KATI_obsolete_var BOARD_PLAT_PRIVATE_SEPOLICY_DIR,Use SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS instead) $(KATI_obsolete_var TARGET_NO_VENDOR_BOOT,Use PRODUCT_BUILD_VENDOR_BOOT_IMAGE instead) $(KATI_obsolete_var PRODUCT_CHECK_ELF_FILES,Use BUILD_BROKEN_PREBUILT_ELF_FILES instead) $(KATI_obsolete_var ALL_GENERATED_SOURCES,ALL_GENERATED_SOURCES is no longer used) @@ -359,6 +359,10 @@ include $(BUILD_SYSTEM)/envsetup.mk # 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 diff --git a/core/envsetup.mk b/core/envsetup.mk index c32d380b0b..d116aaf164 100644 --- a/core/envsetup.mk +++ b/core/envsetup.mk @@ -326,8 +326,6 @@ endif # raw ones. define dump-variables-rbc $(eval _dump_variables_rbc_excluded := \ - BOARD_PLAT_PRIVATE_SEPOLICY_DIR \ - BOARD_PLAT_PUBLIC_SEPOLICY_DIR \ BUILD_NUMBER \ DATE \ LOCAL_PATH \ diff --git a/core/product.mk b/core/product.mk index de190c30eb..277d2402ac 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 @@ -487,9 +490,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/soong_config.mk b/core/soong_config.mk index 14976ea528..0860c2711e 100644 --- a/core/soong_config.mk +++ b/core/soong_config.mk @@ -223,9 +223,8 @@ $(call add_json_list, BoardOdmSepolicyDirs, $(BOARD_ODM_SEPOLICY_DI $(call add_json_list, BoardVendorDlkmSepolicyDirs, $(BOARD_VENDOR_DLKM_SEPOLICY_DIRS)) $(call add_json_list, BoardOdmDlkmSepolicyDirs, $(BOARD_ODM_DLKM_SEPOLICY_DIRS)) $(call add_json_list, BoardSystemDlkmSepolicyDirs, $(BOARD_SYSTEM_DLKM_SEPOLICY_DIRS)) -# TODO: BOARD_PLAT_* dirs only kept for compatibility reasons. Will be a hard error on API level 31 -$(call add_json_list, SystemExtPublicSepolicyDirs, $(SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS) $(BOARD_PLAT_PUBLIC_SEPOLICY_DIR)) -$(call add_json_list, SystemExtPrivateSepolicyDirs, $(SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS) $(BOARD_PLAT_PRIVATE_SEPOLICY_DIR)) +$(call add_json_list, SystemExtPublicSepolicyDirs, $(SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS)) +$(call add_json_list, SystemExtPrivateSepolicyDirs, $(SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS)) $(call add_json_list, BoardSepolicyM4Defs, $(BOARD_SEPOLICY_M4DEFS)) $(call add_json_str, BoardSepolicyVers, $(BOARD_SEPOLICY_VERS)) $(call add_json_str, SystemExtSepolicyPrebuiltApiDir, $(BOARD_SYSTEM_EXT_PREBUILT_DIR)) diff --git a/core/sysprop.mk b/core/sysprop.mk index 91e5cf8cf7..af5fd15627 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);\ )\ $(if $(filter true,$(ZYGOTE_FORCE_64)),\ $(if $(filter vendor,$(1)),\ @@ -70,6 +72,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 @@ -159,7 +162,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))) @@ -244,6 +247,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)" \ @@ -268,6 +272,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)" \ @@ -275,6 +280,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/envsetup.sh b/envsetup.sh index e185ab16eb..f2cae65188 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -44,6 +44,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. @@ -53,7 +59,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 @@ -64,8 +70,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[*]}" \ @@ -147,6 +153,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= \ @@ -359,7 +372,6 @@ function set_stuff_for_environment() setpaths set_sequence_number - export ANDROID_BUILD_TOP=$(gettop) # With this environment variable new GCC can apply colors to warnings/errors export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' } @@ -755,6 +767,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 \ @@ -765,6 +792,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) @@ -2027,3 +2063,7 @@ function showcommands() { validate_current_shell source_vendorsetup addcompletions + +export ANDROID_BUILD_TOP=$(gettop) + +. $ANDROID_BUILD_TOP/vendor/ice/build/envsetup.sh diff --git a/target/product/cfi-common.mk b/target/product/cfi-common.mk index 559963cd7f..e62185224c 100644 --- a/target/product/cfi-common.mk +++ b/target/product/cfi-common.mk @@ -31,6 +31,7 @@ PRODUCT_CFI_INCLUDE_PATHS := \ hardware/qcom/wlan/qcwcn/wpa_supplicant_8_lib \ hardware/qcom/wlan/legacy/qcwcn/wpa_supplicant_8_lib \ hardware/qcom/wlan/wcn6740/qcwcn/wpa_supplicant_8_lib \ + hardware/qcom/wlan/qcwcn/wpa_supplicant_8_lib \ hardware/interfaces/keymaster \ hardware/interfaces/security \ packages/modules/Bluetooth/system \ 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..b531ded8e7 100644 --- a/target/product/full_base_telephony.mk +++ b/target/product/full_base_telephony.mk @@ -24,8 +24,12 @@ PRODUCT_VENDOR_PROPERTIES := \ ro.com.android.dataroaming?=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_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/generic_ramdisk.mk b/target/product/generic_ramdisk.mk index fb0370e923..60fe0ce94e 100644 --- a/target/product/generic_ramdisk.mk +++ b/target/product/generic_ramdisk.mk @@ -22,9 +22,6 @@ # Ramdisk PRODUCT_PACKAGES += \ init_first_stage \ - e2fsck.ramdisk \ - fsck.f2fs.ramdisk \ - tune2fs.ramdisk \ snapuserd.ramdisk \ # Debug ramdisk diff --git a/target/product/handheld_product.mk b/target/product/handheld_product.mk index 2199c570a0..6b7fa86d20 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 \ @@ -36,5 +35,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 efe7355ea8..e316212f78 100755 --- a/tools/buildinfo.sh +++ b/tools/buildinfo.sh @@ -51,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 38d17a81db..c0f8ea49a1 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 fdb2e52341..7ef8d6e1f5 100644 --- a/tools/releasetools/common.py +++ b/tools/releasetools/common.py @@ -430,7 +430,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) @@ -3564,12 +3564,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) @@ -3652,11 +3650,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 9732cdaa69..a887925c46 100644 --- a/tools/releasetools/non_ab_ota.py +++ b/tools/releasetools/non_ab_ota.py @@ -671,12 +671,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 |