diff --git a/Patches/LineageOS-18.1/android_packages_apps_Settings/0001-Captive_Portal_Toggle.patch b/Patches/LineageOS-18.1/android_packages_apps_Settings/0001-Captive_Portal_Toggle.patch index 56d3810d..be88eae6 100644 --- a/Patches/LineageOS-18.1/android_packages_apps_Settings/0001-Captive_Portal_Toggle.patch +++ b/Patches/LineageOS-18.1/android_packages_apps_Settings/0001-Captive_Portal_Toggle.patch @@ -1,4 +1,4 @@ -From 234ea9eca07c828e2e34f462d10acb876bc59e09 Mon Sep 17 00:00:00 2001 +From 07938fbba784ee95b7ca11b9056465d3cf351ee0 Mon Sep 17 00:00:00 2001 From: MSe1969 Date: Mon, 10 Sep 2018 12:05:40 +0200 Subject: [PATCH] Network & Internet Settings: Add option to switch off Captive @@ -40,13 +40,13 @@ index d981289421..3a66089d03 100644 + Nach dem Ausschalten der Captive-Portal-Erkennung empfangen Sie keine Verbindungs-Rückmeldung mehr. Wirklich fortfahren? diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml -index 099fb9eb07..8bbdef11f6 100644 +index 1c78816577..c35c696b16 100644 --- a/res/values/cm_strings.xml +++ b/res/values/cm_strings.xml -@@ -162,4 +162,9 @@ +@@ -172,4 +172,9 @@ - - Select Wi\u2011Fi network + + Automatically raises the refresh rate from 60 to %1$d Hz for some content. Increases battery usage. + + + Captive portal mode diff --git a/Scripts/Common/Copy_Keys.sh b/Scripts/Common/Copy_Keys.sh index 0b9dbbd0..ed30b2e5 100644 --- a/Scripts/Common/Copy_Keys.sh +++ b/Scripts/Common/Copy_Keys.sh @@ -15,6 +15,7 @@ #You should have received a copy of the GNU General Public License #along with this program. If not, see . +if [ -d "$DOS_SIGNING_KEYS" ]; then echo "Copying verity/avb public keys to kernels..."; cat "$DOS_SIGNING_KEYS/Amber/verity.x509.pem" >> "kernel/yandex/sdm660/certs/verity.x509.pem"; cat "$DOS_SIGNING_KEYS/alioth/verity.x509.pem" >> "kernel/xiaomi/sm8250/certs/verity.x509.pem"; @@ -104,3 +105,6 @@ cp -v "$DOS_SIGNING_KEYS/walleye/verifiedboot_relkeys.der.x509" "kernel/google/w cp -v "$DOS_SIGNING_KEYS/z2_plus/verifiedboot_relkeys.der.x509" "kernel/zuk/msm8996/verifiedboot_z2_plus_dos_relkeys.der.x509"; cp -v "$DOS_SIGNING_KEYS/zenfone3/verifiedboot_relkeys.der.x509" "kernel/asus/msm8953/verifiedboot_zenfone3_dos_relkeys.der.x509"; echo "Copied keys to kernels!"; +else +echo -e "\e[0;31mSigning keys unavailable, NOT copying public keys to kernels!\e[0m"; +fi; diff --git a/Scripts/Common/Fix_CVE_Patchers.sh b/Scripts/Common/Fix_CVE_Patchers.sh index 9622263e..32a32e34 100644 --- a/Scripts/Common/Fix_CVE_Patchers.sh +++ b/Scripts/Common/Fix_CVE_Patchers.sh @@ -17,13 +17,13 @@ commentPatches() { file="$1"; - if [ -f $file ]; then + if [ -f "$file" ]; then shift; for var in "$@" do #escaped=$(printf "%q" "$var"); #echo $escaped; - sed -i $file -e '\|'$var'| s|^#*|#|'; + sed -i "$file" -e '\|'$var'| s|^#*|#|'; done fi; } diff --git a/Scripts/Common/Functions.sh b/Scripts/Common/Functions.sh index 65489a57..28c8896b 100644 --- a/Scripts/Common/Functions.sh +++ b/Scripts/Common/Functions.sh @@ -53,6 +53,44 @@ gitReset() { } export -f gitReset; +applyPatchReal() { + currentWorkingPatch=$1; + firstLine=$(head -n1 "$currentWorkingPatch"); + if [[ "$firstLine" = *"Mon Sep 17 00:00:00 2001"* ]] || [[ "$firstLine" = *"Thu Jan 1 00:00:00 1970"* ]]; then + git am "$@"; + else + git apply "$@"; + echo "Applying (as diff): $currentWorkingPatch"; + fi; +} +export -f applyPatchReal; + +applyPatch() { + currentWorkingPatch=$1; + if [ -f "$currentWorkingPatch" ]; then + git apply --check "$@" &> /dev/null; + if [ "$?" -eq 0 ]; then + applyPatchReal "$@"; + else + git apply --reverse --check "$@" &> /dev/null; + if [ "$?" -eq 0 ]; then + echo "Already applied: $currentWorkingPatch"; + else + git apply --check "$@" --3way &> /dev/null; + if [ "$?" -eq 0 ]; then + applyPatchReal "$@" --3way; + echo "Applied (as 3way): $currentWorkingPatch"; + else + echo -e "\e[0;31mCannot apply: $currentWorkingPatch\e[0m"; + fi; + fi; + fi; + else + echo -e "\e[0;31mPatch doesn't exist: $currentWorkingPatch\e[0m"; + fi; +} +export -f applyPatch; + gpgVerifyDirectory() { if [ -r "$HOME/.gnupg" ]; then for sig in $1/*.asc; do @@ -711,8 +749,7 @@ hardenDefconfig() { optionsYes+=("THREAD_INFO_IN_TASK" "VMAP_STACK"); #Linux 4.10 - optionsYes+=("ARM64_SW_TTBR0_PAN"); - #Disabled: BUG_ON_DATA_CORRUPTION (boot issues?) + optionsYes+=("ARM64_SW_TTBR0_PAN" "BUG_ON_DATA_CORRUPTION"); #Linux 4.11 optionsYes+=("STRICT_KERNEL_RWX" "STRICT_MODULE_RWX"); @@ -790,7 +827,6 @@ hardenDefconfig() { if [ "$DOS_DEBLOBBER_REMOVE_IPA" = true ]; then optionsNo+=("IPA" "RMNET_IPA"); fi; optionsNo+=("WIREGUARD"); #Requires root access, which we do not provide - #optionsNo+=("LTO_CLANG"); #Can easily require 64GB of RAM on host system to compile for option in "${optionsNo[@]}" do diff --git a/Scripts/LineageOS-11.0/Functions.sh b/Scripts/LineageOS-11.0/Functions.sh index e6a206e9..aa377efa 100644 --- a/Scripts/LineageOS-11.0/Functions.sh +++ b/Scripts/LineageOS-11.0/Functions.sh @@ -24,7 +24,7 @@ export -f patchAllKernels; resetWorkspace() { umask 0022; - repo forall -c 'git add -A && git reset --hard' && rm -rf out && repo sync -j8 --force-sync; + repo forall -c 'git add -A && git reset --hard' && rm -rf out && repo sync -j8 --force-sync --detach; } export -f resetWorkspace; diff --git a/Scripts/LineageOS-14.1/Functions.sh b/Scripts/LineageOS-14.1/Functions.sh index 7e265cc9..7f225a80 100644 --- a/Scripts/LineageOS-14.1/Functions.sh +++ b/Scripts/LineageOS-14.1/Functions.sh @@ -24,7 +24,7 @@ export -f patchAllKernels; resetWorkspace() { umask 0022; - repo forall -c 'git add -A && git reset --hard' && rm -rf out && repo sync -j8 --force-sync; + repo forall -c 'git add -A && git reset --hard' && rm -rf out && repo sync -j8 --force-sync --detach; } export -f resetWorkspace; diff --git a/Scripts/LineageOS-15.1/Functions.sh b/Scripts/LineageOS-15.1/Functions.sh index c648c34c..304f061d 100644 --- a/Scripts/LineageOS-15.1/Functions.sh +++ b/Scripts/LineageOS-15.1/Functions.sh @@ -24,7 +24,7 @@ export -f patchAllKernels; resetWorkspace() { umask 0022; - repo forall -c 'git add -A && git reset --hard' && rm -rf out && repo sync -j8 --force-sync; + repo forall -c 'git add -A && git reset --hard' && rm -rf out && repo sync -j8 --force-sync --detach; } export -f resetWorkspace; diff --git a/Scripts/LineageOS-16.0/Functions.sh b/Scripts/LineageOS-16.0/Functions.sh index 78933887..9aec370e 100644 --- a/Scripts/LineageOS-16.0/Functions.sh +++ b/Scripts/LineageOS-16.0/Functions.sh @@ -24,7 +24,7 @@ export -f patchAllKernels; resetWorkspace() { umask 0022; - repo forall -c 'git add -A && git reset --hard' && rm -rf out && repo sync -j8 --force-sync; + repo forall -c 'git add -A && git reset --hard' && rm -rf out && repo sync -j8 --force-sync --detach; } export -f resetWorkspace; diff --git a/Scripts/LineageOS-17.1/Functions.sh b/Scripts/LineageOS-17.1/Functions.sh index f85666c6..2f370b9d 100644 --- a/Scripts/LineageOS-17.1/Functions.sh +++ b/Scripts/LineageOS-17.1/Functions.sh @@ -24,7 +24,7 @@ export -f patchAllKernels; resetWorkspace() { umask 0022; - repo forall -c 'git add -A && git reset --hard' && rm -rf out && repo sync -j8 --force-sync; + repo forall -c 'git add -A && git reset --hard' && rm -rf out && repo sync -j8 --force-sync --detach; } export -f resetWorkspace; diff --git a/Scripts/LineageOS-17.1/Patch.sh b/Scripts/LineageOS-17.1/Patch.sh index a5fc3474..be40d7d1 100644 --- a/Scripts/LineageOS-17.1/Patch.sh +++ b/Scripts/LineageOS-17.1/Patch.sh @@ -186,7 +186,7 @@ fi; if enterAndClear "packages/apps/Contacts"; then patch -p1 < "$DOS_PATCHES_COMMON/android_packages_apps_Contacts/0001-No_Google_Links.patch"; #Remove Privacy Policy and Terms of Service links (GrapheneOS) -patch -p1 < "$DOS_PATCHES_COMMON/android_packages_apps_Contacts/0001-No_Google_Backup.patch"; #Backups are not sent to Google (GrapheneOS) +patch -p1 < "$DOS_PATCHES_COMMON/android_packages_apps_Contacts/0002-No_Google_Backup.patch"; #Backups are not sent to Google (GrapheneOS) fi; if enterAndClear "packages/apps/Dialer"; then diff --git a/Scripts/LineageOS-18.1/Functions.sh b/Scripts/LineageOS-18.1/Functions.sh index 72747c0e..ba06da2e 100644 --- a/Scripts/LineageOS-18.1/Functions.sh +++ b/Scripts/LineageOS-18.1/Functions.sh @@ -24,7 +24,7 @@ export -f patchAllKernels; resetWorkspace() { umask 0022; - repo forall -c 'git add -A && git reset --hard' && rm -rf out && repo sync -j8 --force-sync; + repo forall -c 'git add -A && git reset --hard' && rm -rf out && repo sync -j8 --force-sync --detach; } export -f resetWorkspace; diff --git a/Scripts/LineageOS-18.1/Patch.sh b/Scripts/LineageOS-18.1/Patch.sh index 19b39544..a3aa8495 100644 --- a/Scripts/LineageOS-18.1/Patch.sh +++ b/Scripts/LineageOS-18.1/Patch.sh @@ -170,7 +170,7 @@ fi; if enterAndClear "packages/apps/Contacts"; then patch -p1 < "$DOS_PATCHES_COMMON/android_packages_apps_Contacts/0001-No_Google_Links.patch"; #Remove Privacy Policy and Terms of Service links (GrapheneOS) -patch -p1 < "$DOS_PATCHES_COMMON/android_packages_apps_Contacts/0001-No_Google_Backup.patch"; #Backups are not sent to Google (GrapheneOS) +patch -p1 < "$DOS_PATCHES_COMMON/android_packages_apps_Contacts/0002-No_Google_Backup.patch"; #Backups are not sent to Google (GrapheneOS) fi; if enterAndClear "packages/apps/Dialer"; then