From d740b1082233b29ac49eb9caf9d012689ebc74ec Mon Sep 17 00:00:00 2001 From: Tad Date: Tue, 19 Dec 2017 17:03:38 -0500 Subject: [PATCH] DNS changes --- Misc/Features/Default_DNS.txt | 5 -- Misc/be3 | 13 ---- Misc/flo | 5 ++ .../0006-OpenNIC.patch | 59 +++++++++++++++++++ Scripts/LineageOS-14.1/Patch.sh | 1 + 5 files changed, 65 insertions(+), 18 deletions(-) delete mode 100644 Misc/Features/Default_DNS.txt delete mode 100644 Misc/be3 create mode 100644 Misc/flo create mode 100644 Patches/LineageOS-14.1/android_frameworks_base/0006-OpenNIC.patch diff --git a/Misc/Features/Default_DNS.txt b/Misc/Features/Default_DNS.txt deleted file mode 100644 index 0d1d0d7c..00000000 --- a/Misc/Features/Default_DNS.txt +++ /dev/null @@ -1,5 +0,0 @@ -frameworks/base - core/res/res/values/config.xml - packages/SettingsLib/res/values/strings.xml - services/core/java/com/android/server/connectivity/NetworkDiagnostics.java - services/core/java/com/android/server/connectivity/Tethering.java diff --git a/Misc/be3 b/Misc/be3 deleted file mode 100644 index 80b14de4..00000000 --- a/Misc/be3 +++ /dev/null @@ -1,13 +0,0 @@ -../../../../../../kernel/google/msm/arch/arm/mm/rodata.c: In function 'set_page_attributes': -../../../../../../kernel/google/msm/arch/arm/mm/rodata.c:91:4: warning: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'pmd_t' [-Wformat=] -error, forbidden warning: rodata.c:91 - CC arch/arm/kernel/smp.o -make[2]: *** [/mnt/Drive-1/Development/Other/Android_ROMs/Build/LineageOS-14.1/kernel/google/msm/scripts/Makefile.build:307: arch/arm/mm/rodata.o] Error 1 - -marlin -../../../../../../kernel/google/marlin/mm/mmap.c:95:29: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__ro_after_init' - pgprot_t protection_map[16] __ro_after_init = { - ^ -make[2]: *** [/mnt/Drive-1/Development/Other/Android_ROMs/Build/LineageOS-14.1/kernel/google/marlin/scripts/Makefile.build:257: mm/mmap.o] Error 1 -make[1]: *** [/mnt/Drive-1/Development/Other/Android_ROMs/Build/LineageOS-14.1/kernel/google/marlin/Makefile:951: mm] Error 2 - diff --git a/Misc/flo b/Misc/flo new file mode 100644 index 00000000..045f0075 --- /dev/null +++ b/Misc/flo @@ -0,0 +1,5 @@ +../../../../../../kernel/google/msm/arch/arm/mm/rodata.c: In function 'set_page_attributes': +../../../../../../kernel/google/msm/arch/arm/mm/rodata.c:91:4: warning: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'pmd_t' [-Wformat=] +error, forbidden warning: rodata.c:91 + CC arch/arm/kernel/smp.o +make[2]: *** [/mnt/Drive-1/Development/Other/Android_ROMs/Build/LineageOS-14.1/kernel/google/msm/scripts/Makefile.build:307: arch/arm/mm/rodata.o] Error 1 diff --git a/Patches/LineageOS-14.1/android_frameworks_base/0006-OpenNIC.patch b/Patches/LineageOS-14.1/android_frameworks_base/0006-OpenNIC.patch new file mode 100644 index 00000000..444079ad --- /dev/null +++ b/Patches/LineageOS-14.1/android_frameworks_base/0006-OpenNIC.patch @@ -0,0 +1,59 @@ +From 3bf0b445f16aa7daa4981e70a7d5dc6c6ea530ea Mon Sep 17 00:00:00 2001 +From: Tad +Date: Tue, 19 Dec 2017 17:00:40 -0500 +Subject: [PATCH] Change fallback and tethering DNS servers to OpenNIC AnyCast + +Change-Id: Ib550fad74bb95272c067a02a5da18a80e6ec1e87 +--- + core/res/res/values/config.xml | 2 +- + packages/SettingsLib/res/values/strings.xml | 4 ++-- + services/core/java/com/android/server/connectivity/Tethering.java | 4 ++-- + 3 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml +index c29ff3c90a9..f7cbb5780ff 100755 +--- a/core/res/res/values/config.xml ++++ b/core/res/res/values/config.xml +@@ -1608,7 +1608,7 @@ + true + + +- 8.8.8.8 ++ 185.121.177.177 + + +diff --git a/packages/SettingsLib/res/values/strings.xml b/packages/SettingsLib/res/values/strings.xml +index f9bd24ba69f..12b6f7cb700 100644 +--- a/packages/SettingsLib/res/values/strings.xml ++++ b/packages/SettingsLib/res/values/strings.xml +@@ -837,9 +837,9 @@ + + 192.168.1.128 + +- 8.8.8.8 ++ 185.121.177.177 + +- 8.8.4.4 ++ 169.239.202.202 + + 192.168.1.1 + +diff --git a/services/core/java/com/android/server/connectivity/Tethering.java b/services/core/java/com/android/server/connectivity/Tethering.java +index f0cf0d98882..07157873169 100644 +--- a/services/core/java/com/android/server/connectivity/Tethering.java ++++ b/services/core/java/com/android/server/connectivity/Tethering.java +@@ -181,8 +181,8 @@ public class Tethering extends BaseNetworkObserver implements IControlsTethering + }; + + private String[] mDefaultDnsServers; +- private static final String DNS_DEFAULT_SERVER1 = "8.8.8.8"; +- private static final String DNS_DEFAULT_SERVER2 = "8.8.4.4"; ++ private static final String DNS_DEFAULT_SERVER1 = "185.121.177.177"; ++ private static final String DNS_DEFAULT_SERVER2 = "169.239.202.202"; + + private final StateMachine mTetherMasterSM; + private final UpstreamNetworkMonitor mUpstreamNetworkMonitor; +-- +2.15.1 + diff --git a/Scripts/LineageOS-14.1/Patch.sh b/Scripts/LineageOS-14.1/Patch.sh index bf7f73a8..241a6469 100755 --- a/Scripts/LineageOS-14.1/Patch.sh +++ b/Scripts/LineageOS-14.1/Patch.sh @@ -79,6 +79,7 @@ patch -p1 < $patches"android_frameworks_base/0001-Reduced_Resolution.patch" #All #patch -p1 < $patches"android_frameworks_base/0002-Radio.patch" #Add a QS tile to control radio power #TODO: Breaks cell and SystemUI patch -p1 < $patches"android_frameworks_base/0003-Signature_Spoofing.patch" #Allow packages to spoof their signature (MicroG) 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-OpenNIC.patch" #Change fallback and tethering DNS servers to OpenNIC AnyCast 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