mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2025-03-30 17:38:08 -04:00
Update build signing patches
This commit is contained in:
parent
fa2987d3dc
commit
8e475113ef
@ -1,18 +1,18 @@
|
||||
From de2ba147b18528eda7ee943865f8569823fbf3f9 Mon Sep 17 00:00:00 2001
|
||||
From 6b6a130924ba6d881d2db44d6382ab96fcb061d9 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Micay <danielmicay@gmail.com>
|
||||
Date: Wed, 23 Nov 2016 16:04:50 -0500
|
||||
Date: Tue, 3 Apr 2018 12:32:43 -0400
|
||||
Subject: [PATCH] Add optional automated signing
|
||||
|
||||
Change-Id: If5a888f12764c4928f5efbb2fda78f76fb445a2a
|
||||
Change-Id: I2a7efac25b3e48d3edcadcb9a57e9a7dbc7dfac0
|
||||
---
|
||||
core/Makefile | 43 +++++++++++++++++++++++++++++++++++++------
|
||||
1 file changed, 37 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/core/Makefile b/core/Makefile
|
||||
index 1d6bff0..d65fd27 100644
|
||||
index 3fb424733..207088b93 100644
|
||||
--- a/core/Makefile
|
||||
+++ b/core/Makefile
|
||||
@@ -418,6 +418,11 @@ ifneq ($(OTA_PACKAGE_SIGNING_KEY),)
|
||||
@@ -416,6 +416,11 @@ ifneq ($(OTA_PACKAGE_SIGNING_KEY),)
|
||||
DEFAULT_KEY_CERT_PAIR := $(OTA_PACKAGE_SIGNING_KEY)
|
||||
endif
|
||||
|
||||
@ -24,7 +24,7 @@ index 1d6bff0..d65fd27 100644
|
||||
# Rules that need to be present for the all targets, even
|
||||
# if they don't do anything.
|
||||
.PHONY: systemimage
|
||||
@@ -1030,11 +1035,15 @@ endif
|
||||
@@ -1033,11 +1038,15 @@ endif
|
||||
# substitute other keys for this one.
|
||||
OTA_PUBLIC_KEYS := $(DEFAULT_SYSTEM_DEV_CERTIFICATE).x509.pem
|
||||
|
||||
@ -44,7 +44,7 @@ index 1d6bff0..d65fd27 100644
|
||||
# Generate a file containing the keys that will be read by the
|
||||
# recovery binary.
|
||||
RECOVERY_INSTALL_OTA_KEYS := \
|
||||
@@ -1818,6 +1827,13 @@ $(BUILT_TARGET_FILES_PACKAGE): intermediates := $(intermediates)
|
||||
@@ -1823,6 +1832,13 @@ $(BUILT_TARGET_FILES_PACKAGE): intermediates := $(intermediates)
|
||||
$(BUILT_TARGET_FILES_PACKAGE): \
|
||||
zip_root := $(intermediates)/$(name)
|
||||
|
||||
@ -58,7 +58,7 @@ index 1d6bff0..d65fd27 100644
|
||||
# $(1): Directory to copy
|
||||
# $(2): Location to copy it to
|
||||
# The "ls -A" is to prevent "acp s/* d" from failing if s is empty.
|
||||
@@ -2182,6 +2198,12 @@ else
|
||||
@@ -2190,6 +2206,12 @@ else
|
||||
OTA_FROM_TARGET_SCRIPT := $(TARGET_RELEASETOOL_OTA_FROM_TARGET_SCRIPT)
|
||||
endif
|
||||
|
||||
@ -71,12 +71,12 @@ index 1d6bff0..d65fd27 100644
|
||||
ifeq ($(WITH_GMS),true)
|
||||
$(INTERNAL_OTA_PACKAGE_TARGET): backuptool := false
|
||||
else
|
||||
@@ -2209,7 +2231,16 @@ ifneq ($(BLOCK_BASED_OTA),false)
|
||||
@@ -2210,7 +2232,16 @@ ifneq ($(BLOCK_BASED_OTA),false)
|
||||
$(INTERNAL_OTA_PACKAGE_TARGET): block_based := --block
|
||||
endif
|
||||
|
||||
-$(INTERNAL_OTA_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE)
|
||||
+$(SIGNED_TARGET_FILES_PACKAGE): $(BUILT_TARGET_FILES_PACKAGE) $(DISTTOOLS)
|
||||
+$(SIGNED_TARGET_FILES_PACKAGE): $(BUILT_TARGET_FILES_PACKAGE)
|
||||
+ @echo "$(SIGN_TARGET_SCRIPT)" > $(PRODUCT_OUT)/sign_script_path
|
||||
+ @echo -e ${CL_YLW}"Sign target files:"${CL_RST}" $@"
|
||||
+ $(hide) $(SIGN_TARGET_SCRIPT) \
|
||||
@ -85,19 +85,19 @@ index 1d6bff0..d65fd27 100644
|
||||
+ $(BUILT_TARGET_FILES_PACKAGE) \
|
||||
+ $(SIGNED_TARGET_FILES_PACKAGE)
|
||||
+
|
||||
+$(INTERNAL_OTA_PACKAGE_TARGET): $(MAYBE_SIGNED_TARGET_FILES_PACKAGE) $(DISTTOOLS)
|
||||
+$(INTERNAL_OTA_PACKAGE_TARGET): $(MAYBE_SIGNED_TARGET_FILES_PACKAGE)
|
||||
@echo "$(OTA_FROM_TARGET_SCRIPT)" > $(PRODUCT_OUT)/ota_script_path
|
||||
@echo "$(override_device)" > $(PRODUCT_OUT)/ota_override_device
|
||||
@echo "Package OTA: $@"
|
||||
@@ -2221,7 +2252,7 @@ $(INTERNAL_OTA_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE)
|
||||
$(hide) PATH=$(foreach p,$(INTERNAL_USERIMAGES_BINARY_PATHS),$(p):)$$PATH MKBOOTIMG=$(MKBOOTIMG) \
|
||||
@@ -2220,7 +2251,7 @@ $(INTERNAL_OTA_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE)
|
||||
-k $(KEY_CERT_PAIR) \
|
||||
--backup=$(backuptool) \
|
||||
--override_device=$(override_device) $(override_prop) \
|
||||
$(if $(OEM_OTA_CONFIG), -o $(OEM_OTA_CONFIG)) \
|
||||
- $(BUILT_TARGET_FILES_PACKAGE) $@
|
||||
+ $(MAYBE_SIGNED_TARGET_FILES_PACKAGE) $@
|
||||
|
||||
CM_TARGET_PACKAGE := $(PRODUCT_OUT)/cm-$(CM_VERSION).zip
|
||||
CM_TARGET_PACKAGE := $(PRODUCT_OUT)/lineage-$(LINEAGE_VERSION).zip
|
||||
|
||||
--
|
||||
2.9.3
|
||||
2.16.3
|
||||
|
||||
|
@ -1,18 +1,18 @@
|
||||
From 3548eba76a04254a32fb16c3a39192aba8e4d187 Mon Sep 17 00:00:00 2001
|
||||
From 939b85183122daffc49c716807aed2b08f6c36ee Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Micay <danielmicay@gmail.com>
|
||||
Date: Thu, 8 Mar 2018 22:03:43 -0500
|
||||
Date: Tue, 3 Apr 2018 12:27:07 -0400
|
||||
Subject: [PATCH] Add optional automated signing
|
||||
|
||||
Change-Id: If38730428255a0de3939dfe1a0526b03ac948113
|
||||
Change-Id: Ie4d97c32227110d9f59b73d4dd163e5471711109
|
||||
---
|
||||
core/Makefile | 41 ++++++++++++++++++++++++++++++++++++++---
|
||||
1 file changed, 38 insertions(+), 3 deletions(-)
|
||||
core/Makefile | 41 +++++++++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 39 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/core/Makefile b/core/Makefile
|
||||
index b3f719a4f..b48328394 100644
|
||||
index 1fb76cf44..6ffb3a9c0 100644
|
||||
--- a/core/Makefile
|
||||
+++ b/core/Makefile
|
||||
@@ -520,6 +520,10 @@ $(call dist-for-goals,droidcore,$(SOONG_TO_CONVERT))
|
||||
@@ -504,6 +504,10 @@ $(call dist-for-goals,droidcore,$(SOONG_TO_CONVERT))
|
||||
# exist with the suffixes ".x509.pem" and ".pk8".
|
||||
DEFAULT_KEY_CERT_PAIR := $(DEFAULT_SYSTEM_DEV_CERTIFICATE)
|
||||
|
||||
@ -23,7 +23,7 @@ index b3f719a4f..b48328394 100644
|
||||
|
||||
# Rules that need to be present for the all targets, even
|
||||
# if they don't do anything.
|
||||
@@ -1220,6 +1224,16 @@ endif
|
||||
@@ -1204,6 +1208,16 @@ endif
|
||||
# substitute other keys for this one.
|
||||
OTA_PUBLIC_KEYS := $(DEFAULT_SYSTEM_DEV_CERTIFICATE).x509.pem
|
||||
|
||||
@ -40,7 +40,7 @@ index b3f719a4f..b48328394 100644
|
||||
# Generate a file containing the keys that will be read by the
|
||||
# recovery binary.
|
||||
RECOVERY_INSTALL_OTA_KEYS := \
|
||||
@@ -2316,6 +2330,13 @@ $(BUILT_TARGET_FILES_PACKAGE): intermediates := $(intermediates)
|
||||
@@ -2300,6 +2314,13 @@ $(BUILT_TARGET_FILES_PACKAGE): intermediates := $(intermediates)
|
||||
$(BUILT_TARGET_FILES_PACKAGE): \
|
||||
zip_root := $(intermediates)/$(name)
|
||||
|
||||
@ -54,7 +54,7 @@ index b3f719a4f..b48328394 100644
|
||||
# $(1): Directory to copy
|
||||
# $(2): Location to copy it to
|
||||
# The "ls -A" is to prevent "acp s/* d" from failing if s is empty.
|
||||
@@ -2774,6 +2795,12 @@ else
|
||||
@@ -2758,6 +2779,12 @@ else
|
||||
OTA_SCRIPT_OVERRIDE_DEVICE := $(TARGET_OTA_ASSERT_DEVICE)
|
||||
endif
|
||||
|
||||
@ -67,13 +67,13 @@ index b3f719a4f..b48328394 100644
|
||||
ifeq ($(WITH_GMS),true)
|
||||
$(INTERNAL_OTA_PACKAGE_TARGET): backuptool := false
|
||||
else
|
||||
@@ -2784,8 +2811,16 @@ else
|
||||
@@ -2768,7 +2795,17 @@ else
|
||||
endif
|
||||
endif
|
||||
|
||||
-$(INTERNAL_OTA_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) \
|
||||
- build/tools/releasetools/ota_from_target_files
|
||||
+$(SIGNED_TARGET_FILES_PACKAGE): $(BUILT_TARGET_FILES_PACKAGE) build/tools/releasetools/ota_from_target_files
|
||||
+$(SIGNED_TARGET_FILES_PACKAGE): $(BUILT_TARGET_FILES_PACKAGE) \
|
||||
+ build/tools/releasetools/sign_target_files_apks
|
||||
+ @echo "$(SIGN_TARGET_SCRIPT)" > $(PRODUCT_OUT)/sign_script_path
|
||||
+ @echo -e ${CL_YLW}"Sign target files:"${CL_RST}" $@"
|
||||
+ $(hide) $(SIGN_TARGET_SCRIPT) \
|
||||
@ -82,11 +82,11 @@ index b3f719a4f..b48328394 100644
|
||||
+ $(BUILT_TARGET_FILES_PACKAGE) \
|
||||
+ $(SIGNED_TARGET_FILES_PACKAGE)
|
||||
+
|
||||
+$(INTERNAL_OTA_PACKAGE_TARGET): $(MAYBE_SIGNED_TARGET_FILES_PACKAGE) build/tools/releasetools/ota_from_target_files
|
||||
+$(INTERNAL_OTA_PACKAGE_TARGET): $(MAYBE_SIGNED_TARGET_FILES_PACKAGE) \
|
||||
build/tools/releasetools/ota_from_target_files
|
||||
@echo "Package OTA: $@"
|
||||
$(hide) PATH=$(foreach p,$(INTERNAL_USERIMAGES_BINARY_PATHS),$(p):)$$PATH MKBOOTIMG=$(MKBOOTIMG) \
|
||||
./build/tools/releasetools/ota_from_target_files -v \
|
||||
@@ -2795,7 +2830,7 @@ $(INTERNAL_OTA_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) \
|
||||
@@ -2779,7 +2816,7 @@ $(INTERNAL_OTA_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) \
|
||||
-k $(KEY_CERT_PAIR) \
|
||||
--backup=$(backuptool) \
|
||||
$(if $(OEM_OTA_CONFIG), -o $(OEM_OTA_CONFIG)) \
|
||||
@ -96,5 +96,5 @@ index b3f719a4f..b48328394 100644
|
||||
.PHONY: otapackage
|
||||
otapackage: $(INTERNAL_OTA_PACKAGE_TARGET)
|
||||
--
|
||||
2.16.2
|
||||
2.16.3
|
||||
|
||||
|
@ -62,7 +62,7 @@ cp -r $prebuiltApps"android_vendor_FDroid_PrebuiltApps/." $base"vendor/fdroid_pr
|
||||
#optipng -strip all res*/images/*.png;
|
||||
|
||||
enterAndClear "build/make"
|
||||
patch -p1 < $patches"android_build/0001-Automated_Build_Signing.patch" #Automated build signing. Disclaimer: From CopperheadOS 13.0 #TODO: Fix showing test-keys
|
||||
patch -p1 < $patches"android_build/0001-Automated_Build_Signing.patch" #Automated build signing. Disclaimer: From CopperheadOS 13.0
|
||||
awk -i inplace '!/PRODUCT_EXTRA_RECOVERY_KEYS/' core/product.mk;
|
||||
sed -i 's/messaging/Silence/' target/product/*.mk; #Replace AOSP Messaging app with Silence
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user