Replace DNS patches with a function + some misc fixes

This commit is contained in:
Tad 2018-06-24 01:27:33 -04:00
parent 5772b68224
commit 3a3fe5aca9
9 changed files with 55 additions and 314 deletions

View File

@ -1,77 +0,0 @@
From 511b38c6a2807417893d5c21cbc27335bf6bead7 Mon Sep 17 00:00:00 2001
From: Tad <tad@spotco.us>
Date: Thu, 3 May 2018 07:35:30 -0400
Subject: [PATCH] Change fallback, tethering, and test DNS servers to
Cloudflare
Change-Id: I8031cce58003a45d9b6947ecdcc4d642ef192f52
---
core/res/res/values/config.xml | 2 +-
packages/SettingsLib/res/values/strings.xml | 4 ++--
.../com/android/server/connectivity/NetworkDiagnostics.java | 4 ++--
.../core/java/com/android/server/connectivity/Tethering.java | 4 ++--
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index c29ff3c90a9..49f6c04a5e7 100755
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -1608,7 +1608,7 @@
<bool name="config_bluetooth_default_profiles">true</bool>
<!-- IP address of the dns server to use if nobody else suggests one -->
- <string name="config_default_dns_server" translatable="false">8.8.8.8</string>
+ <string name="config_default_dns_server" translatable="false">1.0.0.1</string>
<!-- The default mobile provisioning apn. Empty by default, maybe overridden by
an mcc/mnc specific config.xml -->
diff --git a/packages/SettingsLib/res/values/strings.xml b/packages/SettingsLib/res/values/strings.xml
index f9bd24ba69f..67ef212f795 100644
--- a/packages/SettingsLib/res/values/strings.xml
+++ b/packages/SettingsLib/res/values/strings.xml
@@ -837,9 +837,9 @@
<!-- Hint text for the IP address -->
<string name="wifi_ip_address_hint" translatable="false">192.168.1.128</string>
<!-- Hint text for DNS -->
- <string name="wifi_dns1_hint" translatable="false">8.8.8.8</string>
+ <string name="wifi_dns1_hint" translatable="false">1.0.0.1</string>
<!-- Hint text for DNS -->
- <string name="wifi_dns2_hint" translatable="false">8.8.4.4</string>
+ <string name="wifi_dns2_hint" translatable="false">1.1.1.1</string>
<!-- Hint text for the gateway -->
<string name="wifi_gateway_hint" translatable="false">192.168.1.1</string>
<!-- Hint text for network prefix length -->
diff --git a/services/core/java/com/android/server/connectivity/NetworkDiagnostics.java b/services/core/java/com/android/server/connectivity/NetworkDiagnostics.java
index 5f9efe704f7..ea308ca231b 100644
--- a/services/core/java/com/android/server/connectivity/NetworkDiagnostics.java
+++ b/services/core/java/com/android/server/connectivity/NetworkDiagnostics.java
@@ -84,9 +84,9 @@ import libcore.io.IoUtils;
public class NetworkDiagnostics {
private static final String TAG = "NetworkDiagnostics";
- private static final InetAddress TEST_DNS4 = NetworkUtils.numericToInetAddress("8.8.8.8");
+ private static final InetAddress TEST_DNS4 = NetworkUtils.numericToInetAddress("1.0.0.1");
private static final InetAddress TEST_DNS6 = NetworkUtils.numericToInetAddress(
- "2001:4860:4860::8888");
+ "2606:4700:4700::1111");
// For brevity elsewhere.
private static final long now() {
diff --git a/services/core/java/com/android/server/connectivity/Tethering.java b/services/core/java/com/android/server/connectivity/Tethering.java
index f0cf0d98882..9240f5ffdfd 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 = "1.0.0.1";
+ private static final String DNS_DEFAULT_SERVER2 = "1.1.1.1";
private final StateMachine mTetherMasterSM;
private final UpstreamNetworkMonitor mUpstreamNetworkMonitor;
--
2.17.0

View File

@ -1,76 +0,0 @@
From 813078cefb7e87cdc42f0323f6ef7e05deb74545 Mon Sep 17 00:00:00 2001
From: Tad <tad@spotco.us>
Date: Tue, 8 May 2018 16:02:24 -0400
Subject: [PATCH] Change fallback, tethering, and test DNS servers to OpenNIC
Change-Id: Ic827c6d1baab6c86bf1f6e4125a4e324d0f5890f
---
core/res/res/values/config.xml | 2 +-
packages/SettingsLib/res/values/strings.xml | 4 ++--
.../com/android/server/connectivity/NetworkDiagnostics.java | 4 ++--
.../core/java/com/android/server/connectivity/Tethering.java | 4 ++--
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index c29ff3c90a9..fa747cb651f 100755
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -1608,7 +1608,7 @@
<bool name="config_bluetooth_default_profiles">true</bool>
<!-- IP address of the dns server to use if nobody else suggests one -->
- <string name="config_default_dns_server" translatable="false">8.8.8.8</string>
+ <string name="config_default_dns_server" translatable="false">169.239.202.202</string>
<!-- The default mobile provisioning apn. Empty by default, maybe overridden by
an mcc/mnc specific config.xml -->
diff --git a/packages/SettingsLib/res/values/strings.xml b/packages/SettingsLib/res/values/strings.xml
index f9bd24ba69f..58ae0701f20 100644
--- a/packages/SettingsLib/res/values/strings.xml
+++ b/packages/SettingsLib/res/values/strings.xml
@@ -837,9 +837,9 @@
<!-- Hint text for the IP address -->
<string name="wifi_ip_address_hint" translatable="false">192.168.1.128</string>
<!-- Hint text for DNS -->
- <string name="wifi_dns1_hint" translatable="false">8.8.8.8</string>
+ <string name="wifi_dns1_hint" translatable="false">169.239.202.202</string>
<!-- Hint text for DNS -->
- <string name="wifi_dns2_hint" translatable="false">8.8.4.4</string>
+ <string name="wifi_dns2_hint" translatable="false">185.121.177.177</string>
<!-- Hint text for the gateway -->
<string name="wifi_gateway_hint" translatable="false">192.168.1.1</string>
<!-- Hint text for network prefix length -->
diff --git a/services/core/java/com/android/server/connectivity/NetworkDiagnostics.java b/services/core/java/com/android/server/connectivity/NetworkDiagnostics.java
index 5f9efe704f7..ac3068a07c2 100644
--- a/services/core/java/com/android/server/connectivity/NetworkDiagnostics.java
+++ b/services/core/java/com/android/server/connectivity/NetworkDiagnostics.java
@@ -84,9 +84,9 @@ import libcore.io.IoUtils;
public class NetworkDiagnostics {
private static final String TAG = "NetworkDiagnostics";
- private static final InetAddress TEST_DNS4 = NetworkUtils.numericToInetAddress("8.8.8.8");
+ private static final InetAddress TEST_DNS4 = NetworkUtils.numericToInetAddress("169.239.202.202");
private static final InetAddress TEST_DNS6 = NetworkUtils.numericToInetAddress(
- "2001:4860:4860::8888");
+ "2a05:dfc7:5353::53");
// For brevity elsewhere.
private static final long now() {
diff --git a/services/core/java/com/android/server/connectivity/Tethering.java b/services/core/java/com/android/server/connectivity/Tethering.java
index f0cf0d98882..8c8489a6ee3 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 = "169.239.202.202";
+ private static final String DNS_DEFAULT_SERVER2 = "185.121.177.177";
private final StateMachine mTetherMasterSM;
private final UpstreamNetworkMonitor mUpstreamNetworkMonitor;
--
2.17.0

View File

@ -1,75 +0,0 @@
From e22081347f0878d93ef0f7ddc21df8ef15ebdec3 Mon Sep 17 00:00:00 2001
From: Tad <tad@spotco.us>
Date: Thu, 3 May 2018 07:28:57 -0400
Subject: [PATCH] Change fallback, tethering, and test DNS servers to
Cloudflare
Change-Id: I698295711c3409f01394dce7268461518dfa0064
---
core/res/res/values/config.xml | 2 +-
packages/SettingsLib/res/values/strings.xml | 4 ++--
.../com/android/server/connectivity/NetworkDiagnostics.java | 4 ++--
.../server/connectivity/tethering/TetheringConfiguration.java | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 3ce8959a983..3b1ae251fad 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -1651,7 +1651,7 @@
<bool name="config_bluetooth_default_profiles">true</bool>
<!-- IP address of the dns server to use if nobody else suggests one -->
- <string name="config_default_dns_server" translatable="false">8.8.8.8</string>
+ <string name="config_default_dns_server" translatable="false">1.0.0.1</string>
<!-- The default mobile provisioning apn. Empty by default, maybe overridden by
an mcc/mnc specific config.xml -->
diff --git a/packages/SettingsLib/res/values/strings.xml b/packages/SettingsLib/res/values/strings.xml
index bd884a3c972..c8fe7e54d9b 100644
--- a/packages/SettingsLib/res/values/strings.xml
+++ b/packages/SettingsLib/res/values/strings.xml
@@ -921,9 +921,9 @@
<!-- Hint text for the IP address -->
<string name="wifi_ip_address_hint" translatable="false">192.168.1.128</string>
<!-- Hint text for DNS -->
- <string name="wifi_dns1_hint" translatable="false">8.8.8.8</string>
+ <string name="wifi_dns1_hint" translatable="false">1.0.0.1</string>
<!-- Hint text for DNS -->
- <string name="wifi_dns2_hint" translatable="false">8.8.4.4</string>
+ <string name="wifi_dns2_hint" translatable="false">1.1.1.1</string>
<!-- Hint text for the gateway -->
<string name="wifi_gateway_hint" translatable="false">192.168.1.1</string>
<!-- Hint text for network prefix length -->
diff --git a/services/core/java/com/android/server/connectivity/NetworkDiagnostics.java b/services/core/java/com/android/server/connectivity/NetworkDiagnostics.java
index 85d1d1ef1d7..6681109ea4a 100644
--- a/services/core/java/com/android/server/connectivity/NetworkDiagnostics.java
+++ b/services/core/java/com/android/server/connectivity/NetworkDiagnostics.java
@@ -85,9 +85,9 @@ import libcore.io.IoUtils;
public class NetworkDiagnostics {
private static final String TAG = "NetworkDiagnostics";
- private static final InetAddress TEST_DNS4 = NetworkUtils.numericToInetAddress("8.8.8.8");
+ private static final InetAddress TEST_DNS4 = NetworkUtils.numericToInetAddress("1.0.0.1");
private static final InetAddress TEST_DNS6 = NetworkUtils.numericToInetAddress(
- "2001:4860:4860::8888");
+ "2606:4700:4700::1111");
// For brevity elsewhere.
private static final long now() {
diff --git a/services/core/java/com/android/server/connectivity/tethering/TetheringConfiguration.java b/services/core/java/com/android/server/connectivity/tethering/TetheringConfiguration.java
index acbc10b9dc4..6dd661bfdb8 100644
--- a/services/core/java/com/android/server/connectivity/tethering/TetheringConfiguration.java
+++ b/services/core/java/com/android/server/connectivity/tethering/TetheringConfiguration.java
@@ -65,7 +65,7 @@ public class TetheringConfiguration {
"192.168.48.2", "192.168.48.254", "192.168.49.2", "192.168.49.254",
};
- private final String[] DEFAULT_IPV4_DNS = {"8.8.4.4", "8.8.8.8"};
+ private final String[] DEFAULT_IPV4_DNS = {"1.0.0.1", "1.1.1.1"};
public final String[] tetherableUsbRegexs;
public final String[] tetherableWifiRegexs;
--
2.17.0

View File

@ -1,74 +0,0 @@
From c5e9c3afd27e8b9672c0a0395f34084b1322dd61 Mon Sep 17 00:00:00 2001
From: Tad <tad@spotco.us>
Date: Tue, 8 May 2018 15:53:53 -0400
Subject: [PATCH] Change fallback, tethering, and test DNS servers to OpenNIC
Change-Id: Ic828a5695aa24a12ba8921115cb87eec7dc7ad30
---
core/res/res/values/config.xml | 2 +-
packages/SettingsLib/res/values/strings.xml | 4 ++--
.../com/android/server/connectivity/NetworkDiagnostics.java | 4 ++--
.../server/connectivity/tethering/TetheringConfiguration.java | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 3ce8959a983..cd7602763a1 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -1651,7 +1651,7 @@
<bool name="config_bluetooth_default_profiles">true</bool>
<!-- IP address of the dns server to use if nobody else suggests one -->
- <string name="config_default_dns_server" translatable="false">8.8.8.8</string>
+ <string name="config_default_dns_server" translatable="false">169.239.202.202</string>
<!-- The default mobile provisioning apn. Empty by default, maybe overridden by
an mcc/mnc specific config.xml -->
diff --git a/packages/SettingsLib/res/values/strings.xml b/packages/SettingsLib/res/values/strings.xml
index bd884a3c972..7547447876d 100644
--- a/packages/SettingsLib/res/values/strings.xml
+++ b/packages/SettingsLib/res/values/strings.xml
@@ -921,9 +921,9 @@
<!-- Hint text for the IP address -->
<string name="wifi_ip_address_hint" translatable="false">192.168.1.128</string>
<!-- Hint text for DNS -->
- <string name="wifi_dns1_hint" translatable="false">8.8.8.8</string>
+ <string name="wifi_dns1_hint" translatable="false">169.239.202.202</string>
<!-- Hint text for DNS -->
- <string name="wifi_dns2_hint" translatable="false">8.8.4.4</string>
+ <string name="wifi_dns2_hint" translatable="false">185.121.177.177</string>
<!-- Hint text for the gateway -->
<string name="wifi_gateway_hint" translatable="false">192.168.1.1</string>
<!-- Hint text for network prefix length -->
diff --git a/services/core/java/com/android/server/connectivity/NetworkDiagnostics.java b/services/core/java/com/android/server/connectivity/NetworkDiagnostics.java
index 85d1d1ef1d7..c71ecf8079f 100644
--- a/services/core/java/com/android/server/connectivity/NetworkDiagnostics.java
+++ b/services/core/java/com/android/server/connectivity/NetworkDiagnostics.java
@@ -85,9 +85,9 @@ import libcore.io.IoUtils;
public class NetworkDiagnostics {
private static final String TAG = "NetworkDiagnostics";
- private static final InetAddress TEST_DNS4 = NetworkUtils.numericToInetAddress("8.8.8.8");
+ private static final InetAddress TEST_DNS4 = NetworkUtils.numericToInetAddress("169.239.202.202");
private static final InetAddress TEST_DNS6 = NetworkUtils.numericToInetAddress(
- "2001:4860:4860::8888");
+ "2a05:dfc7:5353::53");
// For brevity elsewhere.
private static final long now() {
diff --git a/services/core/java/com/android/server/connectivity/tethering/TetheringConfiguration.java b/services/core/java/com/android/server/connectivity/tethering/TetheringConfiguration.java
index acbc10b9dc4..3a206e70774 100644
--- a/services/core/java/com/android/server/connectivity/tethering/TetheringConfiguration.java
+++ b/services/core/java/com/android/server/connectivity/tethering/TetheringConfiguration.java
@@ -65,7 +65,7 @@ public class TetheringConfiguration {
"192.168.48.2", "192.168.48.254", "192.168.49.2", "192.168.49.254",
};
- private final String[] DEFAULT_IPV4_DNS = {"8.8.4.4", "8.8.8.8"};
+ private final String[] DEFAULT_IPV4_DNS = {"169.239.202.202", "185.121.177.177"};
public final String[] tetherableUsbRegexs;
public final String[] tetherableWifiRegexs;
--
2.17.0

View File

@ -194,7 +194,7 @@ echo "Deblobbing..."
#blobs=$blobs"|libthermalclient.so|libthermalioctl.so|thermal-engine"; #blobs=$blobs"|libthermalclient.so|libthermalioctl.so|thermal-engine";
#Time Service [Qualcomm] #Time Service [Qualcomm]
#Requires that https://github.com/LineageOS/android_hardware_sony_timekeep be included in repo manifest #Requires that android_hardware_sony_timekeep be included in repo manifest
if [ "$DEBLOBBER_REPLACE_TIME" = true ]; then if [ "$DEBLOBBER_REPLACE_TIME" = true ]; then
#blobs=$blobs"|libtime_genoff.so"; #XXX: Breaks radio #blobs=$blobs"|libtime_genoff.so"; #XXX: Breaks radio
blobs=$blobs"|libTimeService.so|time_daemon|TimeService.apk"; blobs=$blobs"|libTimeService.so|time_daemon|TimeService.apk";
@ -265,18 +265,14 @@ deblobDevice() {
awk -i inplace '!/'"$makes"'/' device.mk; #Remove references from device makefile awk -i inplace '!/'"$makes"'/' device.mk; #Remove references from device makefile
if [ -z "$replaceTime" ]; then if [ -z "$replaceTime" ]; then
#Switch to Sony TimeKeep #Switch to Sony TimeKeep
echo "PRODUCT_PACKAGES += \\" >> device.mk; echo "PRODUCT_PACKAGES += timekeep TimeKeep" >> device.mk;
echo " timekeep \\" >> device.mk;
echo " TimeKeep" >> device.mk;
fi; fi;
fi; fi;
if [ -f "${PWD##*/}".mk ] && [ "${PWD##*/}".mk != "sepolicy" ]; then if [ -f "${PWD##*/}".mk ] && [ "${PWD##*/}".mk != "sepolicy" ]; then
awk -i inplace '!/'"$makes"'/' "${PWD##*/}".mk; #Remove references from device makefile awk -i inplace '!/'"$makes"'/' "${PWD##*/}".mk; #Remove references from device makefile
if [ -z "$replaceTime" ]; then if [ -z "$replaceTime" ]; then
#Switch to Sony TimeKeep #Switch to Sony TimeKeep
echo "PRODUCT_PACKAGES += \\" >> "${PWD##*/}".mk; echo "PRODUCT_PACKAGES += timekeep TimeKeep" >> "${PWD##*/}".mk;
echo " timekeep \\" >> "${PWD##*/}".mk;
echo " TimeKeep" >> "${PWD##*/}".mk;
fi; fi;
fi; fi;
if [ -f system.prop ]; then if [ -f system.prop ]; then

View File

@ -185,6 +185,55 @@ getDefconfig() {
} }
export -f getDefconfig; export -f getDefconfig;
changeDefaultDNS() {
dnsPrimary="";
dnsPrimaryV6="";
dnsSecondary="";
dnsSecondaryV6="";
if [ -z "$DNS_PRESET"]; then
if [[ "$DEFAULT_DNS_PRESET" == "Cloudflare" ]]; then
dnsPrimary="1.0.0.1";
dnsPrimaryV6="2606:4700:4700::1001";
dnsSecondary="1.1.1.1";
dnsSecondaryV6="2606:4700:4700::1111";
elif [[ "$DEFAULT_DNS_PRESET" == "OpenNIC" ]]; then
dnsPrimary="169.239.202.202";
dnsPrimaryV6="2a05:dfc7:5353::53";
dnsSecondary="185.121.177.177";
dnsSecondaryV6="2a05:dfc7:5::53";
elif [[ "$DEFAULT_DNS_PRESET" == "DNSWATCH" ]]; then
dnsPrimary="84.200.69.80";
dnsPrimaryV6="2001:1608:10:25::1c04:b12f";
dnsSecondary="84.200.70.40";
dnsSecondaryV6="2001:1608:10:25::9249:d69b";
elif [[ "$DEFAULT_DNS_PRESET" == "Google" ]]; then
dnsPrimary="8.8.8.8";
dnsPrimaryV6="2001:4860:4860::8888";
dnsSecondary="8.8.4.4";
dnsSecondaryV6="2001:4860:4860::8844";
elif [[ "$DEFAULT_DNS_PRESET" == "OpenDNS" ]]; then
dnsPrimary="208.67.222.222";
dnsPrimaryV6="2620:0:ccc::2";
dnsSecondary="208.67.220.220";
dnsSecondaryV6="2620:0:ccd::2";
elif [[ "$DEFAULT_DNS_PRESET" == "Quad9" ]]; then
dnsPrimary="9.9.9.9";
dnsPrimaryV6="2620:fe::fe";
dnsSecondary="149.112.112.112";
dnsSecondaryV6="2620:fe::10"; #not real secondary, primary "unsecured"
fi;
else
echo "You must first set a preset via the DEFAULT_DNS_PRESET variable in init.sh!";
fi;
files="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 services/core/java/com/android/server/connectivity/tethering/TetheringConfiguration.java";
sed -i "s/8\.8\.8\.8/$dnsPrimary/" $files &>/dev/null || true;
sed -i "s/2001:4860:4860::8888/$dnsPrimaryV6/" $files &>/dev/null || true;
sed -i "s/8\.8\.4\.4/$dnsSecondary/" $files &>/dev/null || true;
sed -i "s/2001:4860:4860::8844/$dnsSecondaryV6/" $files &>/dev/null || true;
}
export -f changeDefaultDNS;
editKernelLocalversion() { editKernelLocalversion() {
defconfigPath=$(getDefconfig) defconfigPath=$(getDefconfig)
sed -i 's/CONFIG_LOCALVERSION=".*"/CONFIG_LOCALVERSION="'"$1"'"/' $defconfigPath &>/dev/null || true; sed -i 's/CONFIG_LOCALVERSION=".*"/CONFIG_LOCALVERSION="'"$1"'"/' $defconfigPath &>/dev/null || true;

View File

@ -84,8 +84,7 @@ sed -i 's|config_permissionReviewRequired">false|config_permissionReviewRequired
patch -p1 < "$patches/android_frameworks_base/0001-Reduced_Resolution.patch"; #Allow reducing resolution to save power TODO: Add 800x480 patch -p1 < "$patches/android_frameworks_base/0001-Reduced_Resolution.patch"; #Allow reducing resolution to save power TODO: Add 800x480
if [ "$MICROG_INCLUDED" = true ]; then patch -p1 < "$patches/android_frameworks_base/0003-Signature_Spoofing.patch"; fi; #Allow packages to spoof their signature (MicroG) if [ "$MICROG_INCLUDED" = true ]; then patch -p1 < "$patches/android_frameworks_base/0003-Signature_Spoofing.patch"; fi; #Allow packages to spoof their signature (MicroG)
if [ "$MICROG_INCLUDED" = true ]; then patch -p1 < "$patches/android_frameworks_base/0005-Harden_Sig_Spoofing.patch"; fi; #Restrict signature spoofing to system apps signed with the platform key if [ "$MICROG_INCLUDED" = true ]; then patch -p1 < "$patches/android_frameworks_base/0005-Harden_Sig_Spoofing.patch"; fi; #Restrict signature spoofing to system apps signed with the platform key
if [ "$DEFAULT_DNS" = "Cloudflare" ]; then patch -p1 < "$patches/android_frameworks_base/0006-DNS_Cloudflare.patch"; fi; #Switch to Cloudflare DNS changeDefaultDNS;
if [ "$DEFAULT_DNS" = "OpenNIC" ]; then patch -p1 < "$patches/android_frameworks_base/0006-DNS_OpenNIC.patch"; fi; #Switch to OpenNIC DNS
#patch -p1 < "$patches/android_frameworks_base/0007-Connectivity.patch"; #Change connectivity check URLs to ours #patch -p1 < "$patches/android_frameworks_base/0007-Connectivity.patch"; #Change connectivity check URLs to ours
patch -p1 < "$patches/android_frameworks_base/0008-Disable_Analytics.patch"; #Disable/reduce functionality of various ad/analytics libraries patch -p1 < "$patches/android_frameworks_base/0008-Disable_Analytics.patch"; #Disable/reduce functionality of various ad/analytics libraries
rm -rf packages/PrintRecommendationService; #App that just creates popups to install proprietary print apps rm -rf packages/PrintRecommendationService; #App that just creates popups to install proprietary print apps

View File

@ -84,8 +84,7 @@ sed -i 's/com.android.messaging/org.smssecure.smssecure/' core/res/res/values/co
sed -i 's|config_permissionReviewRequired">false|config_permissionReviewRequired">true|' core/res/res/values/config.xml; sed -i 's|config_permissionReviewRequired">false|config_permissionReviewRequired">true|' core/res/res/values/config.xml;
if [ "$MICROG_INCLUDED" = true ]; then patch -p1 < "$patches/android_frameworks_base/0002-Signature_Spoofing.patch"; fi; #Allow packages to spoof their signature (microG) if [ "$MICROG_INCLUDED" = true ]; then patch -p1 < "$patches/android_frameworks_base/0002-Signature_Spoofing.patch"; fi; #Allow packages to spoof their signature (microG)
if [ "$MICROG_INCLUDED" = true ]; then patch -p1 < "$patches/android_frameworks_base/0003-Harden_Sig_Spoofing.patch"; fi; #Restrict signature spoofing to system apps signed with the platform key if [ "$MICROG_INCLUDED" = true ]; then patch -p1 < "$patches/android_frameworks_base/0003-Harden_Sig_Spoofing.patch"; fi; #Restrict signature spoofing to system apps signed with the platform key
if [ "$DEFAULT_DNS" = "Cloudflare" ]; then patch -p1 < "$patches/android_frameworks_base/0004-DNS_Cloudflare.patch"; fi; #Switch to Cloudflare DNS changeDefaultDNS;
if [ "$DEFAULT_DNS" = "OpenNIC" ]; then patch -p1 < "$patches/android_frameworks_base/0004-DNS_OpenNIC.patch"; fi; #Switch to OpenNIC DNS
#patch -p1 < "$patches/android_frameworks_base/0005-Connectivity.patch"; #Change connectivity check URLs to ours #patch -p1 < "$patches/android_frameworks_base/0005-Connectivity.patch"; #Change connectivity check URLs to ours
patch -p1 < "$patches/android_frameworks_base/0006-Disable_Analytics.patch"; #Disable/reduce functionality of various ad/analytics libraries patch -p1 < "$patches/android_frameworks_base/0006-Disable_Analytics.patch"; #Disable/reduce functionality of various ad/analytics libraries
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) 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)

View File

@ -23,7 +23,7 @@ export androidWorkspace="/mnt/Drive-3/"; #XXX: THIS MUST BE CORRECT TO BUILD!
export DEBLOBBER_REMOVE_AUDIOFX=false; #Set true to remove AudioFX export DEBLOBBER_REMOVE_AUDIOFX=false; #Set true to remove AudioFX
export DEBLOBBER_REMOVE_IMS=false; #Set true to remove all IMS blobs export DEBLOBBER_REMOVE_IMS=false; #Set true to remove all IMS blobs
export DEBLOBBER_REPLACE_TIME=false; #Set true to replace Qualcomm Time Services with the open source Sony TimeKeep reimplementation export DEBLOBBER_REPLACE_TIME=false; #Set true to replace Qualcomm Time Services with the open source Sony TimeKeep reimplementation
export DEFAULT_DNS="OpenNIC"; #Sets default DNS. Options: Cloudflare, OpenNIC export DEFAULT_DNS_PRESET="OpenNIC"; #Sets default DNS. Options: Cloudflare, OpenNIC, DNSWATCH, Google, OpenDNS, Quad9
export GLONASS_FORCED_ENABLE=true; #Enables GLONASS on all devices export GLONASS_FORCED_ENABLE=true; #Enables GLONASS on all devices
export MALWARE_SCAN_ENABLED=true; #Set true to perform a fast scan on patchWorkspace() and a through scan on buildAll() export MALWARE_SCAN_ENABLED=true; #Set true to perform a fast scan on patchWorkspace() and a through scan on buildAll()
export MALWARE_SCAN_SETTING="quick"; #buildAll() scan speed. Options: quick, extra, slow, full export MALWARE_SCAN_SETTING="quick"; #buildAll() scan speed. Options: quick, extra, slow, full