mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-25 15:39:26 -05:00
15.1: More build fixes
This commit is contained in:
parent
910ee5ad76
commit
9b391e88f9
@ -1,103 +0,0 @@
|
||||
From de2ba147b18528eda7ee943865f8569823fbf3f9 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Micay <danielmicay@gmail.com>
|
||||
Date: Wed, 23 Nov 2016 16:04:50 -0500
|
||||
Subject: [PATCH] Add optional automated signing
|
||||
|
||||
Change-Id: If5a888f12764c4928f5efbb2fda78f76fb445a2a
|
||||
---
|
||||
core/Makefile | 43 +++++++++++++++++++++++++++++++++++++------
|
||||
1 file changed, 37 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/core/Makefile b/core/Makefile
|
||||
index 1d6bff0..d65fd27 100644
|
||||
--- a/core/Makefile
|
||||
+++ b/core/Makefile
|
||||
@@ -418,6 +418,11 @@ ifneq ($(OTA_PACKAGE_SIGNING_KEY),)
|
||||
DEFAULT_KEY_CERT_PAIR := $(OTA_PACKAGE_SIGNING_KEY)
|
||||
endif
|
||||
|
||||
+ifneq ($(SIGNING_KEY_DIR),)
|
||||
+ KEY_CERT_DIR := $(SIGNING_KEY_DIR)
|
||||
+ DEFAULT_KEY_CERT_PAIR := $(SIGNING_KEY_DIR)/releasekey
|
||||
+endif
|
||||
+
|
||||
# Rules that need to be present for the all targets, even
|
||||
# if they don't do anything.
|
||||
.PHONY: systemimage
|
||||
@@ -1030,11 +1035,15 @@ endif
|
||||
# substitute other keys for this one.
|
||||
OTA_PUBLIC_KEYS := $(DEFAULT_SYSTEM_DEV_CERTIFICATE).x509.pem
|
||||
|
||||
-ifneq ($(OTA_PACKAGE_SIGNING_KEY),)
|
||||
- OTA_PUBLIC_KEYS := $(OTA_PACKAGE_SIGNING_KEY).x509.pem
|
||||
- PRODUCT_EXTRA_RECOVERY_KEYS := $(DEFAULT_SYSTEM_DEV_CERTIFICATE)
|
||||
+ifneq ($(SIGNING_KEY_DIR),)
|
||||
+ OTA_PUBLIC_KEYS := $(SIGNING_KEY_DIR)/releasekey.x509.pem
|
||||
+ PRODUCT_EXTRA_RECOVERY_KEYS += $(SIGNING_KEY_DIR)/extra
|
||||
+else
|
||||
+ ifneq ($(OTA_PACKAGE_SIGNING_KEY),)
|
||||
+ OTA_PUBLIC_KEYS := $(OTA_PACKAGE_SIGNING_KEY).x509.pem
|
||||
+ PRODUCT_EXTRA_RECOVERY_KEYS := $(DEFAULT_SYSTEM_DEV_CERTIFICATE)
|
||||
+ endif
|
||||
endif
|
||||
-
|
||||
# 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)
|
||||
$(BUILT_TARGET_FILES_PACKAGE): \
|
||||
zip_root := $(intermediates)/$(name)
|
||||
|
||||
+SIGNED_TARGET_FILES_PACKAGE := $(intermediates)/signed-$(name).zip
|
||||
+MAYBE_SIGNED_TARGET_FILES_PACKAGE := $(BUILT_TARGET_FILES_PACKAGE)
|
||||
+
|
||||
+ifneq ($(SIGNING_KEY_DIR),)
|
||||
+ MAYBE_SIGNED_TARGET_FILES_PACKAGE := $(SIGNED_TARGET_FILES_PACKAGE)
|
||||
+endif
|
||||
+
|
||||
# $(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
|
||||
OTA_FROM_TARGET_SCRIPT := $(TARGET_RELEASETOOL_OTA_FROM_TARGET_SCRIPT)
|
||||
endif
|
||||
|
||||
+ifeq ($(TARGET_RELEASETOOL_SIGN_TARGET_SCRIPT),)
|
||||
+ SIGN_TARGET_SCRIPT := ./build/tools/releasetools/sign_target_files_apks
|
||||
+else
|
||||
+ SIGN_TARGET_SCRIPT := $(TARGET_RELEASETOOL_SIGN_TARGET_SCRIPT)
|
||||
+endif
|
||||
+
|
||||
ifeq ($(WITH_GMS),true)
|
||||
$(INTERNAL_OTA_PACKAGE_TARGET): backuptool := false
|
||||
else
|
||||
@@ -2209,7 +2231,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)
|
||||
+ @echo "$(SIGN_TARGET_SCRIPT)" > $(PRODUCT_OUT)/sign_script_path
|
||||
+ @echo -e ${CL_YLW}"Sign target files:"${CL_RST}" $@"
|
||||
+ $(hide) $(SIGN_TARGET_SCRIPT) \
|
||||
+ -d $(KEY_CERT_DIR) \
|
||||
+ -o \
|
||||
+ $(BUILT_TARGET_FILES_PACKAGE) \
|
||||
+ $(SIGNED_TARGET_FILES_PACKAGE)
|
||||
+
|
||||
+$(INTERNAL_OTA_PACKAGE_TARGET): $(MAYBE_SIGNED_TARGET_FILES_PACKAGE) $(DISTTOOLS)
|
||||
@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)
|
||||
--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
|
||||
|
||||
--
|
||||
2.9.3
|
||||
|
@ -1,13 +1,13 @@
|
||||
From a740f4f2065a382f2466bac575327ad4ec3407dd Mon Sep 17 00:00:00 2001
|
||||
From f97f345e14ab731b87c1f8330718db90d49061e7 Mon Sep 17 00:00:00 2001
|
||||
From: Tad <tad@spotco.us>
|
||||
Date: Mon, 12 Feb 2018 03:34:43 -0500
|
||||
Date: Mon, 12 Feb 2018 06:12:29 -0500
|
||||
Subject: [PATCH] Build time variable for AES-256 encryption
|
||||
|
||||
Change-Id: I3c826025bf98a180ddd17f47e8bf9e13b5252f3d
|
||||
Change-Id: I14efcfddabb6bd889b90cff59f26ca47c9883eb0
|
||||
---
|
||||
Android.mk | 4 ++++
|
||||
cryptfs.cpp | 11 +++++++++--
|
||||
2 files changed, 13 insertions(+), 2 deletions(-)
|
||||
Android.mk | 4 ++++
|
||||
cryptfs.cpp | 9 ++++++++-
|
||||
2 files changed, 12 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Android.mk b/Android.mk
|
||||
index 29a7852..2962180 100644
|
||||
@ -25,7 +25,7 @@ index 29a7852..2962180 100644
|
||||
vold_cflags += -DCONFIG_KERNEL_HAVE_EXFAT
|
||||
endif
|
||||
diff --git a/cryptfs.cpp b/cryptfs.cpp
|
||||
index f01929a..22ae3b6 100644
|
||||
index f01929a..7fb3ffa 100644
|
||||
--- a/cryptfs.cpp
|
||||
+++ b/cryptfs.cpp
|
||||
@@ -75,9 +75,17 @@ extern "C" {
|
||||
@ -46,7 +46,7 @@ index f01929a..22ae3b6 100644
|
||||
|
||||
#define KEY_IN_FOOTER "footer"
|
||||
|
||||
@@ -93,13 +101,12 @@ extern "C" {
|
||||
@@ -93,7 +101,6 @@ extern "C" {
|
||||
|
||||
#define TABLE_LOAD_RETRIES 10
|
||||
|
||||
@ -54,13 +54,6 @@ index f01929a..22ae3b6 100644
|
||||
#define RSA_KEY_SIZE_BYTES (RSA_KEY_SIZE / 8)
|
||||
#define RSA_EXPONENT 0x10001
|
||||
#define KEYMASTER_CRYPTFS_RATE_LIMIT 1 // Maximum one try per second
|
||||
|
||||
#define RETRY_MOUNT_ATTEMPTS 10
|
||||
-#define RETRY_MOUNT_DELAY_SECONDS 1
|
||||
+#define RETRY_MOUNT_DELAY_SECONDS 3
|
||||
|
||||
static unsigned char saved_master_key[KEY_LEN_BYTES];
|
||||
static char *saved_mount_point;
|
||||
--
|
||||
2.16.1
|
||||
|
||||
|
@ -20,8 +20,7 @@
|
||||
export androidWorkspace="/mnt/Drive-3/";
|
||||
export base=$androidWorkspace"Build/LineageOS-15.1/";
|
||||
|
||||
export SIGNING_KEY_DIR=$androidWorkspace"Signing_Keys";
|
||||
export OTA_PACKAGE_SIGNING_KEY=$SIGNING_KEY_DIR"/releasekey"
|
||||
export PRODUCT_DEFAULT_DEV_CERTIFICATE=$SIGNING_KEY_DIR"/releasekey"
|
||||
|
||||
export patches=$androidWorkspace"Patches/LineageOS-15.1/";
|
||||
export cvePatchesLinux=$androidWorkspace"Patches/Linux/";
|
||||
|
@ -26,9 +26,9 @@ sed -i '0,/wifi,cell,battery/s/wifi,cell,battery,dnd,flashlight,rotation,bt,airp
|
||||
|
||||
enter "packages/apps/Dialer"
|
||||
sed -i 's/FLP_DEFAULT = FLP_GOOGLE;/FLP_DEFAULT = FLP_OPENSTREETMAP;/' java/com/android/dialer/lookup/LookupSettings.java; #Change FLP to OpenStreetMap
|
||||
sed -i 's/LineageSettings.System.ENABLE_FORWARD_LOOKUP, 1)/CMSettings.System.ENABLE_FORWARD_LOOKUP, 0)/' java/com/android/dialer/lookup/LookupSettings.java; #Disable FLP
|
||||
sed -i 's/LineageSettings.System.ENABLE_PEOPLE_LOOKUP, 1)/CMSettings.System.ENABLE_PEOPLE_LOOKUP, 0)/' java/com/android/dialer/lookup/LookupSettings.java; #Disable PLP
|
||||
sed -i 's/LineageSettings.System.ENABLE_REVERSE_LOOKUP, 1)/CMSettings.System.ENABLE_REVERSE_LOOKUP, 0)/' java/com/android/dialer/lookup/LookupSettings.java; #Disable RLP
|
||||
sed -i 's/LineageSettings.System.ENABLE_FORWARD_LOOKUP, 1)/LineageSettings.System.ENABLE_FORWARD_LOOKUP, 0)/' java/com/android/dialer/lookup/LookupSettings.java; #Disable FLP
|
||||
sed -i 's/LineageSettings.System.ENABLE_PEOPLE_LOOKUP, 1)/LineageSettings.System.ENABLE_PEOPLE_LOOKUP, 0)/' java/com/android/dialer/lookup/LookupSettings.java; #Disable PLP
|
||||
sed -i 's/LineageSettings.System.ENABLE_REVERSE_LOOKUP, 1)/LineageSettings.System.ENABLE_REVERSE_LOOKUP, 0)/' java/com/android/dialer/lookup/LookupSettings.java; #Disable RLP
|
||||
|
||||
enter "packages/apps/FDroid"
|
||||
sed -i 's|DEFAULT_ROOTED = true;|DEFAULT_ROOTED = false;|' app/src/main/java/org/fdroid/fdroid/Preferences.java; #Hide root apps
|
||||
|
@ -46,7 +46,8 @@ gitReset() {
|
||||
export -f gitReset;
|
||||
|
||||
resetWorkspace() {
|
||||
repo forall -c 'git add -A && git reset --hard' && rm -rf packages/apps/{FDroid,GmsCore,Silence} out && repo sync -j20 --force-sync;
|
||||
#rm -rf packages/apps/{FDroid,GmsCore,Silence}
|
||||
repo forall -c 'git add -A && git reset --hard' && rm -rf out && repo sync -j20 --force-sync;
|
||||
}
|
||||
export -f resetWorkspace;
|
||||
|
||||
|
@ -58,7 +58,6 @@ echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "$ANDROID_HOME/licenses/a
|
||||
cp -r $patches"Fennec_DOS-Shim" $base"packages/apps/"; #Add a shim to install Fennec DOS without actually including the large APK
|
||||
|
||||
enterAndClear "build/make"
|
||||
#patch -p1 < $patches"android_build/0001-Automated_Build_Signing.patch" #Automated build signing. Disclaimer: From CopperheadOS 13.0 TODO: Rebase
|
||||
#patch -p1 < $patches"android_build/0002-JustArchis_Optimizations.patch" #JustArchi's Compiler Flags XXX: Breaks some devices, see buildAllNO3() TODO: Rebase
|
||||
sed -i 's/messaging/Silence/' target/product/*.mk; #Replace AOSP Messaging app with Silence
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user