From e65234f8eb80b29ff7298897ec22746c2375a11b Mon Sep 17 00:00:00 2001 From: Tad Date: Tue, 26 Jun 2018 21:47:45 -0400 Subject: [PATCH] Many changes - Allow OTA server to be set from init.sh - Fix link updating from Rebrand.sh - Update CVE patchers --- .../android_packages_apps_Updater/0001-Server.patch | 8 ++++---- .../android_packages_apps_Updater/0001-Server.patch | 8 ++++---- Scripts/LineageOS-14.1/Rebrand.sh | 5 +++-- .../CVE_Patchers/android_kernel_lge_mako.sh | 3 ++- .../CVE_Patchers/android_kernel_lge_msm8996.sh | 3 +-- Scripts/LineageOS-15.1/Rebrand.sh | 5 +++-- Scripts/init.sh | 4 +++- 7 files changed, 20 insertions(+), 16 deletions(-) diff --git a/Patches/LineageOS-14.1/android_packages_apps_Updater/0001-Server.patch b/Patches/LineageOS-14.1/android_packages_apps_Updater/0001-Server.patch index fa817d18..3adaafc5 100644 --- a/Patches/LineageOS-14.1/android_packages_apps_Updater/0001-Server.patch +++ b/Patches/LineageOS-14.1/android_packages_apps_Updater/0001-Server.patch @@ -1,4 +1,4 @@ -From d1d42f87977c344cc4e98551b073a89238c0f352 Mon Sep 17 00:00:00 2001 +From 4727712ba79e02a706735e0f01e094a0e4a8deb2 Mon Sep 17 00:00:00 2001 From: Tad 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 diff --git a/Patches/LineageOS-15.1/android_packages_apps_Updater/0001-Server.patch b/Patches/LineageOS-15.1/android_packages_apps_Updater/0001-Server.patch index fa817d18..3adaafc5 100644 --- a/Patches/LineageOS-15.1/android_packages_apps_Updater/0001-Server.patch +++ b/Patches/LineageOS-15.1/android_packages_apps_Updater/0001-Server.patch @@ -1,4 +1,4 @@ -From d1d42f87977c344cc4e98551b073a89238c0f352 Mon Sep 17 00:00:00 2001 +From 4727712ba79e02a706735e0f01e094a0e4a8deb2 Mon Sep 17 00:00:00 2001 From: Tad 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 diff --git a/Scripts/LineageOS-14.1/Rebrand.sh b/Scripts/LineageOS-14.1/Rebrand.sh index 942d36f6..5cfcea15 100644 --- a/Scripts/LineageOS-14.1/Rebrand.sh +++ b/Scripts/LineageOS-14.1/Rebrand.sh @@ -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; diff --git a/Scripts/LineageOS-15.1/CVE_Patchers/android_kernel_lge_mako.sh b/Scripts/LineageOS-15.1/CVE_Patchers/android_kernel_lge_mako.sh index 9559a761..4df501df 100644 --- a/Scripts/LineageOS-15.1/CVE_Patchers/android_kernel_lge_mako.sh +++ b/Scripts/LineageOS-15.1/CVE_Patchers/android_kernel_lge_mako.sh @@ -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 diff --git a/Scripts/LineageOS-15.1/CVE_Patchers/android_kernel_lge_msm8996.sh b/Scripts/LineageOS-15.1/CVE_Patchers/android_kernel_lge_msm8996.sh index ac59ebad..e048ed75 100644 --- a/Scripts/LineageOS-15.1/CVE_Patchers/android_kernel_lge_msm8996.sh +++ b/Scripts/LineageOS-15.1/CVE_Patchers/android_kernel_lge_msm8996.sh @@ -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 diff --git a/Scripts/LineageOS-15.1/Rebrand.sh b/Scripts/LineageOS-15.1/Rebrand.sh index 4a2c93bf..f9988e63 100644 --- a/Scripts/LineageOS-15.1/Rebrand.sh +++ b/Scripts/LineageOS-15.1/Rebrand.sh @@ -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; diff --git a/Scripts/init.sh b/Scripts/init.sh index 5ec921ca..fd9f12d0 100644 --- a/Scripts/init.sh +++ b/Scripts/init.sh @@ -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##*/};