20.0: Fixes

Signed-off-by: Tad <tad@spotco.us>
This commit is contained in:
Tad 2022-10-15 14:51:30 -04:00
parent 20cfa30df0
commit 5cada3a769
No known key found for this signature in database
GPG Key ID: B286E9F57A07424B
11 changed files with 877 additions and 14394 deletions

View File

@ -7,8 +7,7 @@ Change-Id: Ib2a00de63b0c7a8790640462d13a84daf2076fa7
---
core/product_config.mk | 5 +++++
target/product/security/Android.mk | 21 +++++++++++++++++----
tools/buildinfo.sh | 4 ++--
3 files changed, 24 insertions(+), 6 deletions(-)
2 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/core/product_config.mk b/core/product_config.mk
index 37146d3a9..7dc8113f5 100644
@ -71,18 +70,3 @@ index ad25a9261..c2dca4dc4 100644
$(extra_recovery_keys)
$(SOONG_ZIP) -o $@ -j -symlinks=false \
$(addprefix -f ,$(PRIVATE_CERT) $(PRIVATE_EXTRA_RECOVERY_KEYS))
diff --git a/tools/buildinfo.sh b/tools/buildinfo.sh
index c00e1e98b..8145794e1 100755
--- a/tools/buildinfo.sh
+++ b/tools/buildinfo.sh
@@ -26,8 +26,8 @@ echo "ro.build.version.min_supported_target_sdk=$PLATFORM_MIN_SUPPORTED_TARGET_S
echo "ro.build.date=`$DATE`"
echo "ro.build.date.utc=`$DATE +%s`"
echo "ro.build.type=$TARGET_BUILD_TYPE"
-echo "ro.build.user=$BUILD_USERNAME"
-echo "ro.build.host=$BUILD_HOSTNAME"
+echo "ro.build.user=emy"
+echo "ro.build.host=dosbm"
echo "ro.build.tags=$BUILD_VERSION_TAGS"
echo "ro.build.flavor=$TARGET_BUILD_FLAVOR"
if [ -n "$BOARD_BUILD_SYSTEM_ROOT_IMAGE" ] ; then

View File

@ -0,0 +1,144 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tad <tad@spotco.us>
Date: Tue, 21 Dec 2021 05:13:40 +0530
Subject: [PATCH] Add more 'Private DNS' options
This adds thirteen DNS providers as available presets.
Credit: CalyxOS
- Chirayu Desai <chirayudesai1@gmail.com>
https://review.calyxos.org/c/CalyxOS/platform_frameworks_libs_net/+/9676
Signed-off-by: Tad <tad@spotco.us>
Change-Id: Ide577115925a2a4991332524f670899f4d33f2a3
---
.../util/ConnectivitySettingsUtils.java | 91 +++++++++++++++++++
1 file changed, 91 insertions(+)
diff --git a/common/framework/com/android/net/module/util/ConnectivitySettingsUtils.java b/common/framework/com/android/net/module/util/ConnectivitySettingsUtils.java
index b7eb70b..3e8dd2e 100644
--- a/common/framework/com/android/net/module/util/ConnectivitySettingsUtils.java
+++ b/common/framework/com/android/net/module/util/ConnectivitySettingsUtils.java
@@ -32,10 +32,36 @@ public class ConnectivitySettingsUtils {
public static final int PRIVATE_DNS_MODE_OFF = 1;
public static final int PRIVATE_DNS_MODE_OPPORTUNISTIC = 2;
public static final int PRIVATE_DNS_MODE_PROVIDER_HOSTNAME = 3;
+ public static final int PRIVATE_DNS_MODE_ADGUARD = 4;
+ public static final int PRIVATE_DNS_MODE_APPLIEDPRIVACY = 5;
+ public static final int PRIVATE_DNS_MODE_CLEANBROWSING = 6;
+ public static final int PRIVATE_DNS_MODE_CIRA = 7;
+ public static final int PRIVATE_DNS_MODE_CZNIC = 8;
+ public static final int PRIVATE_DNS_MODE_CLOUDFLARE = 9;
+ public static final int PRIVATE_DNS_MODE_GOOGLE = 10;
+ public static final int PRIVATE_DNS_MODE_MULLVAD = 11;
+ public static final int PRIVATE_DNS_MODE_QUADNINE = 12;
+ public static final int PRIVATE_DNS_MODE_RESTENA = 13;
+ public static final int PRIVATE_DNS_MODE_SWITCH = 14;
+ public static final int PRIVATE_DNS_MODE_TWNIC = 15;
+ public static final int PRIVATE_DNS_MODE_UNCENSOREDDNS = 16;
public static final String PRIVATE_DNS_DEFAULT_MODE = "private_dns_default_mode";
public static final String PRIVATE_DNS_MODE = "private_dns_mode";
public static final String PRIVATE_DNS_MODE_OFF_STRING = "off";
+ public static final String PRIVATE_DNS_MODE_ADGUARD_STRING = "adguard";
+ public static final String PRIVATE_DNS_MODE_APPLIEDPRIVACY_STRING = "appliedprivacy";
+ public static final String PRIVATE_DNS_MODE_CLEANBROWSING_STRING = "cleanbrowsing";
+ public static final String PRIVATE_DNS_MODE_CIRA_STRING = "cira";
+ public static final String PRIVATE_DNS_MODE_CZNIC_STRING = "cznic";
+ public static final String PRIVATE_DNS_MODE_CLOUDFLARE_STRING = "cloudflare";
+ public static final String PRIVATE_DNS_MODE_GOOGLE_STRING = "google";
+ public static final String PRIVATE_DNS_MODE_MULLVAD_STRING = "mullvad";
+ public static final String PRIVATE_DNS_MODE_QUADNINE_STRING = "quadnine";
+ public static final String PRIVATE_DNS_MODE_RESTENA_STRING = "restena";
+ public static final String PRIVATE_DNS_MODE_SWITCH_STRING = "switch";
+ public static final String PRIVATE_DNS_MODE_TWNIC_STRING = "twnic";
+ public static final String PRIVATE_DNS_MODE_UNCENSOREDDNS_STRING = "uncensoreddns";
public static final String PRIVATE_DNS_MODE_OPPORTUNISTIC_STRING = "opportunistic";
public static final String PRIVATE_DNS_MODE_PROVIDER_HOSTNAME_STRING = "hostname";
public static final String PRIVATE_DNS_SPECIFIER = "private_dns_specifier";
@@ -50,6 +76,32 @@ public class ConnectivitySettingsUtils {
switch (mode) {
case PRIVATE_DNS_MODE_OFF:
return PRIVATE_DNS_MODE_OFF_STRING;
+ case PRIVATE_DNS_MODE_ADGUARD:
+ return PRIVATE_DNS_MODE_ADGUARD_STRING;
+ case PRIVATE_DNS_MODE_APPLIEDPRIVACY:
+ return PRIVATE_DNS_MODE_APPLIEDPRIVACY_STRING;
+ case PRIVATE_DNS_MODE_CLEANBROWSING:
+ return PRIVATE_DNS_MODE_CLEANBROWSING_STRING;
+ case PRIVATE_DNS_MODE_CIRA:
+ return PRIVATE_DNS_MODE_CIRA_STRING;
+ case PRIVATE_DNS_MODE_CZNIC:
+ return PRIVATE_DNS_MODE_CZNIC_STRING;
+ case PRIVATE_DNS_MODE_CLOUDFLARE:
+ return PRIVATE_DNS_MODE_CLOUDFLARE_STRING;
+ case PRIVATE_DNS_MODE_GOOGLE:
+ return PRIVATE_DNS_MODE_GOOGLE_STRING;
+ case PRIVATE_DNS_MODE_MULLVAD:
+ return PRIVATE_DNS_MODE_MULLVAD_STRING;
+ case PRIVATE_DNS_MODE_QUADNINE:
+ return PRIVATE_DNS_MODE_QUADNINE_STRING;
+ case PRIVATE_DNS_MODE_RESTENA:
+ return PRIVATE_DNS_MODE_RESTENA_STRING;
+ case PRIVATE_DNS_MODE_SWITCH:
+ return PRIVATE_DNS_MODE_SWITCH_STRING;
+ case PRIVATE_DNS_MODE_TWNIC:
+ return PRIVATE_DNS_MODE_TWNIC_STRING;
+ case PRIVATE_DNS_MODE_UNCENSOREDDNS:
+ return PRIVATE_DNS_MODE_UNCENSOREDDNS_STRING;
case PRIVATE_DNS_MODE_OPPORTUNISTIC:
return PRIVATE_DNS_MODE_OPPORTUNISTIC_STRING;
case PRIVATE_DNS_MODE_PROVIDER_HOSTNAME:
@@ -63,6 +115,32 @@ public class ConnectivitySettingsUtils {
switch (mode) {
case "off":
return PRIVATE_DNS_MODE_OFF;
+ case "adguard":
+ return PRIVATE_DNS_MODE_ADGUARD;
+ case "appliedprivacy":
+ return PRIVATE_DNS_MODE_APPLIEDPRIVACY;
+ case "cleanbrowsing":
+ return PRIVATE_DNS_MODE_CLEANBROWSING;
+ case "cira":
+ return PRIVATE_DNS_MODE_CIRA;
+ case "cznic":
+ return PRIVATE_DNS_MODE_CZNIC;
+ case "cloudflare":
+ return PRIVATE_DNS_MODE_CLOUDFLARE;
+ case "google":
+ return PRIVATE_DNS_MODE_GOOGLE;
+ case "mullvad":
+ return PRIVATE_DNS_MODE_MULLVAD;
+ case "quadnine":
+ return PRIVATE_DNS_MODE_QUADNINE;
+ case "restena":
+ return PRIVATE_DNS_MODE_RESTENA;
+ case "switch":
+ return PRIVATE_DNS_MODE_SWITCH;
+ case "twnic":
+ return PRIVATE_DNS_MODE_TWNIC;
+ case "uncensoreddns":
+ return PRIVATE_DNS_MODE_UNCENSOREDDNS;
case "hostname":
return PRIVATE_DNS_MODE_PROVIDER_HOSTNAME;
case "opportunistic":
@@ -96,6 +174,19 @@ public class ConnectivitySettingsUtils {
*/
public static void setPrivateDnsMode(@NonNull Context context, int mode) {
if (!(mode == PRIVATE_DNS_MODE_OFF
+ || mode == PRIVATE_DNS_MODE_ADGUARD
+ || mode == PRIVATE_DNS_MODE_APPLIEDPRIVACY
+ || mode == PRIVATE_DNS_MODE_CLEANBROWSING
+ || mode == PRIVATE_DNS_MODE_CIRA
+ || mode == PRIVATE_DNS_MODE_CZNIC
+ || mode == PRIVATE_DNS_MODE_CLOUDFLARE
+ || mode == PRIVATE_DNS_MODE_GOOGLE
+ || mode == PRIVATE_DNS_MODE_MULLVAD
+ || mode == PRIVATE_DNS_MODE_QUADNINE
+ || mode == PRIVATE_DNS_MODE_RESTENA
+ || mode == PRIVATE_DNS_MODE_SWITCH
+ || mode == PRIVATE_DNS_MODE_TWNIC
+ || mode == PRIVATE_DNS_MODE_UNCENSOREDDNS
|| mode == PRIVATE_DNS_MODE_OPPORTUNISTIC
|| mode == PRIVATE_DNS_MODE_PROVIDER_HOSTNAME)) {
throw new IllegalArgumentException("Invalid private dns mode: " + mode);

View File

@ -0,0 +1,314 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tad <tad@spotco.us>
Date: Mon, 24 Jun 2019 21:27:26 +0530
Subject: [PATCH] Add more 'Private DNS' options
This adds thirteen DNS providers as available presets.
Credit: CalyxOS
- Chirayu Desai <chirayudesai1@gmail.com>
https://review.calyxos.org/c/CalyxOS/platform_packages_apps_Settings/+/9504
Change-Id: I7e8a320d47e7c5ddbcb9acfaf23032ae92d5d70d
---
res/layout/private_dns_mode_dialog.xml | 52 +++++++++++
res/values/cm_strings.xml | 15 +++
.../PrivateDnsModeDialogPreference.java | 93 +++++++++++++++++++
.../PrivateDnsPreferenceController.java | 67 +++++++++++++
4 files changed, 227 insertions(+)
diff --git a/res/layout/private_dns_mode_dialog.xml b/res/layout/private_dns_mode_dialog.xml
index 12e29e693b..b6745806b5 100644
--- a/res/layout/private_dns_mode_dialog.xml
+++ b/res/layout/private_dns_mode_dialog.xml
@@ -35,6 +35,58 @@
android:id="@+id/private_dns_mode_off"
layout="@layout/preference_widget_dialog_radiobutton"/>
+ <include
+ android:id="@+id/private_dns_mode_adguard"
+ layout="@layout/preference_widget_dialog_radiobutton"/>
+
+ <include
+ android:id="@+id/private_dns_mode_appliedprivacy"
+ layout="@layout/preference_widget_dialog_radiobutton"/>
+
+ <include
+ android:id="@+id/private_dns_mode_cira"
+ layout="@layout/preference_widget_dialog_radiobutton"/>
+
+ <include
+ android:id="@+id/private_dns_mode_cleanbrowsing"
+ layout="@layout/preference_widget_dialog_radiobutton"/>
+
+ <include
+ android:id="@+id/private_dns_mode_cloudflare"
+ layout="@layout/preference_widget_dialog_radiobutton"/>
+
+ <include
+ android:id="@+id/private_dns_mode_cznic"
+ layout="@layout/preference_widget_dialog_radiobutton"/>
+
+ <include
+ android:id="@+id/private_dns_mode_google"
+ layout="@layout/preference_widget_dialog_radiobutton"/>
+
+ <include
+ android:id="@+id/private_dns_mode_mullvad"
+ layout="@layout/preference_widget_dialog_radiobutton"/>
+
+ <include
+ android:id="@+id/private_dns_mode_quadnine"
+ layout="@layout/preference_widget_dialog_radiobutton"/>
+
+ <include
+ android:id="@+id/private_dns_mode_restena"
+ layout="@layout/preference_widget_dialog_radiobutton"/>
+
+ <include
+ android:id="@+id/private_dns_mode_switch"
+ layout="@layout/preference_widget_dialog_radiobutton"/>
+
+ <include
+ android:id="@+id/private_dns_mode_twnic"
+ layout="@layout/preference_widget_dialog_radiobutton"/>
+
+ <include
+ android:id="@+id/private_dns_mode_uncensoreddns"
+ layout="@layout/preference_widget_dialog_radiobutton"/>
+
<include
android:id="@+id/private_dns_mode_opportunistic"
layout="@layout/preference_widget_dialog_radiobutton"/>
diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml
index eab927953c..ba078db9e1 100644
--- a/res/values/cm_strings.xml
+++ b/res/values/cm_strings.xml
@@ -152,6 +152,21 @@
<string name="data_usage_app_restrict_wifi">Wi\u2011Fi data</string>
<string name="data_usage_app_restrict_wifi_summary">Enable usage of Wi\u2011Fi data</string>
+ <!-- Private DNS -->
+ <string name="private_dns_mode_adguard" translatable="false">AdGuard (CY)</string>
+ <string name="private_dns_mode_appliedprivacy" translatable="false">AppliedPrivacy (AT)</string>
+ <string name="private_dns_mode_cira" translatable="false">CIRA (CA)</string>
+ <string name="private_dns_mode_cleanbrowsing" translatable="false">CleanBrowsing (US)</string>
+ <string name="private_dns_mode_cloudflare" translatable="false">Cloudflare (US)</string>
+ <string name="private_dns_mode_cznic" translatable="false">CZ.NIC (CZ)</string>
+ <string name="private_dns_mode_google" translatable="false">Google (US)</string>
+ <string name="private_dns_mode_mullvad" translatable="false">Mullvad (SE)</string>
+ <string name="private_dns_mode_quadnine" translatable="false">Quad9 (CH)</string>
+ <string name="private_dns_mode_restena" translatable="false">Restena (LU)</string>
+ <string name="private_dns_mode_switch" translatable="false">SWITCH (CH)</string>
+ <string name="private_dns_mode_twnic" translatable="false">TW.NIC (TW)</string>
+ <string name="private_dns_mode_uncensoreddns" translatable="false">UncensoredDNS (DK)</string>
+
<!-- PIN scramble -->
<string name="unlock_scramble_pin_layout_title">Scramble layout</string>
<string name="unlock_scramble_pin_layout_summary">Scramble PIN layout when unlocking device</string>
diff --git a/src/com/android/settings/network/PrivateDnsModeDialogPreference.java b/src/com/android/settings/network/PrivateDnsModeDialogPreference.java
index 5c7c54eda3..7088f7b372 100644
--- a/src/com/android/settings/network/PrivateDnsModeDialogPreference.java
+++ b/src/com/android/settings/network/PrivateDnsModeDialogPreference.java
@@ -72,9 +72,37 @@ public class PrivateDnsModeDialogPreference extends CustomDialogPreferenceCompat
// DNS_MODE -> RadioButton id
private static final Map<Integer, Integer> PRIVATE_DNS_MAP;
+ // Must match ConnectivitySettingsUtils
+ private static final int PRIVATE_DNS_MODE_ADGUARD = 4;
+ private static final int PRIVATE_DNS_MODE_APPLIEDPRIVACY = 5;
+ private static final int PRIVATE_DNS_MODE_CLEANBROWSING = 6;
+ private static final int PRIVATE_DNS_MODE_CIRA = 7;
+ private static final int PRIVATE_DNS_MODE_CZNIC = 8;
+ private static final int PRIVATE_DNS_MODE_CLOUDFLARE = 9;
+ private static final int PRIVATE_DNS_MODE_GOOGLE = 10;
+ private static final int PRIVATE_DNS_MODE_MULLVAD = 11;
+ private static final int PRIVATE_DNS_MODE_QUADNINE = 12;
+ private static final int PRIVATE_DNS_MODE_RESTENA = 13;
+ private static final int PRIVATE_DNS_MODE_SWITCH = 14;
+ private static final int PRIVATE_DNS_MODE_TWNIC = 15;
+ private static final int PRIVATE_DNS_MODE_UNCENSOREDDNS = 16;
+
static {
PRIVATE_DNS_MAP = new HashMap<>();
PRIVATE_DNS_MAP.put(PRIVATE_DNS_MODE_OFF, R.id.private_dns_mode_off);
+ PRIVATE_DNS_MAP.put(PRIVATE_DNS_MODE_ADGUARD, R.id.private_dns_mode_adguard);
+ PRIVATE_DNS_MAP.put(PRIVATE_DNS_MODE_APPLIEDPRIVACY, R.id.private_dns_mode_appliedprivacy);
+ PRIVATE_DNS_MAP.put(PRIVATE_DNS_MODE_CLEANBROWSING, R.id.private_dns_mode_cleanbrowsing);
+ PRIVATE_DNS_MAP.put(PRIVATE_DNS_MODE_CIRA, R.id.private_dns_mode_cira);
+ PRIVATE_DNS_MAP.put(PRIVATE_DNS_MODE_CZNIC, R.id.private_dns_mode_cznic);
+ PRIVATE_DNS_MAP.put(PRIVATE_DNS_MODE_CLOUDFLARE, R.id.private_dns_mode_cloudflare);
+ PRIVATE_DNS_MAP.put(PRIVATE_DNS_MODE_GOOGLE, R.id.private_dns_mode_google);
+ PRIVATE_DNS_MAP.put(PRIVATE_DNS_MODE_MULLVAD, R.id.private_dns_mode_mullvad);
+ PRIVATE_DNS_MAP.put(PRIVATE_DNS_MODE_QUADNINE, R.id.private_dns_mode_quadnine);
+ PRIVATE_DNS_MAP.put(PRIVATE_DNS_MODE_RESTENA, R.id.private_dns_mode_restena);
+ PRIVATE_DNS_MAP.put(PRIVATE_DNS_MODE_SWITCH, R.id.private_dns_mode_switch);
+ PRIVATE_DNS_MAP.put(PRIVATE_DNS_MODE_TWNIC, R.id.private_dns_mode_twnic);
+ PRIVATE_DNS_MAP.put(PRIVATE_DNS_MODE_UNCENSOREDDNS, R.id.private_dns_mode_uncensoreddns);
PRIVATE_DNS_MAP.put(PRIVATE_DNS_MODE_OPPORTUNISTIC, R.id.private_dns_mode_opportunistic);
PRIVATE_DNS_MAP.put(PRIVATE_DNS_MODE_PROVIDER_HOSTNAME, R.id.private_dns_mode_provider);
}
@@ -156,6 +184,45 @@ public class PrivateDnsModeDialogPreference extends CustomDialogPreferenceCompat
// Initial radio button text
final RadioButton offRadioButton = view.findViewById(R.id.private_dns_mode_off);
offRadioButton.setText(R.string.private_dns_mode_off);
+ final RadioButton adguardRadioButton =
+ view.findViewById(R.id.private_dns_mode_adguard);
+ adguardRadioButton.setText(R.string.private_dns_mode_adguard);
+ final RadioButton appliedprivacyRadioButton =
+ view.findViewById(R.id.private_dns_mode_appliedprivacy);
+ appliedprivacyRadioButton.setText(R.string.private_dns_mode_appliedprivacy);
+ final RadioButton ciraRadioButton =
+ view.findViewById(R.id.private_dns_mode_cira);
+ ciraRadioButton.setText(R.string.private_dns_mode_cira);
+ final RadioButton cleanbrowsingRadioButton =
+ view.findViewById(R.id.private_dns_mode_cleanbrowsing);
+ cleanbrowsingRadioButton.setText(R.string.private_dns_mode_cleanbrowsing);
+ final RadioButton cloudflareRadioButton =
+ view.findViewById(R.id.private_dns_mode_cloudflare);
+ cloudflareRadioButton.setText(R.string.private_dns_mode_cloudflare);
+ final RadioButton cznicRadioButton =
+ view.findViewById(R.id.private_dns_mode_cznic);
+ cznicRadioButton.setText(R.string.private_dns_mode_cznic);
+ final RadioButton googleRadioButton =
+ view.findViewById(R.id.private_dns_mode_google);
+ googleRadioButton.setText(R.string.private_dns_mode_google);
+ final RadioButton mullvadRadioButton =
+ view.findViewById(R.id.private_dns_mode_mullvad);
+ mullvadRadioButton.setText(R.string.private_dns_mode_mullvad);
+ final RadioButton quadnineRadioButton =
+ view.findViewById(R.id.private_dns_mode_quadnine);
+ quadnineRadioButton.setText(R.string.private_dns_mode_quadnine);
+ final RadioButton restenaRadioButton =
+ view.findViewById(R.id.private_dns_mode_restena);
+ restenaRadioButton.setText(R.string.private_dns_mode_restena);
+ final RadioButton switchRadioButton =
+ view.findViewById(R.id.private_dns_mode_switch);
+ switchRadioButton.setText(R.string.private_dns_mode_switch);
+ final RadioButton twnicRadioButton =
+ view.findViewById(R.id.private_dns_mode_twnic);
+ twnicRadioButton.setText(R.string.private_dns_mode_twnic);
+ final RadioButton uncensoreddnsRadioButton =
+ view.findViewById(R.id.private_dns_mode_uncensoreddns);
+ uncensoreddnsRadioButton.setText(R.string.private_dns_mode_uncensoreddns);
final RadioButton opportunisticRadioButton =
view.findViewById(R.id.private_dns_mode_opportunistic);
opportunisticRadioButton.setText(R.string.private_dns_mode_opportunistic);
@@ -197,6 +264,32 @@ public class PrivateDnsModeDialogPreference extends CustomDialogPreferenceCompat
public void onCheckedChanged(RadioGroup group, int checkedId) {
if (checkedId == R.id.private_dns_mode_off) {
mMode = PRIVATE_DNS_MODE_OFF;
+ } else if (checkedId == R.id.private_dns_mode_adguard) {
+ mMode = PRIVATE_DNS_MODE_ADGUARD;
+ } else if (checkedId == R.id.private_dns_mode_appliedprivacy) {
+ mMode = PRIVATE_DNS_MODE_APPLIEDPRIVACY;
+ } else if (checkedId == R.id.private_dns_mode_cira) {
+ mMode = PRIVATE_DNS_MODE_CIRA;
+ } else if (checkedId == R.id.private_dns_mode_cleanbrowsing) {
+ mMode = PRIVATE_DNS_MODE_CLEANBROWSING;
+ } else if (checkedId == R.id.private_dns_mode_cloudflare) {
+ mMode = PRIVATE_DNS_MODE_CLOUDFLARE;
+ } else if (checkedId == R.id.private_dns_mode_cznic) {
+ mMode = PRIVATE_DNS_MODE_CZNIC;
+ } else if (checkedId == R.id.private_dns_mode_google) {
+ mMode = PRIVATE_DNS_MODE_GOOGLE;
+ } else if (checkedId == R.id.private_dns_mode_mullvad) {
+ mMode = PRIVATE_DNS_MODE_MULLVAD;
+ } else if (checkedId == R.id.private_dns_mode_quadnine) {
+ mMode = PRIVATE_DNS_MODE_QUADNINE;
+ } else if (checkedId == R.id.private_dns_mode_restena) {
+ mMode = PRIVATE_DNS_MODE_RESTENA;
+ } else if (checkedId == R.id.private_dns_mode_switch) {
+ mMode = PRIVATE_DNS_MODE_SWITCH;
+ } else if (checkedId == R.id.private_dns_mode_twnic) {
+ mMode = PRIVATE_DNS_MODE_TWNIC;
+ } else if (checkedId == R.id.private_dns_mode_uncensoreddns) {
+ mMode = PRIVATE_DNS_MODE_UNCENSOREDDNS;
} else if (checkedId == R.id.private_dns_mode_opportunistic) {
mMode = PRIVATE_DNS_MODE_OPPORTUNISTIC;
} else if (checkedId == R.id.private_dns_mode_provider) {
diff --git a/src/com/android/settings/network/PrivateDnsPreferenceController.java b/src/com/android/settings/network/PrivateDnsPreferenceController.java
index ed6f9ed955..03f8d230ef 100644
--- a/src/com/android/settings/network/PrivateDnsPreferenceController.java
+++ b/src/com/android/settings/network/PrivateDnsPreferenceController.java
@@ -65,6 +65,21 @@ public class PrivateDnsPreferenceController extends BasePreferenceController
Settings.Global.getUriFor(PRIVATE_DNS_SPECIFIER),
};
+ // Must match ConnectivitySettingsUtils
+ private static final int PRIVATE_DNS_MODE_ADGUARD = 4;
+ private static final int PRIVATE_DNS_MODE_APPLIEDPRIVACY = 5;
+ private static final int PRIVATE_DNS_MODE_CLEANBROWSING = 6;
+ private static final int PRIVATE_DNS_MODE_CIRA = 7;
+ private static final int PRIVATE_DNS_MODE_CZNIC = 8;
+ private static final int PRIVATE_DNS_MODE_CLOUDFLARE = 9;
+ private static final int PRIVATE_DNS_MODE_GOOGLE = 10;
+ private static final int PRIVATE_DNS_MODE_MULLVAD = 11;
+ private static final int PRIVATE_DNS_MODE_QUADNINE = 12;
+ private static final int PRIVATE_DNS_MODE_RESTENA = 13;
+ private static final int PRIVATE_DNS_MODE_SWITCH = 14;
+ private static final int PRIVATE_DNS_MODE_TWNIC = 15;
+ private static final int PRIVATE_DNS_MODE_UNCENSOREDDNS = 16;
+
private final Handler mHandler;
private final ContentObserver mSettingsObserver;
private final ConnectivityManager mConnectivityManager;
@@ -129,6 +144,58 @@ public class PrivateDnsPreferenceController extends BasePreferenceController
switch (mode) {
case PRIVATE_DNS_MODE_OFF:
return res.getString(R.string.private_dns_mode_off);
+ case PRIVATE_DNS_MODE_ADGUARD:
+ return dnsesResolved
+ ? res.getString(R.string.private_dns_mode_adguard)
+ : res.getString(R.string.private_dns_mode_provider_failure);
+ case PRIVATE_DNS_MODE_APPLIEDPRIVACY:
+ return dnsesResolved
+ ? res.getString(R.string.private_dns_mode_appliedprivacy)
+ : res.getString(R.string.private_dns_mode_provider_failure);
+ case PRIVATE_DNS_MODE_CIRA:
+ return dnsesResolved
+ ? res.getString(R.string.private_dns_mode_cira)
+ : res.getString(R.string.private_dns_mode_provider_failure);
+ case PRIVATE_DNS_MODE_CLEANBROWSING:
+ return dnsesResolved
+ ? res.getString(R.string.private_dns_mode_cleanbrowsing)
+ : res.getString(R.string.private_dns_mode_provider_failure);
+ case PRIVATE_DNS_MODE_CLOUDFLARE:
+ return dnsesResolved
+ ? res.getString(R.string.private_dns_mode_cloudflare)
+ : res.getString(R.string.private_dns_mode_provider_failure);
+ case PRIVATE_DNS_MODE_CZNIC:
+ return dnsesResolved
+ ? res.getString(R.string.private_dns_mode_cznic)
+ : res.getString(R.string.private_dns_mode_provider_failure);
+ case PRIVATE_DNS_MODE_GOOGLE:
+ return dnsesResolved
+ ? res.getString(R.string.private_dns_mode_google)
+ : res.getString(R.string.private_dns_mode_provider_failure);
+ case PRIVATE_DNS_MODE_MULLVAD:
+ return dnsesResolved
+ ? res.getString(R.string.private_dns_mode_mullvad)
+ : res.getString(R.string.private_dns_mode_provider_failure);
+ case PRIVATE_DNS_MODE_QUADNINE:
+ return dnsesResolved
+ ? res.getString(R.string.private_dns_mode_quadnine)
+ : res.getString(R.string.private_dns_mode_provider_failure);
+ case PRIVATE_DNS_MODE_RESTENA:
+ return dnsesResolved
+ ? res.getString(R.string.private_dns_mode_restena)
+ : res.getString(R.string.private_dns_mode_provider_failure);
+ case PRIVATE_DNS_MODE_SWITCH:
+ return dnsesResolved
+ ? res.getString(R.string.private_dns_mode_switch)
+ : res.getString(R.string.private_dns_mode_provider_failure);
+ case PRIVATE_DNS_MODE_TWNIC:
+ return dnsesResolved
+ ? res.getString(R.string.private_dns_mode_twnic)
+ : res.getString(R.string.private_dns_mode_provider_failure);
+ case PRIVATE_DNS_MODE_UNCENSOREDDNS:
+ return dnsesResolved
+ ? res.getString(R.string.private_dns_mode_uncensoreddns)
+ : res.getString(R.string.private_dns_mode_provider_failure);
case PRIVATE_DNS_MODE_OPPORTUNISTIC:
return dnsesResolved ? res.getString(R.string.private_dns_mode_on)
: res.getString(R.string.private_dns_mode_opportunistic);

View File

@ -14,11 +14,14 @@ Co-authored-by: Renlord <me@renlord.com>
Co-authored-by: Danny Lin <danny@kdrag0n.dev>
Co-authored-by: anupritaisno1 <www.anuprita804@gmail.com>
Signed-off-by: empratyush <codelab@pratyush.dev>
[tad@spotco.us]: removed the option for GrapheneOS servers
Change-Id: I8a762d0f29ac42fce3dcfc7189e8ff216a8f8d1a
---
res/values/arrays.xml | 10 +
res/values/strings.xml | 3 +
...ConnectivityCheckPreferenceController.java | 176 ++++++++++++++++++
.../network/NetworkDashboardFragment.java | 3 +
3 files changed, 189 insertions(+)
4 files changed, 192 insertions(+)
create mode 100644 src/com/android/settings/network/ConnectivityCheckPreferenceController.java
diff --git a/res/values/arrays.xml b/res/values/arrays.xml
@ -42,6 +45,18 @@ index cfc7671652..7fac175770 100644
<!-- Security settings. The delay after screen is turned off until device locks.
These are shown in a list dialog. -->
<string-array name="lock_after_timeout_entries">
diff --git a/res/values/strings.xml b/res/values/strings.xml
index baed6e68f5..f692139c80 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -14233,4 +14233,7 @@
<!-- [CHAR LIMIT=NONE] Hint for QR code process failure -->
<string name="bt_le_audio_qr_code_is_not_valid_format">QR code isn\u0027t a valid format</string>
+ <string name="connectivity_check_title">Internet connectivity check</string>
+ <string name="connectivity_check_summary">HTTP endpoints to use for performing internet connectivity checks.</string>
+
</resources>
diff --git a/src/com/android/settings/network/ConnectivityCheckPreferenceController.java b/src/com/android/settings/network/ConnectivityCheckPreferenceController.java
new file mode 100644
index 0000000000..bf16eb825a

View File

@ -0,0 +1,314 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tad <tad@spotco.us>
Date: Mon, 24 Jun 2019 21:27:35 +0530
Subject: [PATCH] Add more 'Private DNS' options
This adds thirteen DNS providers as available presets.
Credit: CalyxOS
- Chirayu Desai <chirayudesai1@gmail.com>
https://review.calyxos.org/c/CalyxOS/platform_packages_modules_Connectivity/+/9588
Change-Id: I4e51da9d8fe08d1c4a287808f4464c0338b40334
---
.../net/ConnectivitySettingsManager.java | 170 ++++++++++++++++++
.../server/connectivity/DnsManager.java | 78 ++++++++
2 files changed, 248 insertions(+)
diff --git a/framework/src/android/net/ConnectivitySettingsManager.java b/framework/src/android/net/ConnectivitySettingsManager.java
index 32f831979..021937cce 100644
--- a/framework/src/android/net/ConnectivitySettingsManager.java
+++ b/framework/src/android/net/ConnectivitySettingsManager.java
@@ -351,6 +351,84 @@ public class ConnectivitySettingsManager {
*/
public static final int PRIVATE_DNS_MODE_OFF = ConnectivitySettingsUtils.PRIVATE_DNS_MODE_OFF;
+ /**
+ * @hide
+ */
+ public static final int PRIVATE_DNS_MODE_ADGUARD =
+ ConnectivitySettingsUtils.PRIVATE_DNS_MODE_ADGUARD;
+
+ /**
+ * @hide
+ */
+ public static final int PRIVATE_DNS_MODE_APPLIEDPRIVACY =
+ ConnectivitySettingsUtils.PRIVATE_DNS_MODE_APPLIEDPRIVACY;
+
+ /**
+ * @hide
+ */
+ public static final int PRIVATE_DNS_MODE_CLEANBROWSING =
+ ConnectivitySettingsUtils.PRIVATE_DNS_MODE_CLEANBROWSING;
+
+ /**
+ * @hide
+ */
+ public static final int PRIVATE_DNS_MODE_CIRA =
+ ConnectivitySettingsUtils.PRIVATE_DNS_MODE_CIRA;
+
+ /**
+ * @hide
+ */
+ public static final int PRIVATE_DNS_MODE_CZNIC =
+ ConnectivitySettingsUtils.PRIVATE_DNS_MODE_CZNIC;
+
+ /**
+ * @hide
+ */
+ public static final int PRIVATE_DNS_MODE_CLOUDFLARE =
+ ConnectivitySettingsUtils.PRIVATE_DNS_MODE_CLOUDFLARE;
+
+ /**
+ * @hide
+ */
+ public static final int PRIVATE_DNS_MODE_GOOGLE =
+ ConnectivitySettingsUtils.PRIVATE_DNS_MODE_GOOGLE;
+
+ /**
+ * @hide
+ */
+ public static final int PRIVATE_DNS_MODE_MULLVAD =
+ ConnectivitySettingsUtils.PRIVATE_DNS_MODE_MULLVAD;
+
+ /**
+ * @hide
+ */
+ public static final int PRIVATE_DNS_MODE_QUADNINE =
+ ConnectivitySettingsUtils.PRIVATE_DNS_MODE_QUADNINE;
+
+ /**
+ * @hide
+ */
+ public static final int PRIVATE_DNS_MODE_RESTENA =
+ ConnectivitySettingsUtils.PRIVATE_DNS_MODE_RESTENA;
+
+ /**
+ * @hide
+ */
+ public static final int PRIVATE_DNS_MODE_SWITCH =
+ ConnectivitySettingsUtils.PRIVATE_DNS_MODE_SWITCH;
+
+ /**
+ * @hide
+ */
+ public static final int PRIVATE_DNS_MODE_TWNIC =
+ ConnectivitySettingsUtils.PRIVATE_DNS_MODE_TWNIC;
+
+ /**
+ * @hide
+ */
+ public static final int PRIVATE_DNS_MODE_UNCENSOREDDNS =
+ ConnectivitySettingsUtils.PRIVATE_DNS_MODE_UNCENSOREDDNS;
+
/**
* One of the private DNS modes that indicates the private DNS mode is automatic, which
* will try to use the current DNS as private DNS.
@@ -366,10 +444,89 @@ public class ConnectivitySettingsManager {
public static final int PRIVATE_DNS_MODE_PROVIDER_HOSTNAME =
ConnectivitySettingsUtils.PRIVATE_DNS_MODE_PROVIDER_HOSTNAME;
+ /**
+ * @hide
+ */
+ public static final String PRIVATE_DNS_SPECIFIER_ADGUARD = "dns.adguard.com";
+
+ /**
+ * @hide
+ */
+ public static final String PRIVATE_DNS_SPECIFIER_APPLIEDPRIVACY = "dot1.applied-privacy.net";
+
+ /**
+ * @hide
+ */
+ public static final String PRIVATE_DNS_SPECIFIER_CIRA = "protected.canadianshield.cira.ca";
+
+ /**
+ * @hide
+ */
+ public static final String PRIVATE_DNS_SPECIFIER_CZNIC = "odvr.nic.cz";
+
+ /**
+ * @hide
+ */
+ public static final String PRIVATE_DNS_SPECIFIER_CLEANBROWSING = "security-filter-dns.cleanbrowsing.org";
+
+ /**
+ * @hide
+ */
+ public static final String PRIVATE_DNS_SPECIFIER_CLOUDFLARE = "security.cloudflare-dns.com";
+
+ /**
+ * @hide
+ */
+ public static final String PRIVATE_DNS_SPECIFIER_GOOGLE = "dns.google";
+
+ /**
+ * @hide
+ */
+ public static final String PRIVATE_DNS_SPECIFIER_MULLVAD = "adblock.doh.mullvad.net";
+
+ /**
+ * @hide
+ */
+ public static final String PRIVATE_DNS_SPECIFIER_QUADNINE = "dns.quad9.net";
+
+ /**
+ * @hide
+ */
+ public static final String PRIVATE_DNS_SPECIFIER_RESTENA = "kaitain.restena.lu";
+
+ /**
+ * @hide
+ */
+ public static final String PRIVATE_DNS_SPECIFIER_SWITCH = "dns.switch.ch";
+
+ /**
+ * @hide
+ */
+ public static final String PRIVATE_DNS_SPECIFIER_TWNIC = "101.101.101.101";
+
+ /**
+ * @hide
+ */
+ public static final String PRIVATE_DNS_SPECIFIER_UNCENSOREDDNS = "unicast.censurfridns.dk";
+
+
/** @hide */
@Retention(RetentionPolicy.SOURCE)
@IntDef(value = {
PRIVATE_DNS_MODE_OFF,
+ PRIVATE_DNS_MODE_ADGUARD,
+ PRIVATE_DNS_MODE_APPLIEDPRIVACY,
+ PRIVATE_DNS_MODE_CLEANBROWSING,
+ PRIVATE_DNS_MODE_CIRA,
+ PRIVATE_DNS_MODE_CZNIC,
+ PRIVATE_DNS_MODE_CLOUDFLARE,
+ PRIVATE_DNS_MODE_GOOGLE,
+ PRIVATE_DNS_MODE_MULLVAD,
+ PRIVATE_DNS_MODE_QUADNINE,
+ PRIVATE_DNS_MODE_RESTENA,
+ PRIVATE_DNS_MODE_SWITCH,
+ PRIVATE_DNS_MODE_TWNIC,
+ PRIVATE_DNS_MODE_UNCENSOREDDNS,
PRIVATE_DNS_MODE_OPPORTUNISTIC,
PRIVATE_DNS_MODE_PROVIDER_HOSTNAME,
})
@@ -806,6 +963,19 @@ public class ConnectivitySettingsManager {
public static void setPrivateDnsDefaultMode(@NonNull Context context,
@NonNull @PrivateDnsMode int mode) {
if (!(mode == PRIVATE_DNS_MODE_OFF
+ || mode == PRIVATE_DNS_MODE_ADGUARD
+ || mode == PRIVATE_DNS_MODE_APPLIEDPRIVACY
+ || mode == PRIVATE_DNS_MODE_CLEANBROWSING
+ || mode == PRIVATE_DNS_MODE_CIRA
+ || mode == PRIVATE_DNS_MODE_CZNIC
+ || mode == PRIVATE_DNS_MODE_CLOUDFLARE
+ || mode == PRIVATE_DNS_MODE_GOOGLE
+ || mode == PRIVATE_DNS_MODE_MULLVAD
+ || mode == PRIVATE_DNS_MODE_QUADNINE
+ || mode == PRIVATE_DNS_MODE_RESTENA
+ || mode == PRIVATE_DNS_MODE_SWITCH
+ || mode == PRIVATE_DNS_MODE_TWNIC
+ || mode == PRIVATE_DNS_MODE_UNCENSOREDDNS
|| mode == PRIVATE_DNS_MODE_OPPORTUNISTIC
|| mode == PRIVATE_DNS_MODE_PROVIDER_HOSTNAME)) {
throw new IllegalArgumentException("Invalid private dns mode");
diff --git a/service/src/com/android/server/connectivity/DnsManager.java b/service/src/com/android/server/connectivity/DnsManager.java
index 1493cae79..2a5058c3c 100644
--- a/service/src/com/android/server/connectivity/DnsManager.java
+++ b/service/src/com/android/server/connectivity/DnsManager.java
@@ -23,8 +23,34 @@ import static android.net.ConnectivitySettingsManager.DNS_RESOLVER_SUCCESS_THRES
import static android.net.ConnectivitySettingsManager.PRIVATE_DNS_DEFAULT_MODE;
import static android.net.ConnectivitySettingsManager.PRIVATE_DNS_MODE;
import static android.net.ConnectivitySettingsManager.PRIVATE_DNS_MODE_OFF;
+import static android.net.ConnectivitySettingsManager.PRIVATE_DNS_MODE_ADGUARD;
+import static android.net.ConnectivitySettingsManager.PRIVATE_DNS_MODE_APPLIEDPRIVACY;
+import static android.net.ConnectivitySettingsManager.PRIVATE_DNS_MODE_CLEANBROWSING;
+import static android.net.ConnectivitySettingsManager.PRIVATE_DNS_MODE_CIRA;
+import static android.net.ConnectivitySettingsManager.PRIVATE_DNS_MODE_CZNIC;
+import static android.net.ConnectivitySettingsManager.PRIVATE_DNS_MODE_CLOUDFLARE;
+import static android.net.ConnectivitySettingsManager.PRIVATE_DNS_MODE_GOOGLE;
+import static android.net.ConnectivitySettingsManager.PRIVATE_DNS_MODE_MULLVAD;
+import static android.net.ConnectivitySettingsManager.PRIVATE_DNS_MODE_QUADNINE;
+import static android.net.ConnectivitySettingsManager.PRIVATE_DNS_MODE_RESTENA;
+import static android.net.ConnectivitySettingsManager.PRIVATE_DNS_MODE_SWITCH;
+import static android.net.ConnectivitySettingsManager.PRIVATE_DNS_MODE_TWNIC;
+import static android.net.ConnectivitySettingsManager.PRIVATE_DNS_MODE_UNCENSOREDDNS;
import static android.net.ConnectivitySettingsManager.PRIVATE_DNS_MODE_PROVIDER_HOSTNAME;
import static android.net.ConnectivitySettingsManager.PRIVATE_DNS_SPECIFIER;
+import static android.net.ConnectivitySettingsManager.PRIVATE_DNS_SPECIFIER_ADGUARD;
+import static android.net.ConnectivitySettingsManager.PRIVATE_DNS_SPECIFIER_APPLIEDPRIVACY;
+import static android.net.ConnectivitySettingsManager.PRIVATE_DNS_SPECIFIER_CLEANBROWSING;
+import static android.net.ConnectivitySettingsManager.PRIVATE_DNS_SPECIFIER_CIRA;
+import static android.net.ConnectivitySettingsManager.PRIVATE_DNS_SPECIFIER_CZNIC;
+import static android.net.ConnectivitySettingsManager.PRIVATE_DNS_SPECIFIER_CLOUDFLARE;
+import static android.net.ConnectivitySettingsManager.PRIVATE_DNS_SPECIFIER_GOOGLE;
+import static android.net.ConnectivitySettingsManager.PRIVATE_DNS_SPECIFIER_MULLVAD;
+import static android.net.ConnectivitySettingsManager.PRIVATE_DNS_SPECIFIER_QUADNINE;
+import static android.net.ConnectivitySettingsManager.PRIVATE_DNS_SPECIFIER_RESTENA;
+import static android.net.ConnectivitySettingsManager.PRIVATE_DNS_SPECIFIER_SWITCH;
+import static android.net.ConnectivitySettingsManager.PRIVATE_DNS_SPECIFIER_TWNIC;
+import static android.net.ConnectivitySettingsManager.PRIVATE_DNS_SPECIFIER_UNCENSOREDDNS;
import static android.net.resolv.aidl.IDnsResolverUnsolicitedEventListener.VALIDATION_RESULT_FAILURE;
import static android.net.resolv.aidl.IDnsResolverUnsolicitedEventListener.VALIDATION_RESULT_SUCCESS;
@@ -141,6 +167,58 @@ public class DnsManager {
return new PrivateDnsConfig(specifier, null);
}
+ if (PRIVATE_DNS_MODE_ADGUARD == mode) {
+ return new PrivateDnsConfig(PRIVATE_DNS_SPECIFIER_ADGUARD, null);
+ }
+
+ if (PRIVATE_DNS_MODE_APPLIEDPRIVACY == mode) {
+ return new PrivateDnsConfig(PRIVATE_DNS_SPECIFIER_APPLIEDPRIVACY, null);
+ }
+
+ if (PRIVATE_DNS_MODE_CLEANBROWSING == mode) {
+ return new PrivateDnsConfig(PRIVATE_DNS_SPECIFIER_CLEANBROWSING, null);
+ }
+
+ if (PRIVATE_DNS_MODE_CIRA == mode) {
+ return new PrivateDnsConfig(PRIVATE_DNS_SPECIFIER_CIRA, null);
+ }
+
+ if (PRIVATE_DNS_MODE_CZNIC == mode) {
+ return new PrivateDnsConfig(PRIVATE_DNS_SPECIFIER_CZNIC, null);
+ }
+
+ if (PRIVATE_DNS_MODE_CLOUDFLARE == mode) {
+ return new PrivateDnsConfig(PRIVATE_DNS_SPECIFIER_CLOUDFLARE, null);
+ }
+
+ if (PRIVATE_DNS_MODE_GOOGLE == mode) {
+ return new PrivateDnsConfig(PRIVATE_DNS_SPECIFIER_GOOGLE, null);
+ }
+
+ if (PRIVATE_DNS_MODE_MULLVAD == mode) {
+ return new PrivateDnsConfig(PRIVATE_DNS_SPECIFIER_MULLVAD, null);
+ }
+
+ if (PRIVATE_DNS_MODE_QUADNINE == mode) {
+ return new PrivateDnsConfig(PRIVATE_DNS_SPECIFIER_QUADNINE, null);
+ }
+
+ if (PRIVATE_DNS_MODE_RESTENA == mode) {
+ return new PrivateDnsConfig(PRIVATE_DNS_SPECIFIER_RESTENA, null);
+ }
+
+ if (PRIVATE_DNS_MODE_SWITCH == mode) {
+ return new PrivateDnsConfig(PRIVATE_DNS_SPECIFIER_SWITCH, null);
+ }
+
+ if (PRIVATE_DNS_MODE_TWNIC == mode) {
+ return new PrivateDnsConfig(PRIVATE_DNS_SPECIFIER_TWNIC, null);
+ }
+
+ if (PRIVATE_DNS_MODE_UNCENSOREDDNS == mode) {
+ return new PrivateDnsConfig(PRIVATE_DNS_SPECIFIER_UNCENSOREDDNS, null);
+ }
+
return new PrivateDnsConfig(useTls);
}

View File

@ -873,6 +873,7 @@ deblobVendorBp() {
#TODO make this work for more then these two blobs
#Credit: https://stackoverflow.com/a/26053127
sed -i ':a;N;s/\n/&/3;Ta;/manifest_android.hardware.drm@1.*-service.widevine.xml/!{P;D};:b;N;s/\n/&/8;Tb;d' "$bpfile";
sed -i ':a;N;s/\n/&/3;Ta;/manifest_android.hardware.drm-service.widevine.xml/!{P;D};:b;N;s/\n/&/8;Tb;d' "$bpfile";
sed -i ':a;N;s/\n/&/3;Ta;/manifest_vendor.xiaomi.hardware.mlipay.xml/!{P;D};:b;N;s/\n/&/8;Tb;d' "$bpfile";
sed -i ':a;N;s/\n/&/3;Ta;/vendor.qti.hardware.radio.atcmdfwd@1.0.xml/!{P;D};:b;N;s/\n/&/8;Tb;d' "$bpfile";
}

View File

@ -224,8 +224,19 @@ processRelease() {
echo -e "\e[0;32m\t+ Verified Boot 2.0 with VBMETA and NOCHAIN\e[0m";
fi;
if [[ "$DOS_VERSION" == "LineageOS-17.1" ]] || [[ "$DOS_VERSION" == "LineageOS-18.1" ]] || [[ "$DOS_VERSION" == "LineageOS-19.1" ]]; then
local APEX_SWITCHES=(--extra_apks com.android.adbd.apex="$KEY_DIR/releasekey" \
local APEX_SWITCHES=(--extra_apks AdServicesApk.apk="$KEY_DIR/releasekey" \
--extra_apks Bluetooth.apk="$KEY_DIR/bluetooth" \
--extra_apks HalfSheetUX.apk="$KEY_DIR/releasekey" \
--extra_apks OsuLogin.apk="$KEY_DIR/releasekey" \
--extra_apks SafetyCenterResources.apk="$KEY_DIR/releasekey" \
--extra_apks ServiceConnectivityResources.apk="$KEY_DIR/releasekey" \
--extra_apks ServiceUwbResources.apk="$KEY_DIR/releasekey" \
--extra_apks ServiceWifiResources.apk="$KEY_DIR/releasekey" \
--extra_apks WifiDialog.apk="$KEY_DIR/releasekey" \
--extra_apks com.android.adbd.apex="$KEY_DIR/releasekey" \
--extra_apex_payload_key com.android.adbd.apex="$KEY_DIR/avb.pem" \
--extra_apks com.android.adservices.apex="$KEY_DIR/releasekey" \
--extra_apex_payload_key com.android.adservices.apex="$KEY_DIR/avb.pem" \
--extra_apks com.android.apex.cts.shim.apex="$KEY_DIR/releasekey" \
--extra_apex_payload_key com.android.apex.cts.shim.apex="$KEY_DIR/avb.pem" \
--extra_apks com.android.appsearch.apex="$KEY_DIR/releasekey" \
@ -234,8 +245,12 @@ processRelease() {
--extra_apex_payload_key com.android.art.apex="$KEY_DIR/avb.pem" \
--extra_apks com.android.art.debug.apex="$KEY_DIR/releasekey" \
--extra_apex_payload_key com.android.art.debug.apex="$KEY_DIR/avb.pem" \
--extra_apks com.android.btservices.apex="$KEY_DIR/bluetooth" \
--extra_apex_payload_key com.android.btservices.apex="$KEY_DIR/avb.pem" \
--extra_apks com.android.cellbroadcast.apex="$KEY_DIR/releasekey" \
--extra_apex_payload_key com.android.cellbroadcast.apex="$KEY_DIR/avb.pem" \
--extra_apks com.android.compos.apex="$KEY_DIR/releasekey" \
--extra_apex_payload_key com.android.compos.apex="$KEY_DIR/avb.pem" \
--extra_apks com.android.conscrypt.apex="$KEY_DIR/releasekey" \
--extra_apex_payload_key com.android.conscrypt.apex="$KEY_DIR/avb.pem" \
--extra_apks com.android.extservices.apex="$KEY_DIR/releasekey" \
@ -252,6 +267,8 @@ processRelease() {
--extra_apex_payload_key com.android.mediaprovider.apex="$KEY_DIR/avb.pem" \
--extra_apks com.android.neuralnetworks.apex="$KEY_DIR/releasekey" \
--extra_apex_payload_key com.android.neuralnetworks.apex="$KEY_DIR/avb.pem" \
--extra_apks com.android.ondevicepersonalization.apex="$KEY_DIR/releasekey" \
--extra_apex_payload_key com.android.ondevicepersonalization.apex="$KEY_DIR/avb.pem" \
--extra_apks com.android.os.statsd.apex="$KEY_DIR/releasekey" \
--extra_apex_payload_key com.android.os.statsd.apex="$KEY_DIR/avb.pem" \
--extra_apks com.android.permission.apex="$KEY_DIR/releasekey" \
@ -268,6 +285,10 @@ processRelease() {
--extra_apex_payload_key com.android.tethering.apex="$KEY_DIR/avb.pem" \
--extra_apks com.android.tzdata.apex="$KEY_DIR/releasekey" \
--extra_apex_payload_key com.android.tzdata.apex="$KEY_DIR/avb.pem" \
--extra_apks com.android.uwb.apex="$KEY_DIR/releasekey" \
--extra_apex_payload_key com.android.uwb.apex="$KEY_DIR/avb.pem" \
--extra_apks com.android.virt.apex="$KEY_DIR/releasekey" \
--extra_apex_payload_key com.android.virt.apex="$KEY_DIR/avb.pem" \
--extra_apks com.android.vndk.current.apex="$KEY_DIR/releasekey" \
--extra_apex_payload_key com.android.vndk.current.apex="$KEY_DIR/avb.pem" \
--extra_apks com.android.wifi.apex="$KEY_DIR/releasekey" \

View File

@ -54,8 +54,8 @@ buildAll() {
buildDevice discovery;
#SD835
buildDevice cheryl verity;
buildDevice cheeseburger verity;
buildDevice dumpling verity;
buildDevice cheeseburger verity; #superseded
buildDevice dumpling verity; #superseded
buildDevice mata verity;
buildDevice taimen avb;
buildDevice walleye avb;
@ -65,38 +65,38 @@ buildAll() {
buildDevice pro1 avb;
buildDevice crosshatch avb;
buildDevice blueline avb;
buildDevice enchilada avb;
buildDevice fajita avb;
buildDevice enchilada avb; #superseded
buildDevice fajita avb; #superseded
buildDevice akari avb;
buildDevice aurora avb;
buildDevice xz2c avb;
#SD730
buildDevice sunfish avb;
buildDevice sunfish avb; #superseded
#SD632
buildDevice FP3 avb;
#SD750
buildDevice FP4 avb; #unb
buildDevice FP4 avb; #unb #superseded
#SD855
buildDevice guacamole avb; #unb
buildDevice guacamoleb avb; #unb
buildDevice hotdog avb; #unb
buildDevice hotdogb avb; #unb
buildDevice coral avb;
buildDevice flame avb;
buildDevice guacamole avb; #unb #superseded
buildDevice guacamoleb avb; #unb #superseded
buildDevice hotdog avb; #unb #superseded
buildDevice hotdogb avb; #unb #superseded
buildDevice coral avb; #superseded
buildDevice flame avb; #superseded
buildDevice vayu avb;
#SD865
buildDevice instantnoodle avb;
buildDevice instantnoodlep avb;
buildDevice kebab avb;
buildDevice instantnoodle avb; #superseded
buildDevice instantnoodlep avb; #superseded
buildDevice kebab avb; #superseded
buildDevice lmi avb;
#SD870
buildDevice alioth avb;
#SD888
buildDevice lemonade avb;
buildDevice lemonadep avb;
buildDevice lemonade avb; #superseded
buildDevice lemonadep avb; #superseded
#SD765
buildDevice bramble avb;
buildDevice redfin avb;
buildDevice bramble avb; #superseded
buildDevice redfin avb; #superseded
#TODO: barbet
#SD670
buildDevice bonito avb;

View File

@ -58,12 +58,12 @@ buildAll() {
#SD730
buildDevice sunfish avb;
#SD750
buildDevice FP4 avb; #unb
buildDevice FP4 avb;
#SD855
buildDevice guacamole avb; #unb
buildDevice guacamoleb avb; #unb
buildDevice hotdog avb; #unb
buildDevice hotdogb avb; #unb
buildDevice guacamole avb;
buildDevice guacamoleb avb;
buildDevice hotdog avb;
buildDevice hotdogb avb;
buildDevice coral avb;
buildDevice flame avb;
#SD865

View File

@ -159,7 +159,7 @@ applyPatch "$DOS_PATCHES/android_frameworks_base/0021-Boot_Animation.patch"; #Us
applyPatch "$DOS_PATCHES/android_frameworks_base/0022-Ignore_StatementService_ANR.patch"; #Don't report statementservice crashes (GrapheneOS)
#applyPatch "$DOS_PATCHES/android_frameworks_base/326692.patch"; #Skip screen on animation when wake and unlock via biometrics (jesec) #TODO: 20REBASE
applyPatch "$DOS_PATCHES/android_frameworks_base/0023-Skip_Screen_Animation.patch"; #SystemUI: Skip screen-on animation in all scenarios (kdrag0n)
applyPatch "$DOS_PATCHES/android_frameworks_base/0024-Burnin_Protection.patch"; #SystemUI: add burnIn protection (arter97)
#applyPatch "$DOS_PATCHES/android_frameworks_base/0024-Burnin_Protection.patch"; #SystemUI: add burnIn protection (arter97) #TODO: 20REBASE
applyPatch "$DOS_PATCHES/android_frameworks_base/0025-Monet_Toggle.patch"; #Make monet based theming user configurable (GrapheneOS)
applyPatch "$DOS_PATCHES/android_frameworks_base/0026-Crash_Details.patch"; #Add an option to show the details of an application error to the user (GrapheneOS)
hardenLocationConf services/core/java/com/android/server/location/gnss/gps_debug.conf; #Harden the default GPS config
@ -180,9 +180,9 @@ if enterAndClear "frameworks/ex"; then
if [ "$DOS_GRAPHENE_CONSTIFY" = true ]; then applyPatch "$DOS_PATCHES/android_frameworks_ex/0001-constify_JNINativeMethod.patch"; fi; #Constify JNINativeMethod tables (GrapheneOS)
fi;
#if enterAndClear "frameworks/libs/net"; then
#applyPatch "$DOS_PATCHES/android_frameworks_libs_net/0001-Private_DNS.patch"; #More 'Private DNS' options (heavily based off of a CalyxOS patch) #TODO: 20REBASE
#fi;
if enterAndClear "frameworks/libs/net"; then
applyPatch "$DOS_PATCHES/android_frameworks_libs_net/0001-Private_DNS.patch"; #More 'Private DNS' options (heavily based off of a CalyxOS patch)
fi;
if enterAndClear "frameworks/libs/systemui"; then
applyPatch "$DOS_PATCHES/android_frameworks_libs_systemui/0001-Icon_Cache.patch"; #Invalidate icon cache between OS releases (GrapheneOS)
@ -262,7 +262,7 @@ if [ "$DOS_GRAPHENE_CONSTIFY" = true ]; then applyPatch "$DOS_PATCHES/android_pa
fi;
if enterAndClear "packages/apps/Settings"; then
#applyPatch "$DOS_PATCHES/android_packages_apps_Settings/0004-Private_DNS.patch"; #More 'Private DNS' options (heavily based off of a CalyxOS patch) #TODO: 20REBASE
applyPatch "$DOS_PATCHES/android_packages_apps_Settings/0004-Private_DNS.patch"; #More 'Private DNS' options (heavily based off of a CalyxOS patch)
applyPatch "$DOS_PATCHES/android_packages_apps_Settings/0005-Automatic_Reboot.patch"; #Timeout for reboot (GrapheneOS)
applyPatch "$DOS_PATCHES/android_packages_apps_Settings/0006-Bluetooth_Timeout.patch"; #Timeout for Bluetooth (CalyxOS)
applyPatch "$DOS_PATCHES/android_packages_apps_Settings/0007-WiFi_Timeout.patch"; #Timeout for Wi-Fi (CalyxOS)
@ -298,9 +298,9 @@ applyPatch "$DOS_PATCHES_COMMON/android_packages_inputmethods_LatinIME/0001-Voic
applyPatch "$DOS_PATCHES_COMMON/android_packages_inputmethods_LatinIME/0002-Disable_Personalization.patch"; #Disable personalization dictionary by default (GrapheneOS)
fi;
#if enterAndClear "packages/modules/Connectivity"; then
#applyPatch "$DOS_PATCHES/android_packages_modules_Connectivity/0002-Private_DNS.patch"; #More 'Private DNS' options (heavily based off of a CalyxOS patch) #TODO: 20REBASE
#fi;
if enterAndClear "packages/modules/Connectivity"; then
applyPatch "$DOS_PATCHES/android_packages_modules_Connectivity/0002-Private_DNS.patch"; #More 'Private DNS' options (heavily based off of a CalyxOS patch)
fi;
if enterAndClear "packages/modules/DnsResolver"; then
applyPatch "$DOS_PATCHES/android_packages_modules_DnsResolver/0001-Hosts_Cache.patch"; #DnsResolver: Sort and cache hosts file data for fast lookup (tdm)
@ -363,6 +363,7 @@ sed -i 's/LINEAGE_BUILDTYPE := UNOFFICIAL/LINEAGE_BUILDTYPE := dos/' config/*.mk
echo 'include vendor/divested/divestos.mk' >> config/common.mk; #Include our customizations
cp -f "$DOS_PATCHES_COMMON/apns-conf.xml" prebuilt/common/etc/apns-conf.xml; #Update APN list
awk -i inplace '!/Eleven/' config/common_mobile.mk; #Remove Music Player
awk -i inplace '!/enforce-product-packages-exist-internal/' config/common.mk; #Ignore missing packages
fi;
if enter "vendor/divested"; then
@ -415,7 +416,6 @@ cd "$DOS_BUILD_BASE";
#rm -rfv device/*/*/overlay/CarrierConfigResCommon device/*/*/rro_overlays/CarrierConfigOverlay device/*/*/overlay/packages/apps/CarrierConfig/res/xml/vendor.xml;
#Fix broken options enabled by hardenDefconfig()
sed -i "s/CONFIG_DEBUG_NOTIFIERS=y/# CONFIG_DEBUG_NOTIFIERS is not set/" kernel/google/msm-4.9/arch/arm64/configs/*_defconfig; #Likely breaks boot
echo -e "\nCONFIG_DEBUG_FS=y" >> kernel/oneplus/sm8150/arch/arm64/configs/vendor/sm8150-perf_defconfig;
echo -e "\nCONFIG_DEBUG_FS=n" >> kernel/oneplus/sm8250/arch/arm64/configs/vendor/kona-perf_defconfig;