From d17a74eb49e567c5f776fe491942069383b2b94c Mon Sep 17 00:00:00 2001 From: Zhao Wei Liew Date: Sun, 5 Mar 2017 19:17:54 +0800 Subject: build: core: Remove BUILD_TINY_ANDROID checks This flag has been obsolete for a while now. Change-Id: Ib78a1b141ddd757d2546b2eff2158e6e0cc0d673 --- core/generate_extra_images.mk | 4 ---- core/tasks/dt_image.mk | 3 --- 2 files changed, 7 deletions(-) diff --git a/core/generate_extra_images.mk b/core/generate_extra_images.mk index f7fb0c5..664b963 100644 --- a/core/generate_extra_images.mk +++ b/core/generate_extra_images.mk @@ -18,10 +18,8 @@ ifeq ($(TARGET_BOOTIMG_SIGNED),true) INSTALLED_SEC_BOOTIMAGE_TARGET := $(PRODUCT_OUT)/boot.img.secure INSTALLED_SEC_RECOVERYIMAGE_TARGET := $(PRODUCT_OUT)/recovery.img.secure -ifneq ($(BUILD_TINY_ANDROID),true) intermediates := $(call intermediates-dir-for,PACKAGING,recovery_patch) RECOVERY_FROM_BOOT_PATCH := $(intermediates)/recovery_from_boot.p -endif ifndef TARGET_SHA_TYPE TARGET_SHA_TYPE := sha256 @@ -47,10 +45,8 @@ ALL_MODULES.$(LOCAL_MODULE).INSTALLED += $(INSTALLED_SEC_BOOTIMAGE_TARGET) $(INSTALLED_SEC_RECOVERYIMAGE_TARGET): $(INSTALLED_RECOVERYIMAGE_TARGET) $(RECOVERY_FROM_BOOT_PATCH) $(hide) $(call build-sec-image,$(INSTALLED_RECOVERYIMAGE_TARGET)) -ifneq ($(BUILD_TINY_ANDROID),true) ALL_DEFAULT_INSTALLED_MODULES += $(INSTALLED_SEC_RECOVERYIMAGE_TARGET) ALL_MODULES.$(LOCAL_MODULE).INSTALLED += $(INSTALLED_SEC_RECOVERYIMAGE_TARGET) -endif # !BUILD_TINY_ANDROID endif # TARGET_BOOTIMG_SIGNED #---------------------------------------------------------------------- diff --git a/core/tasks/dt_image.mk b/core/tasks/dt_image.mk index 60d45cc..3bca467 100644 --- a/core/tasks/dt_image.mk +++ b/core/tasks/dt_image.mk @@ -4,9 +4,6 @@ ifeq ($(strip $(BOARD_CUSTOM_BOOTIMG_MK)),) ifeq ($(strip $(BOARD_KERNEL_SEPARATED_DT)),true) ifneq ($(strip $(BOARD_KERNEL_PREBUILT_DT)),true) -ifeq ($(strip $(BUILD_TINY_ANDROID)),true) -include device/qcom/common/dtbtool/Android.mk -endif ifeq ($(strip $(TARGET_CUSTOM_DTBTOOL)),) DTBTOOL_NAME := dtbToolCM -- cgit v1.1 From 927d262dfd2769f5f5800f37cbe165ba28965dab Mon Sep 17 00:00:00 2001 From: Sam Mortimer Date: Tue, 17 Jan 2017 12:30:20 -0800 Subject: build sign_target_files_apks.py: clean tmp on exit Currently, this script creates and leaves nearly 2GB in tmp per run. Clean up on exit. Change-Id: I4247dd2508e9d27de57c611c18e70800d7a47f33 (cherry picked from commit 462425468899f264155a3413aab75a099d1bbd25) --- tools/releasetools/sign_target_files_apks.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/releasetools/sign_target_files_apks.py b/tools/releasetools/sign_target_files_apks.py index 54460e6..e3bcbbc 100755 --- a/tools/releasetools/sign_target_files_apks.py +++ b/tools/releasetools/sign_target_files_apks.py @@ -531,3 +531,5 @@ if __name__ == '__main__': print(" ERROR: %s" % e) print() sys.exit(1) + finally: + common.Cleanup() -- cgit v1.1 From d12c9ff52d5a320a1f0d9fbdd1014598b2b32541 Mon Sep 17 00:00:00 2001 From: mh0rst Date: Fri, 24 Feb 2017 21:59:03 +0100 Subject: Update security patch level to 2017-02-01. Change-Id: Ibebbc75c4c825b72f084c569466bca0d0866bfc6 --- core/version_defaults.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/version_defaults.mk b/core/version_defaults.mk index 65bbf74..69d3f1b 100644 --- a/core/version_defaults.mk +++ b/core/version_defaults.mk @@ -105,7 +105,7 @@ ifeq "" "$(PLATFORM_SECURITY_PATCH)" # It must match one of the Android Security Patch Level strings of the Public Security Bulletins. # # If there is no $PLATFORM_SECURITY_PATCH set, keep it empty. - PLATFORM_SECURITY_PATCH := 2017-01-01 + PLATFORM_SECURITY_PATCH := 2017-02-01 endif ifeq "" "$(PLATFORM_BASE_OS)" -- cgit v1.1 From 77e2f324e773d9ce71decb1a551e059438bcdddf Mon Sep 17 00:00:00 2001 From: Gabriele M Date: Sun, 22 Jan 2017 22:50:11 +0100 Subject: Update su binary added with addonsu zip Generate zips that include the su binary out of the system image when WITH_SU is not true. This allows to update the binary that was installed with the addonsu zip. Note: this requires backuptool to work and user builds are excluded. Change-Id: Idc905e3397816b7d3701c43bbb809878f0d22b9b --- core/Makefile | 20 ++++++++++++++++++++ tools/releasetools/edify_generator.py | 7 +++++++ tools/releasetools/ota_from_target_files.py | 13 +++++++++++++ 3 files changed, 40 insertions(+) diff --git a/core/Makefile b/core/Makefile index e14ff88..5ea1b2a 100644 --- a/core/Makefile +++ b/core/Makefile @@ -1652,6 +1652,15 @@ ifeq ($(BOARD_USES_UBOOT_MULTIIMAGE),true) endif +ifneq ($(CM_BUILD),) +ifneq ($(TARGET_BUILD_VARIANT),user) +ifneq ($(WITH_SU),true) +# Build su without installing it +$(BUILT_TARGET_FILES_PACKAGE): $(ALL_MODULES.su.BUILT) +endif +endif +endif + # Depending on the various images guarantees that the underlying # directories are up-to-date. include $(BUILD_SYSTEM)/tasks/oem_image.mk @@ -1843,6 +1852,17 @@ else endif $(hide) echo "ota_override_device=$(OTA_SCRIPT_OVERRIDE_DEVICE)" >> $(zip_root)/META/misc_info.txt $(hide) echo "ota_override_prop=$(OTA_SCRIPT_OVERRIDE_PROP)" >> $(zip_root)/META/misc_info.txt + +ifneq ($(CM_BUILD),) +ifneq ($(TARGET_BUILD_VARIANT),user) +ifneq ($(WITH_SU),true) + $(hide) echo "addonsu_updater=true" >> $(zip_root)/META/misc_info.txt + $(hide) mkdir $(zip_root)/EXTRA + $(hide) cp $(ALL_MODULES.su.BUILT) $(zip_root)/EXTRA +endif +endif +endif + @# Zip everything up, preserving symlinks $(hide) (cd $(zip_root) && zip -qry ../$(notdir $@) .) @# Run fs_config on all the system, vendor, boot ramdisk, diff --git a/tools/releasetools/edify_generator.py b/tools/releasetools/edify_generator.py index 8025235..ca06c8a 100644 --- a/tools/releasetools/edify_generator.py +++ b/tools/releasetools/edify_generator.py @@ -411,3 +411,10 @@ class EdifyGenerator(object): data = open(input_path, "rb").read() common.ZipWriteStr(output_zip, "META-INF/com/google/android/update-binary", data, perms=0o755) + + def AppenSuUpdater(self): + self.AppendExtra('if (run_program("test", "-f", "/system/addon.d/51-addonsu.sh") == "0" && run_program("test", "-f", "/system/xbin/su") == "0") then') + self.AppendExtra('package_extract_file("extra/su", "/system/xbin/su");') + self.SetPermissions("/system/xbin/su", 0, 2000, 0o755, "u:object_r:su_exec:s0", None) + self.MakeSymlinks([("/system/xbin/su", "/system/bin/su")]) + self.AppendExtra('endif;') diff --git a/tools/releasetools/ota_from_target_files.py b/tools/releasetools/ota_from_target_files.py index 66db227..682d1a9 100755 --- a/tools/releasetools/ota_from_target_files.py +++ b/tools/releasetools/ota_from_target_files.py @@ -515,6 +515,15 @@ def CopyInstallTools(output_zip): output_zip.write(install_source, install_target) +def CopyExtra(output_zip): + install_path = os.path.join(OPTIONS.input_tmp, "EXTRA") + for root, subdirs, files in os.walk(install_path): + for f in files: + install_source = os.path.join(root, f) + install_target = os.path.join("extra", os.path.relpath(root, install_path), f) + output_zip.write(install_source, install_target) + + def WriteFullOTAPackage(input_zip, output_zip): # TODO: how to determine this? We don't know what version it will # be installed on top of. For now, we expect the API just won't @@ -620,6 +629,8 @@ else if get_stage("%(bcb_dev)s") == "3/3" then if OPTIONS.backuptool: script.Mount("/system") script.RunBackup("backup") + if OPTIONS.info_dict.get("addonsu_updater") == "true": + CopyExtra(output_zip) script.Unmount("/system") system_progress = 0.75 @@ -709,6 +720,8 @@ else if get_stage("%(bcb_dev)s") == "3/3" then if block_based: script.Mount("/system") script.RunBackup("restore") + if OPTIONS.info_dict.get("addonsu_updater") == "true": + script.AppenSuUpdater() # This must be done after backup restore if block_based: script.Unmount("/system") -- cgit v1.1 From 1b76af7afda69dd04f276fb45c5bf637fefd89d4 Mon Sep 17 00:00:00 2001 From: Adam Seaton Date: Tue, 17 Jan 2017 11:36:19 -0800 Subject: Updating Security String to 2017-03-01 on nyc-dev b/34345751 Change-Id: I55d9ba3f16264f9e4f9ad72e861527a3f8ae566c (cherry picked from commit 003e5aad03b405c7aecc63339c2d7995ddcbaaa9) (cherry picked from commit 0ed26601263463d7f024d75ba2998baad39caa38) --- core/version_defaults.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/version_defaults.mk b/core/version_defaults.mk index 69d3f1b..55ccde7 100644 --- a/core/version_defaults.mk +++ b/core/version_defaults.mk @@ -105,7 +105,7 @@ ifeq "" "$(PLATFORM_SECURITY_PATCH)" # It must match one of the Android Security Patch Level strings of the Public Security Bulletins. # # If there is no $PLATFORM_SECURITY_PATCH set, keep it empty. - PLATFORM_SECURITY_PATCH := 2017-02-01 + PLATFORM_SECURITY_PATCH := 2017-03-01 endif ifeq "" "$(PLATFORM_BASE_OS)" -- cgit v1.1 From 0384560c9220a5c21f37b1f509504dbd5362324d Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Sun, 26 Mar 2017 14:33:05 +0200 Subject: roomservice: handle devices with underscores This change correctly handles devices with underscores in their name even if there is a device with the same name after the last underscore (spyder, umts_spyder) by not allowing any underscores in the manufacturers name. Without this change, spyder gets resolved to: device/motorola_umts/spyder device/motorola/spyder Only the last one is valid. With this change, both spyder and umts_spyder get resolved correctly. Change-Id: I0c95ff126d827a2d6b58875dfcb9327e999f4913 --- tools/roomservice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/roomservice.py b/tools/roomservice.py index 691456e..da8fa93 100755 --- a/tools/roomservice.py +++ b/tools/roomservice.py @@ -251,7 +251,7 @@ if depsonly: else: for repository in repositories: repo_name = repository['name'] - if repo_name.startswith("android_device_") and repo_name.endswith("_" + device): + if re.match(r"^android_device_[^_]*_" + device + "$", repo_name): print("Found repository: %s" % repository['name']) manufacturer = repo_name.replace("android_device_", "").replace("_" + device, "") -- cgit v1.1 From f2991553971a90c6a99aeb4c8baeeb100648828d Mon Sep 17 00:00:00 2001 From: Adam Seaton Date: Mon, 13 Feb 2017 11:48:25 -0800 Subject: Update Security String to 2017-04-01 on nyc-dev Bug:35314737 Change-Id: I10b7a9f66524ab64f9b8033b2e9ef353ee4aae12 (cherry picked from commit 93c1a722c2c579a7360a160c77c754382018f348) --- core/version_defaults.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/version_defaults.mk b/core/version_defaults.mk index 55ccde7..ffd15d4 100644 --- a/core/version_defaults.mk +++ b/core/version_defaults.mk @@ -105,7 +105,7 @@ ifeq "" "$(PLATFORM_SECURITY_PATCH)" # It must match one of the Android Security Patch Level strings of the Public Security Bulletins. # # If there is no $PLATFORM_SECURITY_PATCH set, keep it empty. - PLATFORM_SECURITY_PATCH := 2017-03-01 + PLATFORM_SECURITY_PATCH := 2017-04-01 endif ifeq "" "$(PLATFORM_BASE_OS)" -- cgit v1.1 From 1b923802dd01c998e648d1dfa741069fcca5f7f8 Mon Sep 17 00:00:00 2001 From: gitbuildkicker Date: Tue, 24 Jan 2017 16:41:44 -0800 Subject: MOB31T Change-Id: Ibe043d997008c9157fb59237ab088e5e3a82f22c (cherry picked from commit bbaab6139330ce3b8cac8e99e7b83f6395784100) --- core/build_id.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/build_id.mk b/core/build_id.mk index 8928324..ca6a6c6 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=MOB31K +export BUILD_ID=MOB31T -- cgit v1.1