From cc28df15f7f99a74ff45eca3f9352e70e7647439 Mon Sep 17 00:00:00 2001 From: Tad Date: Sun, 9 Feb 2020 13:52:25 -0500 Subject: [PATCH] Cherry picks + fix 5 failing devices --- .../CVE_Patchers/android_kernel_cyanogen_msm8916.sh | 2 +- Scripts/LineageOS-14.1/Functions.sh | 2 ++ .../CVE_Patchers/android_kernel_cyanogen_msm8916.sh | 2 +- Scripts/LineageOS-15.1/Functions.sh | 4 +++- .../CVE_Patchers/android_kernel_cyanogen_msm8916.sh | 2 +- .../CVE_Patchers/android_kernel_yandex_sdm660.sh | 2 +- Scripts/LineageOS-16.0/Functions.sh | 10 ++++++---- Scripts/LineageOS-16.0/Patch.sh | 6 ++++++ Scripts/init.sh | 2 ++ 9 files changed, 23 insertions(+), 9 deletions(-) diff --git a/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_cyanogen_msm8916.sh b/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_cyanogen_msm8916.sh index c3416135..da7b07e9 100644 --- a/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_cyanogen_msm8916.sh +++ b/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_cyanogen_msm8916.sh @@ -131,7 +131,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-11918/ANY/0001.patch git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-11939/ANY/0001.patch git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-11987/ANY/0001.patch git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-13053/^4.17.3/0001.patch -git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-13913/ANY/0001.patch +#git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-13913/ANY/0001.patch git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-14634/ANY/0001.patch git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-14734/^4.17.11/0001.patch git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-15594/^4.18.1/0001.patch diff --git a/Scripts/LineageOS-14.1/Functions.sh b/Scripts/LineageOS-14.1/Functions.sh index 7dbf2161..354cc7e1 100644 --- a/Scripts/LineageOS-14.1/Functions.sh +++ b/Scripts/LineageOS-14.1/Functions.sh @@ -117,6 +117,8 @@ patchWorkspace() { repopick -it n_asb_09-2018-qcom; repopick -it ibss-mode-nougat; repopick -it n-netd; + repopick -it n-asb-2020-02; + repopick -i 268340; #update webview export DOS_GRAPHENE_MALLOC=false; #patches apply, compile fails diff --git a/Scripts/LineageOS-15.1/CVE_Patchers/android_kernel_cyanogen_msm8916.sh b/Scripts/LineageOS-15.1/CVE_Patchers/android_kernel_cyanogen_msm8916.sh index 123af0ee..31992d6a 100644 --- a/Scripts/LineageOS-15.1/CVE_Patchers/android_kernel_cyanogen_msm8916.sh +++ b/Scripts/LineageOS-15.1/CVE_Patchers/android_kernel_cyanogen_msm8916.sh @@ -112,7 +112,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-11918/ANY/0001.patch git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-11939/ANY/0001.patch git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-11987/ANY/0001.patch git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-13053/^4.17.3/0001.patch -git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-13913/ANY/0001.patch +#git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-13913/ANY/0001.patch git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-14634/ANY/0001.patch git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-14734/^4.17.11/0001.patch git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-15594/^4.18.1/0001.patch diff --git a/Scripts/LineageOS-15.1/Functions.sh b/Scripts/LineageOS-15.1/Functions.sh index 388bd2cc..a39a86de 100644 --- a/Scripts/LineageOS-15.1/Functions.sh +++ b/Scripts/LineageOS-15.1/Functions.sh @@ -100,7 +100,9 @@ export -f buildAll; patchWorkspace() { if [ "$DOS_MALWARE_SCAN_ENABLED" = true ]; then scanForMalware false "$DOS_PREBUILT_APPS $DOS_BUILD_BASE/build $DOS_BUILD_BASE/device $DOS_BUILD_BASE/vendor/lineage"; fi; - #source build/envsetup.sh; + source build/envsetup.sh; + repopick -it O_asb_2020-02; + repopick -i 268340; #update webview export DOS_GRAPHENE_MALLOC=false; #patches apply, compile fails diff --git a/Scripts/LineageOS-16.0/CVE_Patchers/android_kernel_cyanogen_msm8916.sh b/Scripts/LineageOS-16.0/CVE_Patchers/android_kernel_cyanogen_msm8916.sh index de4b1e1a..694a40e4 100644 --- a/Scripts/LineageOS-16.0/CVE_Patchers/android_kernel_cyanogen_msm8916.sh +++ b/Scripts/LineageOS-16.0/CVE_Patchers/android_kernel_cyanogen_msm8916.sh @@ -111,7 +111,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-11918/ANY/0001.patch git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-11939/ANY/0001.patch git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-11987/ANY/0001.patch git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-13053/^4.17.3/0001.patch -git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-13913/ANY/0001.patch +#git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-13913/ANY/0001.patch git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-14634/ANY/0001.patch git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-14734/^4.17.11/0001.patch git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-15594/^4.18.1/0001.patch diff --git a/Scripts/LineageOS-16.0/CVE_Patchers/android_kernel_yandex_sdm660.sh b/Scripts/LineageOS-16.0/CVE_Patchers/android_kernel_yandex_sdm660.sh index 32073a35..f18c9823 100644 --- a/Scripts/LineageOS-16.0/CVE_Patchers/android_kernel_yandex_sdm660.sh +++ b/Scripts/LineageOS-16.0/CVE_Patchers/android_kernel_yandex_sdm660.sh @@ -51,7 +51,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2019-10567/ANY/0003.patch git apply $DOS_PATCHES_LINUX_CVES/CVE-2019-10567/ANY/0004.patch git apply $DOS_PATCHES_LINUX_CVES/CVE-2019-10584/ANY/0002.patch git apply $DOS_PATCHES_LINUX_CVES/CVE-2019-10614/ANY/0002.patch -git apply $DOS_PATCHES_LINUX_CVES/CVE-2019-11599/^4.9/0002.patch +#git apply $DOS_PATCHES_LINUX_CVES/CVE-2019-11599/^4.9/0002.patch git apply $DOS_PATCHES_LINUX_CVES/CVE-2019-12378/^5.1.5/0001.patch git apply $DOS_PATCHES_LINUX_CVES/CVE-2019-12456/^5.1.5/0001.patch git apply $DOS_PATCHES_LINUX_CVES/CVE-2019-12614/^5.1.6/0001.patch diff --git a/Scripts/LineageOS-16.0/Functions.sh b/Scripts/LineageOS-16.0/Functions.sh index 43376300..f00df30e 100644 --- a/Scripts/LineageOS-16.0/Functions.sh +++ b/Scripts/LineageOS-16.0/Functions.sh @@ -59,7 +59,7 @@ buildAll() { #buildDevice flo; #broken encryption buildDevice mako; #SD410 - buildDevice crackling; #broken + buildDevice crackling; #SD600 buildDevice jfltexx; #SD800 @@ -80,7 +80,7 @@ buildAll() { #buildDeviceUserDebug clark; #permissive + needs manual patching - fwb xml: fused: dangling tag buildDevice ether; #SD615 - buildDevice kipper; #broken + buildDevice kipper; #SD820 buildDevice griffin; buildDevice z2_plus verity; #broken @@ -90,7 +90,7 @@ buildAll() { #SD625 buildDevice zenfone3; #needs manual patching - fwb xml: fused: dangling tag #SD835 - buildDevice cheryl; #broken + buildDevice cheryl; buildDevice mata verity; buildDevice taimen avb; buildDevice walleye avb; @@ -112,7 +112,9 @@ export -f buildAll; patchWorkspace() { if [ "$DOS_MALWARE_SCAN_ENABLED" = true ]; then scanForMalware false "$DOS_PREBUILT_APPS $DOS_BUILD_BASE/build $DOS_BUILD_BASE/device $DOS_BUILD_BASE/vendor/lineage"; fi; - #source build/envsetup.sh; + source build/envsetup.sh; + repopick -it P_asb_2020-02; + repopick -i 268340; #update webview source "$DOS_SCRIPTS/Patch.sh"; source "$DOS_SCRIPTS/Defaults.sh"; diff --git a/Scripts/LineageOS-16.0/Patch.sh b/Scripts/LineageOS-16.0/Patch.sh index 5d36134d..0fe98fda 100644 --- a/Scripts/LineageOS-16.0/Patch.sh +++ b/Scripts/LineageOS-16.0/Patch.sh @@ -247,6 +247,9 @@ awk -i inplace '!/TARGET_RELEASETOOLS_EXTENSIONS/' BoardConfig.mk; #rm setup-makefiles.sh; #broken, deblobber will still function #XXX: remove atfwd and cne from vendor makefiles +enterAndClear "device/motorola/griffin"; +git revert 0a4257bd3b6f76010f4f7c564c4b3d7794af0640; #breaks build + enterAndClear "device/oppo/common"; awk -i inplace '!/TARGET_RELEASETOOLS_EXTENSIONS/' BoardConfigCommon.mk; #disable releasetools to fix delta ota generation @@ -256,6 +259,9 @@ sed -i "s/TZ.BF.2.0-2.0.0134/TZ.BF.2.0-2.0.0134|TZ.BF.2.0-2.0.0137/" board-info. enterAndClear "kernel/google/marlin"; git revert --no-edit 568f99db3c9a590912f533fa734c46cf7a25dcbd; #Resurrect dm-verity +enterAndClear "kernel/google/wahoo"; +sed -i 's/asm(SET_PSTATE_UAO(1));/asm(SET_PSTATE_UAO(1)); return 0;/' arch/arm64/mm/fault.c; #fix build with CONFIG_ARM64_UAO + enter "vendor/google"; echo "" > atv/atv-common.mk; diff --git a/Scripts/init.sh b/Scripts/init.sh index 4fce35fd..510b2d3a 100644 --- a/Scripts/init.sh +++ b/Scripts/init.sh @@ -169,3 +169,5 @@ unalias cp &>/dev/null || true; unalias mv &>/dev/null || true; unalias rm &>/dev/null || true; unalias ln &>/dev/null || true; + +alias cp='cp --reflink=auto'