Many changes

- Allow OTA server to be set from init.sh
- Fix link updating from Rebrand.sh
- Update CVE patchers
This commit is contained in:
Tad 2018-06-26 21:47:45 -04:00
parent af9126ffcb
commit e65234f8eb
7 changed files with 20 additions and 16 deletions

View File

@ -1,4 +1,4 @@
From d1d42f87977c344cc4e98551b073a89238c0f352 Mon Sep 17 00:00:00 2001
From 4727712ba79e02a706735e0f01e094a0e4a8deb2 Mon Sep 17 00:00:00 2001
From: Tad <tad@spotco.us>
Date: Fri, 6 Apr 2018 14:14:03 -0400
Subject: [PATCH] Switch to our update server
@ -9,7 +9,7 @@ Change-Id: Ief2f6ae8952de1a5a8e3ca73989fab42ca22f622
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/src/org/lineageos/updater/misc/Utils.java b/src/org/lineageos/updater/misc/Utils.java
index 6b15e2d..8008156 100644
index 67895da..d4d3379 100644
--- a/src/org/lineageos/updater/misc/Utils.java
+++ b/src/org/lineageos/updater/misc/Utils.java
@@ -147,16 +147,8 @@ public class Utils {
@ -26,10 +26,10 @@ index 6b15e2d..8008156 100644
- return serverUrl.replace("{device}", device)
- .replace("{type}", type)
- .replace("{incr}", incrementalVersion);
+ return "https://divestos.xyz/updater.php?base=LineageOS&device=" + device + "&inc=" + incrementalVersion;
+ return "0OTASERVER0?base=LineageOS&device=" + device + "&inc=" + incrementalVersion;
}
public static String getChangelogURL(Context context) {
--
2.17.0
2.18.0

View File

@ -1,4 +1,4 @@
From d1d42f87977c344cc4e98551b073a89238c0f352 Mon Sep 17 00:00:00 2001
From 4727712ba79e02a706735e0f01e094a0e4a8deb2 Mon Sep 17 00:00:00 2001
From: Tad <tad@spotco.us>
Date: Fri, 6 Apr 2018 14:14:03 -0400
Subject: [PATCH] Switch to our update server
@ -9,7 +9,7 @@ Change-Id: Ief2f6ae8952de1a5a8e3ca73989fab42ca22f622
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/src/org/lineageos/updater/misc/Utils.java b/src/org/lineageos/updater/misc/Utils.java
index 6b15e2d..8008156 100644
index 67895da..d4d3379 100644
--- a/src/org/lineageos/updater/misc/Utils.java
+++ b/src/org/lineageos/updater/misc/Utils.java
@@ -147,16 +147,8 @@ public class Utils {
@ -26,10 +26,10 @@ index 6b15e2d..8008156 100644
- return serverUrl.replace("{device}", device)
- .replace("{type}", type)
- .replace("{incr}", incrementalVersion);
+ return "https://divestos.xyz/updater.php?base=LineageOS&device=" + device + "&inc=" + incrementalVersion;
+ return "0OTASERVER0?base=LineageOS&device=" + device + "&inc=" + incrementalVersion;
}
public static String getChangelogURL(Context context) {
--
2.17.0
2.18.0

View File

@ -38,16 +38,17 @@ sed -i '/.*cmupdate_settings_title/s/LineageOS/'"$REBRAND_NAME"'/' res/values*/c
sed -i '/.*mod_version/s/LineageOS/'"$REBRAND_NAME"'/' res/values*/cm_strings.xml;
enter "packages/apps/SetupWizard";
sed -i 's|http://lineageos.org/legal|https://divestos.xyz/index.php?page=privacy_policy|' src/com/cyanogenmod/setupwizard/LineageSettingsActivity.java;
sed -i 's|http://lineageos.org/legal|'"$REBRAND_LINK_PRIVACY"'|' src/com/cyanogenmod/setupwizard/LineageSettingsActivity.java;
sed -i '/.*setup_services/s/LineageOS/'"$REBRAND_NAME"'/' res/values*/strings.xml;
sed -i '/.*services_explanation/s/LineageOS/'"$REBRAND_NAME"'/' res/values*/strings.xml;
cp "$patchesCommon/android_packages_apps_SetupWizard/logo.xml" "res/drawable/logo.xml"; #Replace Lineage logo with ours
enter "packages/apps/Updater";
sed -i 's|0OTASERVER0|'"$REBRAND_OTA_SERVER"'|' src/org/lineageos/updater/misc/Utils.java;
sed -i 's|>LineageOS|>'"$REBRAND_NAME"'|' res/values*/strings.xml;
enter "vendor/cm";
sed -i 's|https://lineageos.org/legal|'"$REBRAND_LEGAL"'|' config/common.mk;
sed -i 's|https://lineageos.org/legal|'"$REBRAND_LINK_ABOUT"'|' config/common.mk;
sed -i '/.*ZIPPATH=/s/lineage/'"$REBRAND_ZIP_PREFIX"'/' build/envsetup.sh;
rm -rf bootanimation;

View File

@ -5,6 +5,7 @@ git apply $cvePatchesLinux/0012-Copperhead-Deny_USB/3.4/3.4-Backport.patch
git apply $cvePatchesLinux/0013-syskaller-Misc/ANY/0009.patch
git apply $cvePatchesLinux/CVE-2016-3894/ANY/0001.patch
git apply $cvePatchesLinux/CVE-2016-6828/ANY/0001.patch
git apply $cvePatchesLinux/CVE-2016-7910/ANY/0001.patch
git apply $cvePatchesLinux/CVE-2017-0750/ANY/0001.patch
git apply $cvePatchesLinux/CVE-2017-11473/ANY/0001.patch
git apply $cvePatchesLinux/CVE-2017-16526/^4.13/0001.patch
@ -17,5 +18,5 @@ git apply $cvePatchesLinux/CVE-2017-16USB/ANY/0006.patch
git apply $cvePatchesLinux/CVE-2017-17806/ANY/0001.patch
git apply $cvePatchesLinux/Untracked/ANY/0008-nfsd-check-for-oversized-NFSv2-v3-arguments.patch
git apply $cvePatchesLinux/CVE-2017-0750/ANY/0001.patch
editKernelLocalversion "-dos.p17"
editKernelLocalversion "-dos.p18"
cd $base

View File

@ -61,11 +61,10 @@ git apply $cvePatchesLinux/CVE-2017-5669/^4.9/0001.patch
git apply $cvePatchesLinux/CVE-2017-5972/ANY/0002.patch
git apply $cvePatchesLinux/CVE-2017-6001/^4.9/0002.patch
git apply $cvePatchesLinux/CVE-2017-6348/^4.9/0001.patch
git apply $cvePatchesLinux/CVE-2018-1092/ANY/0001.patch
git apply $cvePatchesLinux/CVE-2018-5849/ANY/0001.patch
git apply $cvePatchesLinux/CVE-2016-6693/ANY/0001.patch
git apply $cvePatchesLinux/CVE-2016-6696/ANY/0001.patch
git apply $cvePatchesLinux/CVE-2017-0610/ANY/0001.patch
git apply $cvePatchesLinux/CVE-2017-0750/ANY/0001.patch
editKernelLocalversion "-dos.p67"
editKernelLocalversion "-dos.p66"
cd $base

View File

@ -50,16 +50,17 @@ enter "packages/apps/Settings";
sed -i '/.*lineagelicense_title/s/LineageOS/'"$REBRAND_NAME"'/' res/values*/cm_strings.xml;
enter "packages/apps/SetupWizard";
sed -i 's|http://lineageos.org/legal|https://divestos.xyz/index.php?page=privacy_policy|' src/org/lineageos/setupwizard/LineageSettingsActivity.java;
sed -i 's|http://lineageos.org/legal|'"$REBRAND_LINK_PRIVACY"'|' src/org/lineageos/setupwizard/LineageSettingsActivity.java;
sed -i '/.*setup_services/s/LineageOS/'"$REBRAND_NAME"'/' res/values*/strings.xml;
sed -i '/.*services_explanation/s/LineageOS/'"$REBRAND_NAME"'/' res/values*/strings.xml;
cp "$patchesCommon/android_packages_apps_SetupWizard/logo.xml" "res/drawable/logo.xml"; #Replace Lineage logo with ours
enter "packages/apps/Updater";
sed -i 's|0OTASERVER0|'"$REBRAND_OTA_SERVER"'|' src/org/lineageos/updater/misc/Utils.java;
sed -i 's|>LineageOS|>'"$REBRAND_NAME"'|' res/values*/strings.xml;
enter "vendor/lineage";
sed -i 's|https://lineageos.org/legal|'"$REBRAND_LEGAL"'|' build/core/main_version.mk
sed -i 's|https://lineageos.org/legal|'"$REBRAND_LINK_ABOUT"'|' build/core/main_version.mk
sed -i '/.*ZIPPATH=/s/lineage/'"$REBRAND_ZIP_PREFIX"'/' build/envsetup.sh;
sed -i '/LINEAGE_TARGET_PACKAGE/s/lineage/'"$REBRAND_ZIP_PREFIX"'/' build/tasks/bacon.mk;
rm -rf bootanimation;

View File

@ -39,7 +39,9 @@ export REBRAND_BOOTANIMATION_FONT="Fira-Sans-Bold"; #Options: $ convert -list fo
export REBRAND_BOOTANIMATION_STYLE="plasma"; #Options: gradient, plasma
#export REBRAND_BOOTANIMATION_COLOR="#FF5722-#FF8A65"; #gradient
export REBRAND_BOOTANIMATION_COLOR="#FF5722-#03A9F4"; #plasma
export REBRAND_LEGAL="https://divestos.xyz/index.php?page=privacy_policy";
export REBRAND_LINK_ABOUT="https://divestos.xyz/index.php?page=about";
export REBRAND_LINK_PRIVACY="https://divestos.xyz/index.php?page=privacy_policy";
export REBRAND_OTA_SERVER="https://divestos.xyz/updater.php";
#END OF USER CONFIGURABLE OPTIONS
BUILD_WORKING_DIR=${PWD##*/};