diff --git a/Patches/LineageOS-14.1/android_frameworks_base/0007-Connectivity.patch b/Patches/LineageOS-14.1/android_frameworks_base/0007-Connectivity.patch new file mode 100644 index 00000000..8303b9ca --- /dev/null +++ b/Patches/LineageOS-14.1/android_frameworks_base/0007-Connectivity.patch @@ -0,0 +1,29 @@ +From 0030bc6ef203eb6ffc1300599db1fd48d4a77f78 Mon Sep 17 00:00:00 2001 +From: Tad +Date: Tue, 8 May 2018 20:54:49 -0400 +Subject: [PATCH] Change connectivity check URLs to ours + +Change-Id: Idd9bfb4a09db763c97d0ea3aabf428176e28d48f +--- + .../java/com/android/server/connectivity/NetworkMonitor.java | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/services/core/java/com/android/server/connectivity/NetworkMonitor.java b/services/core/java/com/android/server/connectivity/NetworkMonitor.java +index 97669d242f0..2a39f90b19b 100644 +--- a/services/core/java/com/android/server/connectivity/NetworkMonitor.java ++++ b/services/core/java/com/android/server/connectivity/NetworkMonitor.java +@@ -86,9 +86,9 @@ public class NetworkMonitor extends StateMachine { + // Default configuration values for captive portal detection probes. + // TODO: append a random length parameter to the default HTTPS url. + // TODO: randomize browser version ids in the default User-Agent String. +- private static final String DEFAULT_HTTPS_URL = "https://www.google.com/generate_204"; ++ private static final String DEFAULT_HTTPS_URL = "https://divestos.xyz/gen204.php"; + private static final String DEFAULT_HTTP_URL = +- "http://connectivitycheck.gstatic.com/generate_204"; ++ "http://divestos.xyz/gen204.php"; + private static final String DEFAULT_FALLBACK_URL = "http://www.google.com/gen_204"; + private static final String DEFAULT_USER_AGENT = "Mozilla/5.0 (X11; Linux x86_64) " + + "AppleWebKit/537.36 (KHTML, like Gecko) " +-- +2.17.0 + diff --git a/Patches/LineageOS-15.1/android_frameworks_base/0005-Connectivity.patch b/Patches/LineageOS-15.1/android_frameworks_base/0005-Connectivity.patch new file mode 100644 index 00000000..a2317aa5 --- /dev/null +++ b/Patches/LineageOS-15.1/android_frameworks_base/0005-Connectivity.patch @@ -0,0 +1,34 @@ +From 883366830fc3af50d2232fc0b6d885f92c5d53ce Mon Sep 17 00:00:00 2001 +From: Tad +Date: Tue, 8 May 2018 20:53:07 -0400 +Subject: [PATCH] Change connectivity check URLs to ours + +Change-Id: I2dac7210f9c7e953d5ee88e2871bd26c234dfce6 +--- + .../com/android/server/connectivity/NetworkMonitor.java | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/services/core/java/com/android/server/connectivity/NetworkMonitor.java b/services/core/java/com/android/server/connectivity/NetworkMonitor.java +index d3a93542c74..32918aa3cdc 100644 +--- a/services/core/java/com/android/server/connectivity/NetworkMonitor.java ++++ b/services/core/java/com/android/server/connectivity/NetworkMonitor.java +@@ -91,12 +91,12 @@ public class NetworkMonitor extends StateMachine { + // Default configuration values for captive portal detection probes. + // TODO: append a random length parameter to the default HTTPS url. + // TODO: randomize browser version ids in the default User-Agent String. +- private static final String DEFAULT_HTTPS_URL = "https://www.google.com/generate_204"; ++ private static final String DEFAULT_HTTPS_URL = "https://divestos.xyz/gen204.php"; + private static final String DEFAULT_HTTP_URL = +- "http://connectivitycheck.gstatic.com/generate_204"; +- private static final String DEFAULT_FALLBACK_URL = "http://www.google.com/gen_204"; ++ "http://divestos.xyz/gen204.php"; ++ private static final String DEFAULT_FALLBACK_URL = "https://www.google.com/generate_204"; + private static final String DEFAULT_OTHER_FALLBACK_URLS = +- "http://play.googleapis.com/generate_204"; ++ "http://connectivitycheck.gstatic.com/generate_204"; + private static final String DEFAULT_USER_AGENT = "Mozilla/5.0 (X11; Linux x86_64) " + + "AppleWebKit/537.36 (KHTML, like Gecko) " + + "Chrome/60.0.3112.32 Safari/537.36"; +-- +2.17.0 + diff --git a/Scripts/LineageOS-14.1/Patch.sh b/Scripts/LineageOS-14.1/Patch.sh index 202f0379..6beabd7a 100755 --- a/Scripts/LineageOS-14.1/Patch.sh +++ b/Scripts/LineageOS-14.1/Patch.sh @@ -84,6 +84,7 @@ patch -p1 < $patches"android_frameworks_base/0003-Signature_Spoofing.patch"; #Al patch -p1 < $patches"android_frameworks_base/0005-Harden_Sig_Spoofing.patch"; #Restrict signature spoofing to system apps signed with the platform key #patch -p1 < $patches"android_frameworks_base/0006-DNS_Cloudflare.patch"; #Switch to Cloudflare DNS patch -p1 < $patches"android_frameworks_base/0006-DNS_OpenNIC.patch"; #Switch to OpenNIC DNS +patch -p1 < $patches"android_frameworks_base/0007-Connectivity.patch"; #Change connectivity check URLs to ours rm -rf packages/PrintRecommendationService; #App that just creates popups to install proprietary print apps rm core/res/res/values/config.xml.orig core/res/res/values/strings.xml.orig; diff --git a/Scripts/LineageOS-15.1/Patch.sh b/Scripts/LineageOS-15.1/Patch.sh index 3d3f593f..e741dc92 100755 --- a/Scripts/LineageOS-15.1/Patch.sh +++ b/Scripts/LineageOS-15.1/Patch.sh @@ -81,6 +81,7 @@ patch -p1 < $patches"android_frameworks_base/0002-Signature_Spoofing.patch"; #Al patch -p1 < $patches"android_frameworks_base/0003-Harden_Sig_Spoofing.patch"; #Restrict signature spoofing to system apps signed with the platform key #patch -p1 < $patches"android_frameworks_base/0004-DNS_Cloudflare.patch"; #Switch to Cloudflare DNS patch -p1 < $patches"android_frameworks_base/0004-DNS_OpenNIC.patch"; #Switch to OpenNIC DNS +patch -p1 < $patches"android_frameworks_base/0005-Connectivity.patch"; #Change connectivity check URLs to ours if [ "$NON_COMMERCIAL_USE_PATCHES" = true ]; then patch -p1 < $patches"android_frameworks_base/Copperhead/0005-Deny_USB.patch"; fi; #Deny USB support (Copperhead CC BY-NC-SA) rm -rf packages/PrintRecommendationService; #App that just creates popups to install proprietary print apps rm core/res/res/values/config.xml.orig core/res/res/values/strings.xml.orig;