From 35036e694dfd6aaf5d45d8aafb9d3dc33d8e2f2f Mon Sep 17 00:00:00 2001 From: Tad Date: Wed, 8 Sep 2021 19:52:56 -0400 Subject: [PATCH] Small tweaks Signed-off-by: Tad --- Scripts/Common/Fix_CVE_Patchers.sh | 2 +- .../CVE_Patchers/android_kernel_htc_msm8960.sh | 2 +- Scripts/LineageOS-14.1/Functions.sh | 2 ++ Scripts/LineageOS-14.1/Patch.sh | 2 +- Scripts/LineageOS-15.1/Functions.sh | 3 ++- Scripts/LineageOS-15.1/Patch.sh | 3 ++- Scripts/LineageOS-16.0/Patch.sh | 2 +- Scripts/LineageOS-17.1/Patch.sh | 2 +- Scripts/LineageOS-18.1/Functions.sh | 5 +++-- Scripts/LineageOS-18.1/Patch.sh | 2 +- 10 files changed, 15 insertions(+), 10 deletions(-) diff --git a/Scripts/Common/Fix_CVE_Patchers.sh b/Scripts/Common/Fix_CVE_Patchers.sh index 1e8deee4..bde50b5f 100644 --- a/Scripts/Common/Fix_CVE_Patchers.sh +++ b/Scripts/Common/Fix_CVE_Patchers.sh @@ -50,7 +50,7 @@ commentPatches android_kernel_google_wahoo.sh "CVE-2019-14047/ANY/0002.patch" "C commentPatches android_kernel_google_yellowstone.sh "0001-LinuxIncrementals/3.10/3.10.0098-0099.patch" "CVE-2018-9514"; commentPatches android_kernel_huawei_angler.sh "CVE-2014-8559"; commentPatches android_kernel_htc_flounder.sh "CVE-2018-9514"; -commentPatches android_kernel_htc_msm8960.sh "CVE-2018-10876"; +commentPatches android_kernel_htc_msm8960.sh "CVE-2018-10876" "CVE-2021-0695"; commentPatches android_kernel_htc_msm8974.sh "CVE-2016-8393"; commentPatches android_kernel_htc_msm8994.sh "CVE-2016-8394/ANY/0001.patch" "CVE-2017-13166" "CVE-2018-3585" "CVE-2018-9514"; commentPatches android_kernel_lge_bullhead.sh "CVE-2014-8559"; diff --git a/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_htc_msm8960.sh b/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_htc_msm8960.sh index 2bb23761..5448e6a3 100644 --- a/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_htc_msm8960.sh +++ b/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_htc_msm8960.sh @@ -329,7 +329,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2020-28974/^5.10/0001.patch git apply $DOS_PATCHES_LINUX_CVES/CVE-2020-29371/^5.9/0002.patch git apply $DOS_PATCHES_LINUX_CVES/CVE-2020-29661/3.4/0008.patch git apply $DOS_PATCHES_LINUX_CVES/CVE-2021-0512/^5.10/0002.patch -git apply $DOS_PATCHES_LINUX_CVES/CVE-2021-0695/ANY/0001.patch +#git apply $DOS_PATCHES_LINUX_CVES/CVE-2021-0695/ANY/0001.patch git apply $DOS_PATCHES_LINUX_CVES/CVE-2021-3178/^5.11/0001.patch git apply $DOS_PATCHES_LINUX_CVES/CVE-2021-3483/^5.12/0001.patch git apply $DOS_PATCHES_LINUX_CVES/CVE-2021-3612/^5.12/0001.patch diff --git a/Scripts/LineageOS-14.1/Functions.sh b/Scripts/LineageOS-14.1/Functions.sh index 7e53c7e0..09f77cd7 100644 --- a/Scripts/LineageOS-14.1/Functions.sh +++ b/Scripts/LineageOS-14.1/Functions.sh @@ -96,6 +96,8 @@ patchWorkspace() { source build/envsetup.sh; #repopick -it bt-sbc-hd-dualchannel-nougat; repopick -it n-asb-2021-08; + repopick -i 315718; #CVE-2021-1957 + repopick -it n-asb-2021-09; source "$DOS_SCRIPTS/Patch.sh"; source "$DOS_SCRIPTS_COMMON/Copy_Keys.sh"; diff --git a/Scripts/LineageOS-14.1/Patch.sh b/Scripts/LineageOS-14.1/Patch.sh index 160d6cf5..d92bd66e 100644 --- a/Scripts/LineageOS-14.1/Patch.sh +++ b/Scripts/LineageOS-14.1/Patch.sh @@ -69,7 +69,7 @@ patch -p1 < "$DOS_PATCHES/android_build/0001-OTA_Keys.patch"; #Add correct keys sed -i '50i$(my_res_package): PRIVATE_AAPT_FLAGS += --auto-add-overlay' core/aapt2.mk; #Enable auto-add-overlay for packages, this allows the vendor overlay to easily work across all branches. sed -i '296iLOCAL_AAPT_FLAGS += --auto-add-overlay' core/package_internal.mk; sed -i 's/messaging/Silence/' target/product/aosp_base_telephony.mk; #Replace the Messaging app with Silence -sed -i 's/2021-06-05/2021-08-05/' core/version_defaults.mk; #Bump Security String to 2021-08-05 #n-asb-2021-08 #XXX +sed -i 's/2021-06-05/2021-09-05/' core/version_defaults.mk; #Bump Security String #n-asb-2021-08 #n-asb-2021-09 #XXX fi; if enterAndClear "device/qcom/sepolicy"; then diff --git a/Scripts/LineageOS-15.1/Functions.sh b/Scripts/LineageOS-15.1/Functions.sh index 7db3337e..8d7b0ee9 100644 --- a/Scripts/LineageOS-15.1/Functions.sh +++ b/Scripts/LineageOS-15.1/Functions.sh @@ -85,7 +85,8 @@ patchWorkspace() { umask 0022; 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_2021-09; source "$DOS_SCRIPTS/Patch.sh"; source "$DOS_SCRIPTS_COMMON/Copy_Keys.sh"; diff --git a/Scripts/LineageOS-15.1/Patch.sh b/Scripts/LineageOS-15.1/Patch.sh index 9480ab1b..9398a148 100644 --- a/Scripts/LineageOS-15.1/Patch.sh +++ b/Scripts/LineageOS-15.1/Patch.sh @@ -67,6 +67,7 @@ patch -p1 < "$DOS_PATCHES/android_build/0001-OTA_Keys.patch"; #Add correct keys patch -p1 < "$DOS_PATCHES/android_build/0002-Enable_fwrapv.patch"; #Use -fwrapv at a minimum (GrapheneOS) sed -i '57i$(my_res_package): PRIVATE_AAPT_FLAGS += --auto-add-overlay' core/aapt2.mk; #Enable auto-add-overlay for packages, this allows the vendor overlay to easily work across all branches. sed -i 's/messaging/Silence/' target/product/aosp_base_telephony.mk target/product/treble_common.mk; #Replace the Messaging app with Silence +sed -i 's/2021-08-05/2021-09-05/' core/version_defaults.mk; #Bump Security String #O_asb_2021-09 #XXX fi; if enterAndClear "build/soong"; then @@ -108,7 +109,7 @@ changeDefaultDNS; #Change the default DNS servers patch -p1 < "$DOS_PATCHES/android_frameworks_base/0006-Disable_Analytics.patch"; #Disable/reduce functionality of various ad/analytics libraries patch -p1 < "$DOS_PATCHES_COMMON/android_frameworks_base/0001-Browser_No_Location.patch"; #Don't grant location permission to system browsers (GrapheneOS) patch -p1 < "$DOS_PATCHES_COMMON/android_frameworks_base/0003-SUPL_No_IMSI.patch"; #Don't send IMSI to SUPL (MSe1969) -patch -p1 < "$DOS_PATCHES_COMMON/android_frameworks_base/0004-Fingerprint_Lockout.patch"; #Enable fingerprint lockout after five failed attempts (GrapheneOS) +patch -p1 < "$DOS_PATCHES_COMMON/android_frameworks_base/0004-Fingerprint_Lockout.patch"; #Enable fingerprint lockout after three failed attempts (GrapheneOS) if [ "$DOS_MICROG_INCLUDED" != "FULL" ]; then rm -rf packages/CompanionDeviceManager; fi; #Used to support Android Wear (which hard depends on GMS) rm -rf packages/Osu packages/Osu2; #Automatic Wi-Fi connection non-sense rm -rf packages/PrintRecommendationService; #Creates popups to install proprietary print apps diff --git a/Scripts/LineageOS-16.0/Patch.sh b/Scripts/LineageOS-16.0/Patch.sh index df96d78a..b3f9cc8f 100644 --- a/Scripts/LineageOS-16.0/Patch.sh +++ b/Scripts/LineageOS-16.0/Patch.sh @@ -117,7 +117,7 @@ patch -p1 < "$DOS_PATCHES/android_frameworks_base/0008-Browser_No_Location.patch patch -p1 < "$DOS_PATCHES/android_frameworks_base/0009-SystemUI_No_Permission_Review.patch"; #Allow SystemUI to directly manage Bluetooth/WiFi (GrapheneOS) if [ "$DOS_GRAPHENE_EXEC" = true ]; then patch -p1 < "$DOS_PATCHES/android_frameworks_base/0010-Exec_Based_Spawning.patch"; fi; #Add exec-based spawning support (GrapheneOS) patch -p1 < "$DOS_PATCHES_COMMON/android_frameworks_base/0003-SUPL_No_IMSI.patch"; #Don't send IMSI to SUPL (MSe1969) -patch -p1 < "$DOS_PATCHES_COMMON/android_frameworks_base/0004-Fingerprint_Lockout.patch"; #Enable fingerprint lockout after five failed attempts (GrapheneOS) +patch -p1 < "$DOS_PATCHES_COMMON/android_frameworks_base/0004-Fingerprint_Lockout.patch"; #Enable fingerprint lockout after three failed attempts (GrapheneOS) sed -i '301i\ if(packageList != null && packageList.length() > 0) { packageList += ","; } packageList += "net.sourceforge.opencamera";' core/java/android/hardware/Camera.java; #Add Open Camera to aux camera allowlist if [ "$DOS_MICROG_INCLUDED" != "FULL" ]; then rm -rf packages/CompanionDeviceManager; fi; #Used to support Android Wear (which hard depends on GMS) rm -rf packages/PrintRecommendationService; #Creates popups to install proprietary print apps diff --git a/Scripts/LineageOS-17.1/Patch.sh b/Scripts/LineageOS-17.1/Patch.sh index b2d8185c..36df0805 100644 --- a/Scripts/LineageOS-17.1/Patch.sh +++ b/Scripts/LineageOS-17.1/Patch.sh @@ -113,7 +113,7 @@ patch -p1 < "$DOS_PATCHES/android_frameworks_base/0008-Browser_No_Location.patch patch -p1 < "$DOS_PATCHES/android_frameworks_base/0009-SystemUI_No_Permission_Review.patch"; #Allow SystemUI to directly manage Bluetooth/WiFi (GrapheneOS) if [ "$DOS_GRAPHENE_EXEC" = true ]; then patch -p1 < "$DOS_PATCHES/android_frameworks_base/0010-Exec_Based_Spawning.patch"; fi; #add exec-based spawning support (GrapheneOS) patch -p1 < "$DOS_PATCHES/android_frameworks_base/0003-SUPL_No_IMSI.patch"; #Don't send IMSI to SUPL (MSe1969) -patch -p1 < "$DOS_PATCHES/android_frameworks_base/0004-Fingerprint_Lockout.patch"; #Enable fingerprint lockout after five failed attempts (GrapheneOS) +patch -p1 < "$DOS_PATCHES/android_frameworks_base/0004-Fingerprint_Lockout.patch"; #Enable fingerprint lockout after three failed attempts (GrapheneOS) if [ "$DOS_MICROG_INCLUDED" != "FULL" ]; then rm -rf packages/CompanionDeviceManager; fi; #Used to support Android Wear (which hard depends on GMS) #sed -i '295i\ if(packageList != null && packageList.size() > 0) { packageList.add("net.sourceforge.opencamera"); }' core/java/android/hardware/Camera.java; #Add Open Camera to aux camera allowlist XXX: needs testing, broke boot last time rm -rf packages/OsuLogin; #Automatic Wi-Fi connection non-sense diff --git a/Scripts/LineageOS-18.1/Functions.sh b/Scripts/LineageOS-18.1/Functions.sh index ff5f74da..e754c4f7 100644 --- a/Scripts/LineageOS-18.1/Functions.sh +++ b/Scripts/LineageOS-18.1/Functions.sh @@ -95,8 +95,8 @@ buildAll() { buildDevice pro1 avb; buildDevice crosshatch avb; buildDevice blueline avb; - buildDevice enchilada avb; - buildDevice fajita avb; + buildDevice enchilada avb; #XXX: uses stock /vendor + buildDevice fajita avb; #XXX: uses stock /vendor #SD632 buildDevice FP3 avb; #SD730 @@ -129,6 +129,7 @@ patchWorkspace() { #source build/envsetup.sh; #repopick -i 314020; #systemui crash fix #repopick -it eleven-firewall; + #repopick -it android-11.0.0_r43; source "$DOS_SCRIPTS/Patch.sh"; source "$DOS_SCRIPTS_COMMON/Copy_Keys.sh"; diff --git a/Scripts/LineageOS-18.1/Patch.sh b/Scripts/LineageOS-18.1/Patch.sh index 42143ab5..4429dd97 100644 --- a/Scripts/LineageOS-18.1/Patch.sh +++ b/Scripts/LineageOS-18.1/Patch.sh @@ -95,7 +95,7 @@ patch -p1 < "$DOS_PATCHES/android_frameworks_base/0007-Always_Restict_Serial.pat patch -p1 < "$DOS_PATCHES/android_frameworks_base/0008-Browser_No_Location.patch"; #Don't grant location permission to system browsers (GrapheneOS) patch -p1 < "$DOS_PATCHES/android_frameworks_base/0009-SystemUI_No_Permission_Review.patch"; #Allow SystemUI to directly manage Bluetooth/WiFi (GrapheneOS) patch -p1 < "$DOS_PATCHES/android_frameworks_base/0003-SUPL_No_IMSI.patch"; #Don't send IMSI to SUPL (MSe1969) -patch -p1 < "$DOS_PATCHES/android_frameworks_base/0004-Fingerprint_Lockout.patch"; #Enable fingerprint lockout after five failed attempts (GrapheneOS) +patch -p1 < "$DOS_PATCHES/android_frameworks_base/0004-Fingerprint_Lockout.patch"; #Enable fingerprint lockout after three failed attempts (GrapheneOS) #sed -i '301i\ if(packageList != null && packageList.size() > 0) { packageList.add("net.sourceforge.opencamera"); }' core/java/android/hardware/Camera.java; #Add Open Camera to aux camera allowlist XXX: needs testing, broke boot last time if [ "$DOS_MICROG_INCLUDED" != "FULL" ]; then rm -rf packages/CompanionDeviceManager; fi; #Used to support Android Wear (which hard depends on GMS) rm -rf packages/PrintRecommendationService; #Creates popups to install proprietary print apps