diff options
-rw-r--r-- | Changes.md | 10 | ||||
-rw-r--r-- | CleanSpec.mk | 3 | ||||
-rw-r--r-- | OWNERS | 3 | ||||
-rw-r--r-- | core/Makefile | 2 | ||||
-rw-r--r-- | core/combo/HOST_linux-x86.mk | 2 | ||||
-rw-r--r-- | core/config.mk | 1 | ||||
-rw-r--r-- | core/dex_preopt_config.mk | 5 | ||||
-rw-r--r-- | core/dex_preopt_libart_boot.mk | 1 | ||||
-rw-r--r-- | core/jacoco.mk | 2 | ||||
-rw-r--r-- | core/main.mk | 6 | ||||
-rw-r--r-- | core/python_binary_host_test_config_template.xml | 21 | ||||
-rw-r--r-- | core/soong_config.mk | 3 | ||||
-rw-r--r-- | envsetup.sh | 2 | ||||
-rw-r--r-- | target/product/base_system.mk | 1 | ||||
-rw-r--r-- | target/product/gsi/current.txt | 1 | ||||
-rw-r--r-- | target/product/runtime_libart.mk | 4 | ||||
-rw-r--r-- | target/product/telephony_system.mk | 2 | ||||
-rw-r--r-- | tools/releasetools/OWNERS | 1 | ||||
-rwxr-xr-x | tools/releasetools/add_img_to_target_files.py | 53 | ||||
-rwxr-xr-x | tools/releasetools/sign_target_files_apks.py | 4 |
20 files changed, 85 insertions, 42 deletions
diff --git a/Changes.md b/Changes.md index 2d5cd9766..1ed6bf81d 100644 --- a/Changes.md +++ b/Changes.md | |||
@@ -1,5 +1,15 @@ | |||
1 | # Build System Changes for Android.mk Writers | 1 | # Build System Changes for Android.mk Writers |
2 | 2 | ||
3 | ## `USER` deprecation {#USER} | ||
4 | |||
5 | `USER` will soon be `nobody` in many cases due to the addition of a sandbox | ||
6 | around the Android build. Most of the time you shouldn't need to know the | ||
7 | identity of the user running the build, but if you do, it's available in the | ||
8 | make variable `BUILD_USERNAME` for now. | ||
9 | |||
10 | Similarly, the `hostname` tool will also be returning a more consistent value | ||
11 | of `android-build`. The real value is available as `BUILD_HOSTNAME`. | ||
12 | |||
3 | ## `BUILD_NUMBER` removal from Android.mk {#BUILD_NUMBER} | 13 | ## `BUILD_NUMBER` removal from Android.mk {#BUILD_NUMBER} |
4 | 14 | ||
5 | `BUILD_NUMBER` should not be used directly in Android.mk files, as it would | 15 | `BUILD_NUMBER` should not be used directly in Android.mk files, as it would |
diff --git a/CleanSpec.mk b/CleanSpec.mk index b32868eab..8a2830330 100644 --- a/CleanSpec.mk +++ b/CleanSpec.mk | |||
@@ -532,6 +532,9 @@ $(call add-clean-step, rm -f .d) | |||
532 | # Remove obsolete apps | 532 | # Remove obsolete apps |
533 | $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*) | 533 | $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*) |
534 | 534 | ||
535 | # Remove corrupt generated rule due to using toybox's sed | ||
536 | $(call add-clean-step, rm -rf $(SOONG_OUT_DIR)/.intermediates/system/core/init/generated_stub_builtin_function_map) | ||
537 | |||
535 | # ************************************************ | 538 | # ************************************************ |
536 | # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST | 539 | # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST |
537 | # ************************************************ | 540 | # ************************************************ |
@@ -1,8 +1,7 @@ | |||
1 | ccross@android.com | 1 | ccross@android.com |
2 | dwillemsen@google.com | 2 | dwillemsen@google.com |
3 | nanzhang@google.com | ||
4 | 3 | ||
5 | per-file * = ccross@android.com,dwillemsen@google.com,nanzhang@google.com | 4 | per-file * = ccross@android.com,dwillemsen@google.com |
6 | 5 | ||
7 | # for version updates | 6 | # for version updates |
8 | per-file version_defaults.mk = aseaton@google.com,elisapascual@google.com | 7 | per-file version_defaults.mk = aseaton@google.com,elisapascual@google.com |
diff --git a/core/Makefile b/core/Makefile index c63e2137e..7d1c7ff20 100644 --- a/core/Makefile +++ b/core/Makefile | |||
@@ -3124,7 +3124,7 @@ define check-sum-of-partition-sizes | |||
3124 | else \ | 3124 | else \ |
3125 | echo "The sum of sizes of [$(strip $(3))] is within $(strip $(1)):"; \ | 3125 | echo "The sum of sizes of [$(strip $(3))] is within $(strip $(1)):"; \ |
3126 | echo $${sum_sizes_expr} '==' $$(( $${sum_sizes_expr} )) '<=' "$(2)" '==' $$(( $(2) )); \ | 3126 | echo $${sum_sizes_expr} '==' $$(( $${sum_sizes_expr} )) '<=' "$(2)" '==' $$(( $(2) )); \ |
3127 | fi | 3127 | fi; |
3128 | endef | 3128 | endef |
3129 | 3129 | ||
3130 | define check-all-partition-sizes-target | 3130 | define check-all-partition-sizes-target |
diff --git a/core/combo/HOST_linux-x86.mk b/core/combo/HOST_linux-x86.mk index 4e83dc4c0..deed943a6 100644 --- a/core/combo/HOST_linux-x86.mk +++ b/core/combo/HOST_linux-x86.mk | |||
@@ -26,5 +26,5 @@ endef | |||
26 | 26 | ||
27 | # $(1): The file to check | 27 | # $(1): The file to check |
28 | define get-file-size | 28 | define get-file-size |
29 | stat --format "%s" "$(1)" | tr -d '\n' | 29 | stat -c "%s" "$(1)" | tr -d '\n' |
30 | endef | 30 | endef |
diff --git a/core/config.mk b/core/config.mk index c0a159dce..a3be19441 100644 --- a/core/config.mk +++ b/core/config.mk | |||
@@ -90,6 +90,7 @@ $(KATI_obsolete_var \ | |||
90 | GLOBAL_CFLAGS_NO_OVERRIDE GLOBAL_CPPFLAGS_NO_OVERRIDE \ | 90 | GLOBAL_CFLAGS_NO_OVERRIDE GLOBAL_CPPFLAGS_NO_OVERRIDE \ |
91 | ,GCC support has been removed. Use Clang instead) | 91 | ,GCC support has been removed. Use Clang instead) |
92 | $(KATI_obsolete_var DIST_DIR dist_goal,Use dist-for-goals instead. See $(CHANGES_URL)#dist) | 92 | $(KATI_obsolete_var DIST_DIR dist_goal,Use dist-for-goals instead. See $(CHANGES_URL)#dist) |
93 | $(KATI_deprecated_var USER,Use BUILD_USERNAME instead. See $(CHANGES_URL)#USER) | ||
93 | 94 | ||
94 | # This is marked as obsolete in envsetup.mk after reading the BoardConfig.mk | 95 | # This is marked as obsolete in envsetup.mk after reading the BoardConfig.mk |
95 | $(KATI_deprecate_export It is a global setting. See $(CHANGES_URL)#export_keyword) | 96 | $(KATI_deprecate_export It is a global setting. See $(CHANGES_URL)#export_keyword) |
diff --git a/core/dex_preopt_config.mk b/core/dex_preopt_config.mk index 0793516b2..3eaf55bb3 100644 --- a/core/dex_preopt_config.mk +++ b/core/dex_preopt_config.mk | |||
@@ -1,8 +1,8 @@ | |||
1 | DEX_PREOPT_CONFIG := $(PRODUCT_OUT)/dexpreopt.config | 1 | DEX_PREOPT_CONFIG := $(PRODUCT_OUT)/dexpreopt.config |
2 | 2 | ||
3 | # list of boot classpath jars for dexpreopt | 3 | # list of boot classpath jars for dexpreopt |
4 | DEXPREOPT_BOOT_JARS_MODULES := $(PRODUCT_BOOT_JARS) | 4 | DEXPREOPT_BOOT_JARS_MODULES := $(strip $(filter-out conscrypt,$(PRODUCT_BOOT_JARS))) |
5 | PRODUCT_BOOTCLASSPATH_JARS := $(strip $(DEXPREOPT_BOOT_JARS_MODULES)) | 5 | PRODUCT_BOOTCLASSPATH_JARS := $(strip $(DEXPREOPT_BOOT_JARS_MODULES) $(filter conscrypt,$(PRODUCT_BOOT_JARS))) |
6 | PRODUCT_BOOTCLASSPATH := $(subst $(space),:,$(foreach m,$(PRODUCT_BOOTCLASSPATH_JARS),/system/framework/$(m).jar)) | 6 | PRODUCT_BOOTCLASSPATH := $(subst $(space),:,$(foreach m,$(PRODUCT_BOOTCLASSPATH_JARS),/system/framework/$(m).jar)) |
7 | 7 | ||
8 | PRODUCT_SYSTEM_SERVER_CLASSPATH := $(subst $(space),:,$(foreach m,$(PRODUCT_SYSTEM_SERVER_JARS),/system/framework/$(m).jar)) | 8 | PRODUCT_SYSTEM_SERVER_CLASSPATH := $(subst $(space),:,$(foreach m,$(PRODUCT_SYSTEM_SERVER_JARS),/system/framework/$(m).jar)) |
@@ -118,6 +118,7 @@ ifeq ($(WRITE_SOONG_VARIABLES),true) | |||
118 | $(call add_json_list, PreoptBootClassPathDexFiles, $(DEXPREOPT_BOOTCLASSPATH_DEX_FILES)) | 118 | $(call add_json_list, PreoptBootClassPathDexFiles, $(DEXPREOPT_BOOTCLASSPATH_DEX_FILES)) |
119 | $(call add_json_list, PreoptBootClassPathDexLocations, $(DEXPREOPT_BOOTCLASSPATH_DEX_LOCATIONS)) | 119 | $(call add_json_list, PreoptBootClassPathDexLocations, $(DEXPREOPT_BOOTCLASSPATH_DEX_LOCATIONS)) |
120 | $(call add_json_list, BootJars, $(PRODUCT_BOOT_JARS)) | 120 | $(call add_json_list, BootJars, $(PRODUCT_BOOT_JARS)) |
121 | $(call add_json_list, PreoptBootJars, $(DEXPREOPT_BOOT_JARS_MODULES)) | ||
121 | $(call add_json_list, SystemServerJars, $(PRODUCT_SYSTEM_SERVER_JARS)) | 122 | $(call add_json_list, SystemServerJars, $(PRODUCT_SYSTEM_SERVER_JARS)) |
122 | $(call add_json_list, SystemServerApps, $(PRODUCT_SYSTEM_SERVER_APPS)) | 123 | $(call add_json_list, SystemServerApps, $(PRODUCT_SYSTEM_SERVER_APPS)) |
123 | $(call add_json_list, SpeedApps, $(PRODUCT_DEXPREOPT_SPEED_APPS)) | 124 | $(call add_json_list, SpeedApps, $(PRODUCT_DEXPREOPT_SPEED_APPS)) |
diff --git a/core/dex_preopt_libart_boot.mk b/core/dex_preopt_libart_boot.mk index b31f5a847..47a8de871 100644 --- a/core/dex_preopt_libart_boot.mk +++ b/core/dex_preopt_libart_boot.mk | |||
@@ -113,7 +113,6 @@ $($(my_2nd_arch_prefix)DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME) : $(LIBART_TARGE | |||
113 | --android-root=$(PRODUCT_OUT)/system \ | 113 | --android-root=$(PRODUCT_OUT)/system \ |
114 | --no-inline-from=core-oj.jar \ | 114 | --no-inline-from=core-oj.jar \ |
115 | --abort-on-hard-verifier-error \ | 115 | --abort-on-hard-verifier-error \ |
116 | --abort-on-soft-verifier-error \ | ||
117 | $(PRODUCT_DEX_PREOPT_BOOT_FLAGS) $(ART_BOOT_IMAGE_EXTRA_ARGS) \ | 116 | $(PRODUCT_DEX_PREOPT_BOOT_FLAGS) $(ART_BOOT_IMAGE_EXTRA_ARGS) \ |
118 | || ( echo "$(DEX2OAT_FAILURE_MESSAGE)" ; false ) | 117 | || ( echo "$(DEX2OAT_FAILURE_MESSAGE)" ; false ) |
119 | 118 | ||
diff --git a/core/jacoco.mk b/core/jacoco.mk index 6406df45a..148bb045e 100644 --- a/core/jacoco.mk +++ b/core/jacoco.mk | |||
@@ -51,7 +51,7 @@ $(my_unzipped_timestamp_path): $(LOCAL_FULL_CLASSES_PRE_JACOCO_JAR) | |||
51 | -d $(PRIVATE_UNZIPPED_PATH) \ | 51 | -d $(PRIVATE_UNZIPPED_PATH) \ |
52 | $(PRIVATE_INCLUDE_ARGS) | 52 | $(PRIVATE_INCLUDE_ARGS) |
53 | (cd $(PRIVATE_UNZIPPED_PATH) && rm -rf $(PRIVATE_EXCLUDE_ARGS)) | 53 | (cd $(PRIVATE_UNZIPPED_PATH) && rm -rf $(PRIVATE_EXCLUDE_ARGS)) |
54 | (cd $(PRIVATE_UNZIPPED_PATH) && find -not -name "*.class" -type f | xargs --no-run-if-empty rm) | 54 | (cd $(PRIVATE_UNZIPPED_PATH) && find -not -name "*.class" -type f -exec rm {} \;) |
55 | touch $(PRIVATE_UNZIPPED_TIMESTAMP_PATH) | 55 | touch $(PRIVATE_UNZIPPED_TIMESTAMP_PATH) |
56 | # Unfortunately in the previous task above, | 56 | # Unfortunately in the previous task above, |
57 | # 'rm -rf $(PRIVATE_EXCLUDE_ARGS)' needs to be a separate | 57 | # 'rm -rf $(PRIVATE_EXCLUDE_ARGS)' needs to be a separate |
diff --git a/core/main.mk b/core/main.mk index 0a99e7c84..282821cdb 100644 --- a/core/main.mk +++ b/core/main.mk | |||
@@ -1089,12 +1089,6 @@ ifdef FULL_BUILD | |||
1089 | static_whitelist_patterns := $(TARGET_OUT_FAKE)/% $(HOST_OUT)/% | 1089 | static_whitelist_patterns := $(TARGET_OUT_FAKE)/% $(HOST_OUT)/% |
1090 | # RROs become REQUIRED by the source module, but are always placed on the vendor partition. | 1090 | # RROs become REQUIRED by the source module, but are always placed on the vendor partition. |
1091 | static_whitelist_patterns += %__auto_generated_rro.apk | 1091 | static_whitelist_patterns += %__auto_generated_rro.apk |
1092 | # $(PRODUCT_OUT)/apex is where shared libraries in APEXes get installed. | ||
1093 | # The path can be considered as a fake path, as the shared libraries | ||
1094 | # are installed there just to have symbols files for them under | ||
1095 | # $(PRODUCT_OUT)/symbols/apex for debugging purpose. The /apex directory | ||
1096 | # is never compiled into a filesystem image. | ||
1097 | static_whitelist_patterns += $(PRODUCT_OUT)/apex/% | ||
1098 | ifeq (true,$(BOARD_USES_SYSTEM_OTHER_ODEX)) | 1092 | ifeq (true,$(BOARD_USES_SYSTEM_OTHER_ODEX)) |
1099 | # Allow system_other odex space optimization. | 1093 | # Allow system_other odex space optimization. |
1100 | static_whitelist_patterns += \ | 1094 | static_whitelist_patterns += \ |
diff --git a/core/python_binary_host_test_config_template.xml b/core/python_binary_host_test_config_template.xml new file mode 100644 index 000000000..0f63953d9 --- /dev/null +++ b/core/python_binary_host_test_config_template.xml | |||
@@ -0,0 +1,21 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <!-- Copyright (C) 2018 The Android Open Source Project | ||
3 | |||
4 | Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | you may not use this file except in compliance with the License. | ||
6 | You may obtain a copy of the License at | ||
7 | |||
8 | http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | |||
10 | Unless required by applicable law or agreed to in writing, software | ||
11 | distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | See the License for the specific language governing permissions and | ||
14 | limitations under the License. | ||
15 | --> | ||
16 | <configuration description="Config to run {MODULE} unittests"> | ||
17 | <test class="com.android.tradefed.testtype.python.PythonBinaryHostTest" > | ||
18 | <option name="par-file-name" value="{MODULE}" /> | ||
19 | <option name="test-timeout" value="5m" /> | ||
20 | </test> | ||
21 | </configuration> | ||
diff --git a/core/soong_config.mk b/core/soong_config.mk index 58e1a03ae..77329c35f 100644 --- a/core/soong_config.mk +++ b/core/soong_config.mk | |||
@@ -111,6 +111,9 @@ $(call add_json_str, Override_rs_driver, $(OVERRIDE_RS_DRIVER)) | |||
111 | $(call add_json_bool, UncompressPrivAppDex, $(call invert_bool,$(filter true,$(DONT_UNCOMPRESS_PRIV_APPS_DEXS)))) | 111 | $(call add_json_bool, UncompressPrivAppDex, $(call invert_bool,$(filter true,$(DONT_UNCOMPRESS_PRIV_APPS_DEXS)))) |
112 | $(call add_json_list, ModulesLoadedByPrivilegedModules, $(PRODUCT_LOADED_BY_PRIVILEGED_MODULES)) | 112 | $(call add_json_list, ModulesLoadedByPrivilegedModules, $(PRODUCT_LOADED_BY_PRIVILEGED_MODULES)) |
113 | 113 | ||
114 | $(call add_json_list, BootJars, $(PRODUCT_BOOT_JARS)) | ||
115 | $(call add_json_list, PreoptBootJars, $(DEXPREOPT_BOOT_JARS_MODULES)) | ||
116 | |||
114 | $(call add_json_bool, DisableDexPreopt, $(call invert_bool,$(filter true,$(WITH_DEXPREOPT)))) | 117 | $(call add_json_bool, DisableDexPreopt, $(call invert_bool,$(filter true,$(WITH_DEXPREOPT)))) |
115 | $(call add_json_list, DisableDexPreoptModules, $(DEXPREOPT_DISABLED_MODULES)) | 118 | $(call add_json_list, DisableDexPreoptModules, $(DEXPREOPT_DISABLED_MODULES)) |
116 | $(call add_json_str, DexPreoptProfileDir, $(PRODUCT_DEX_PREOPT_PROFILE_DIR)) | 119 | $(call add_json_str, DexPreoptProfileDir, $(PRODUCT_DEX_PREOPT_PROFILE_DIR)) |
diff --git a/envsetup.sh b/envsetup.sh index 62a64b605..c4c4972c5 100644 --- a/envsetup.sh +++ b/envsetup.sh | |||
@@ -1711,6 +1711,8 @@ function acloud() | |||
1711 | case $host_os_arch in | 1711 | case $host_os_arch in |
1712 | linux-x86) "$(gettop)"/prebuilts/asuite/acloud/linux-x86/acloud "$@" | 1712 | linux-x86) "$(gettop)"/prebuilts/asuite/acloud/linux-x86/acloud "$@" |
1713 | ;; | 1713 | ;; |
1714 | darwin-x86) "$(gettop)"/prebuilts/asuite/acloud/darwin-x86/acloud "$@" | ||
1715 | ;; | ||
1714 | *) | 1716 | *) |
1715 | echo "acloud is not supported on your host arch: $host_os_arch" | 1717 | echo "acloud is not supported on your host arch: $host_os_arch" |
1716 | ;; | 1718 | ;; |
diff --git a/target/product/base_system.mk b/target/product/base_system.mk index 7c3ac3b3d..df793bff1 100644 --- a/target/product/base_system.mk +++ b/target/product/base_system.mk | |||
@@ -259,6 +259,7 @@ PRODUCT_PACKAGES += \ | |||
259 | uncrypt \ | 259 | uncrypt \ |
260 | usbd \ | 260 | usbd \ |
261 | vdc \ | 261 | vdc \ |
262 | viewcompiler \ | ||
262 | voip-common \ | 263 | voip-common \ |
263 | vold \ | 264 | vold \ |
264 | WallpaperBackup \ | 265 | WallpaperBackup \ |
diff --git a/target/product/gsi/current.txt b/target/product/gsi/current.txt index 17d2f1bd5..9eff6b6ca 100644 --- a/target/product/gsi/current.txt +++ b/target/product/gsi/current.txt | |||
@@ -70,6 +70,7 @@ VNDK-core: android.hardware.automotive.evs@1.0.so | |||
70 | VNDK-core: android.hardware.automotive.vehicle@2.0.so | 70 | VNDK-core: android.hardware.automotive.vehicle@2.0.so |
71 | VNDK-core: android.hardware.biometrics.fingerprint@2.1.so | 71 | VNDK-core: android.hardware.biometrics.fingerprint@2.1.so |
72 | VNDK-core: android.hardware.bluetooth.a2dp@1.0.so | 72 | VNDK-core: android.hardware.bluetooth.a2dp@1.0.so |
73 | VNDK-core: android.hardware.bluetooth.audio@2.0.so | ||
73 | VNDK-core: android.hardware.bluetooth@1.0.so | 74 | VNDK-core: android.hardware.bluetooth@1.0.so |
74 | VNDK-core: android.hardware.boot@1.0.so | 75 | VNDK-core: android.hardware.boot@1.0.so |
75 | VNDK-core: android.hardware.broadcastradio@1.0.so | 76 | VNDK-core: android.hardware.broadcastradio@1.0.so |
diff --git a/target/product/runtime_libart.mk b/target/product/runtime_libart.mk index 71834aa5e..f1b09c163 100644 --- a/target/product/runtime_libart.mk +++ b/target/product/runtime_libart.mk | |||
@@ -52,9 +52,7 @@ PRODUCT_PACKAGES += art-runtime | |||
52 | # ART/dex helpers. | 52 | # ART/dex helpers. |
53 | PRODUCT_PACKAGES += art-tools | 53 | PRODUCT_PACKAGES += art-tools |
54 | # Android Runtime APEX module. | 54 | # Android Runtime APEX module. |
55 | ifneq ($(DONT_INCLUDE_RUNTIME_APEX), true) | 55 | PRODUCT_PACKAGES += com.android.runtime |
56 | PRODUCT_PACKAGES += com.android.runtime | ||
57 | endif | ||
58 | 56 | ||
59 | # Certificates. | 57 | # Certificates. |
60 | PRODUCT_PACKAGES += \ | 58 | PRODUCT_PACKAGES += \ |
diff --git a/target/product/telephony_system.mk b/target/product/telephony_system.mk index e30f0364f..fd79472cf 100644 --- a/target/product/telephony_system.mk +++ b/target/product/telephony_system.mk | |||
@@ -18,7 +18,7 @@ | |||
18 | # hardware, and install on the system partition. | 18 | # hardware, and install on the system partition. |
19 | 19 | ||
20 | PRODUCT_PACKAGES := \ | 20 | PRODUCT_PACKAGES := \ |
21 | ANS \ | 21 | ONS \ |
22 | CarrierDefaultApp \ | 22 | CarrierDefaultApp \ |
23 | CallLogBackup \ | 23 | CallLogBackup \ |
24 | CellBroadcastReceiver \ | 24 | CellBroadcastReceiver \ |
diff --git a/tools/releasetools/OWNERS b/tools/releasetools/OWNERS index 39448cf66..766adb4e5 100644 --- a/tools/releasetools/OWNERS +++ b/tools/releasetools/OWNERS | |||
@@ -1 +1,2 @@ | |||
1 | tbao@google.com | 1 | tbao@google.com |
2 | xunchang@google.com | ||
diff --git a/tools/releasetools/add_img_to_target_files.py b/tools/releasetools/add_img_to_target_files.py index da5ea4aa1..e75b3b768 100755 --- a/tools/releasetools/add_img_to_target_files.py +++ b/tools/releasetools/add_img_to_target_files.py | |||
@@ -82,18 +82,23 @@ FIXED_FILE_TIMESTAMP = int(( | |||
82 | 82 | ||
83 | 83 | ||
84 | class OutputFile(object): | 84 | class OutputFile(object): |
85 | """A helper class to write a generated file to the given dir or zip. | ||
86 | |||
87 | When generating images, we want the outputs to go into the given zip file, or | ||
88 | the given dir. | ||
89 | |||
90 | Attributes: | ||
91 | name: The name of the output file, regardless of the final destination. | ||
92 | """ | ||
93 | |||
85 | def __init__(self, output_zip, input_dir, prefix, name): | 94 | def __init__(self, output_zip, input_dir, prefix, name): |
95 | # We write the intermediate output file under the given input_dir, even if | ||
96 | # the final destination is a zip archive. | ||
97 | self.name = os.path.join(input_dir, prefix, name) | ||
86 | self._output_zip = output_zip | 98 | self._output_zip = output_zip |
87 | self.input_name = os.path.join(input_dir, prefix, name) | ||
88 | |||
89 | if self._output_zip: | 99 | if self._output_zip: |
90 | self._zip_name = os.path.join(prefix, name) | 100 | self._zip_name = os.path.join(prefix, name) |
91 | 101 | ||
92 | root, suffix = os.path.splitext(name) | ||
93 | self.name = common.MakeTempFile(prefix=root + '-', suffix=suffix) | ||
94 | else: | ||
95 | self.name = self.input_name | ||
96 | |||
97 | def Write(self): | 102 | def Write(self): |
98 | if self._output_zip: | 103 | if self._output_zip: |
99 | common.ZipWrite(self._output_zip, self.name, self._zip_name) | 104 | common.ZipWrite(self._output_zip, self.name, self._zip_name) |
@@ -129,9 +134,9 @@ def AddSystem(output_zip, recovery_img=None, boot_img=None): | |||
129 | output_zip. Returns the name of the system image file.""" | 134 | output_zip. Returns the name of the system image file.""" |
130 | 135 | ||
131 | img = OutputFile(output_zip, OPTIONS.input_tmp, "IMAGES", "system.img") | 136 | img = OutputFile(output_zip, OPTIONS.input_tmp, "IMAGES", "system.img") |
132 | if os.path.exists(img.input_name): | 137 | if os.path.exists(img.name): |
133 | logger.info("system.img already exists; no need to rebuild...") | 138 | logger.info("system.img already exists; no need to rebuild...") |
134 | return img.input_name | 139 | return img.name |
135 | 140 | ||
136 | def output_sink(fn, data): | 141 | def output_sink(fn, data): |
137 | ofile = open(os.path.join(OPTIONS.input_tmp, "SYSTEM", fn), "w") | 142 | ofile = open(os.path.join(OPTIONS.input_tmp, "SYSTEM", fn), "w") |
@@ -161,7 +166,7 @@ def AddSystemOther(output_zip): | |||
161 | and store it in output_zip.""" | 166 | and store it in output_zip.""" |
162 | 167 | ||
163 | img = OutputFile(output_zip, OPTIONS.input_tmp, "IMAGES", "system_other.img") | 168 | img = OutputFile(output_zip, OPTIONS.input_tmp, "IMAGES", "system_other.img") |
164 | if os.path.exists(img.input_name): | 169 | if os.path.exists(img.name): |
165 | logger.info("system_other.img already exists; no need to rebuild...") | 170 | logger.info("system_other.img already exists; no need to rebuild...") |
166 | return | 171 | return |
167 | 172 | ||
@@ -173,9 +178,9 @@ def AddVendor(output_zip): | |||
173 | output_zip.""" | 178 | output_zip.""" |
174 | 179 | ||
175 | img = OutputFile(output_zip, OPTIONS.input_tmp, "IMAGES", "vendor.img") | 180 | img = OutputFile(output_zip, OPTIONS.input_tmp, "IMAGES", "vendor.img") |
176 | if os.path.exists(img.input_name): | 181 | if os.path.exists(img.name): |
177 | logger.info("vendor.img already exists; no need to rebuild...") | 182 | logger.info("vendor.img already exists; no need to rebuild...") |
178 | return img.input_name | 183 | return img.name |
179 | 184 | ||
180 | block_list = OutputFile(output_zip, OPTIONS.input_tmp, "IMAGES", "vendor.map") | 185 | block_list = OutputFile(output_zip, OPTIONS.input_tmp, "IMAGES", "vendor.map") |
181 | CreateImage(OPTIONS.input_tmp, OPTIONS.info_dict, "vendor", img, | 186 | CreateImage(OPTIONS.input_tmp, OPTIONS.info_dict, "vendor", img, |
@@ -188,9 +193,9 @@ def AddProduct(output_zip): | |||
188 | output_zip.""" | 193 | output_zip.""" |
189 | 194 | ||
190 | img = OutputFile(output_zip, OPTIONS.input_tmp, "IMAGES", "product.img") | 195 | img = OutputFile(output_zip, OPTIONS.input_tmp, "IMAGES", "product.img") |
191 | if os.path.exists(img.input_name): | 196 | if os.path.exists(img.name): |
192 | logger.info("product.img already exists; no need to rebuild...") | 197 | logger.info("product.img already exists; no need to rebuild...") |
193 | return img.input_name | 198 | return img.name |
194 | 199 | ||
195 | block_list = OutputFile( | 200 | block_list = OutputFile( |
196 | output_zip, OPTIONS.input_tmp, "IMAGES", "product.map") | 201 | output_zip, OPTIONS.input_tmp, "IMAGES", "product.map") |
@@ -206,9 +211,9 @@ def AddProductServices(output_zip): | |||
206 | 211 | ||
207 | img = OutputFile(output_zip, OPTIONS.input_tmp, "IMAGES", | 212 | img = OutputFile(output_zip, OPTIONS.input_tmp, "IMAGES", |
208 | "product_services.img") | 213 | "product_services.img") |
209 | if os.path.exists(img.input_name): | 214 | if os.path.exists(img.name): |
210 | logger.info("product_services.img already exists; no need to rebuild...") | 215 | logger.info("product_services.img already exists; no need to rebuild...") |
211 | return img.input_name | 216 | return img.name |
212 | 217 | ||
213 | block_list = OutputFile( | 218 | block_list = OutputFile( |
214 | output_zip, OPTIONS.input_tmp, "IMAGES", "product_services.map") | 219 | output_zip, OPTIONS.input_tmp, "IMAGES", "product_services.map") |
@@ -222,9 +227,9 @@ def AddOdm(output_zip): | |||
222 | """Turn the contents of ODM into an odm image and store it in output_zip.""" | 227 | """Turn the contents of ODM into an odm image and store it in output_zip.""" |
223 | 228 | ||
224 | img = OutputFile(output_zip, OPTIONS.input_tmp, "IMAGES", "odm.img") | 229 | img = OutputFile(output_zip, OPTIONS.input_tmp, "IMAGES", "odm.img") |
225 | if os.path.exists(img.input_name): | 230 | if os.path.exists(img.name): |
226 | logger.info("odm.img already exists; no need to rebuild...") | 231 | logger.info("odm.img already exists; no need to rebuild...") |
227 | return img.input_name | 232 | return img.name |
228 | 233 | ||
229 | block_list = OutputFile( | 234 | block_list = OutputFile( |
230 | output_zip, OPTIONS.input_tmp, "IMAGES", "odm.map") | 235 | output_zip, OPTIONS.input_tmp, "IMAGES", "odm.map") |
@@ -241,9 +246,9 @@ def AddDtbo(output_zip): | |||
241 | image under PREBUILT_IMAGES/, signs it as needed, and returns the image name. | 246 | image under PREBUILT_IMAGES/, signs it as needed, and returns the image name. |
242 | """ | 247 | """ |
243 | img = OutputFile(output_zip, OPTIONS.input_tmp, "IMAGES", "dtbo.img") | 248 | img = OutputFile(output_zip, OPTIONS.input_tmp, "IMAGES", "dtbo.img") |
244 | if os.path.exists(img.input_name): | 249 | if os.path.exists(img.name): |
245 | logger.info("dtbo.img already exists; no need to rebuild...") | 250 | logger.info("dtbo.img already exists; no need to rebuild...") |
246 | return img.input_name | 251 | return img.name |
247 | 252 | ||
248 | dtbo_prebuilt_path = os.path.join( | 253 | dtbo_prebuilt_path = os.path.join( |
249 | OPTIONS.input_tmp, "PREBUILT_IMAGES", "dtbo.img") | 254 | OPTIONS.input_tmp, "PREBUILT_IMAGES", "dtbo.img") |
@@ -344,7 +349,7 @@ def AddUserdata(output_zip): | |||
344 | """ | 349 | """ |
345 | 350 | ||
346 | img = OutputFile(output_zip, OPTIONS.input_tmp, "IMAGES", "userdata.img") | 351 | img = OutputFile(output_zip, OPTIONS.input_tmp, "IMAGES", "userdata.img") |
347 | if os.path.exists(img.input_name): | 352 | if os.path.exists(img.name): |
348 | logger.info("userdata.img already exists; no need to rebuild...") | 353 | logger.info("userdata.img already exists; no need to rebuild...") |
349 | return | 354 | return |
350 | 355 | ||
@@ -418,9 +423,9 @@ def AddVBMeta(output_zip, partitions, name, needed_partitions): | |||
418 | 423 | ||
419 | img = OutputFile( | 424 | img = OutputFile( |
420 | output_zip, OPTIONS.input_tmp, "IMAGES", "{}.img".format(name)) | 425 | output_zip, OPTIONS.input_tmp, "IMAGES", "{}.img".format(name)) |
421 | if os.path.exists(img.input_name): | 426 | if os.path.exists(img.name): |
422 | logger.info("%s.img already exists; not rebuilding...", name) | 427 | logger.info("%s.img already exists; not rebuilding...", name) |
423 | return img.input_name | 428 | return img.name |
424 | 429 | ||
425 | avbtool = os.getenv('AVBTOOL') or OPTIONS.info_dict["avb_avbtool"] | 430 | avbtool = os.getenv('AVBTOOL') or OPTIONS.info_dict["avb_avbtool"] |
426 | cmd = [avbtool, "make_vbmeta_image", "--output", img.name] | 431 | cmd = [avbtool, "make_vbmeta_image", "--output", img.name] |
@@ -497,7 +502,7 @@ def AddCache(output_zip): | |||
497 | """Create an empty cache image and store it in output_zip.""" | 502 | """Create an empty cache image and store it in output_zip.""" |
498 | 503 | ||
499 | img = OutputFile(output_zip, OPTIONS.input_tmp, "IMAGES", "cache.img") | 504 | img = OutputFile(output_zip, OPTIONS.input_tmp, "IMAGES", "cache.img") |
500 | if os.path.exists(img.input_name): | 505 | if os.path.exists(img.name): |
501 | logger.info("cache.img already exists; no need to rebuild...") | 506 | logger.info("cache.img already exists; no need to rebuild...") |
502 | return | 507 | return |
503 | 508 | ||
diff --git a/tools/releasetools/sign_target_files_apks.py b/tools/releasetools/sign_target_files_apks.py index de3ead61c..a07f67fd4 100755 --- a/tools/releasetools/sign_target_files_apks.py +++ b/tools/releasetools/sign_target_files_apks.py | |||
@@ -309,6 +309,10 @@ def ProcessTargetFiles(input_tf_zip, output_tf_zip, misc_info, | |||
309 | if filename.startswith("IMAGES/"): | 309 | if filename.startswith("IMAGES/"): |
310 | continue | 310 | continue |
311 | 311 | ||
312 | # Skip split super images, which will be re-generated during signing. | ||
313 | if filename.startswith("OTA/") and filename.endswith(".img"): | ||
314 | continue | ||
315 | |||
312 | data = input_tf_zip.read(filename) | 316 | data = input_tf_zip.read(filename) |
313 | out_info = copy.copy(info) | 317 | out_info = copy.copy(info) |
314 | (is_apk, is_compressed, should_be_skipped) = GetApkFileInfo( | 318 | (is_apk, is_compressed, should_be_skipped) = GetApkFileInfo( |