mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-10-01 01:35:54 -04:00
Backports + Picks
Signed-off-by: Tad <tad@spotco.us>
This commit is contained in:
parent
49f5f1c674
commit
62b2318078
@ -10,10 +10,10 @@ requiring the READ_PHONE_STATE permission.
|
||||
1 file changed, 1 insertion(+), 6 deletions(-)
|
||||
|
||||
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
|
||||
index f3c2777208ab..0560b7306a4e 100644
|
||||
index bb78408617b8..9148a09271f4 100644
|
||||
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
|
||||
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
|
||||
@@ -4978,12 +4978,7 @@ public class ActivityManagerService extends IActivityManager.Stub
|
||||
@@ -4981,12 +4981,7 @@ public class ActivityManagerService extends IActivityManager.Stub
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,107 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Muhomor <muhomor.dmitry@gmail.com>
|
||||
Date: Fri, 10 Feb 2023 12:54:21 +0200
|
||||
Subject: [PATCH] add a setting for forcibly disabling SUPL
|
||||
|
||||
Change-Id: I5c31c319d198f09ace493e601278f8224a259f05
|
||||
---
|
||||
core/java/android/provider/Settings.java | 9 +++++++++
|
||||
.../server/location/GnssConfiguration.java | 15 +++++++++++++++
|
||||
.../server/location/GnssLocationProvider.java | 15 +++++++++++++++
|
||||
3 files changed, 39 insertions(+)
|
||||
|
||||
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
|
||||
index 9afbe9750e94..fd0d0e4abbaa 100644
|
||||
--- a/core/java/android/provider/Settings.java
|
||||
+++ b/core/java/android/provider/Settings.java
|
||||
@@ -15139,6 +15139,15 @@ public final class Settings {
|
||||
* @hide
|
||||
*/
|
||||
public static final String SETTINGS_REBOOT_AFTER_TIMEOUT = "settings_reboot_after_timeout";
|
||||
+
|
||||
+ /**
|
||||
+ * Force disable Secure User Plane Location (SUPL), 0 or 1.
|
||||
+ * @hide
|
||||
+ */
|
||||
+ public static final String FORCE_DISABLE_SUPL = "force_disable_supl";
|
||||
+
|
||||
+ /** @hide */
|
||||
+ public static final int FORCE_DISABLE_SUPL_DEFAULT = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
diff --git a/services/core/java/com/android/server/location/GnssConfiguration.java b/services/core/java/com/android/server/location/GnssConfiguration.java
|
||||
index 18d9f69c9735..04c8c8e6d340 100644
|
||||
--- a/services/core/java/com/android/server/location/GnssConfiguration.java
|
||||
+++ b/services/core/java/com/android/server/location/GnssConfiguration.java
|
||||
@@ -19,10 +19,12 @@ package com.android.server.location;
|
||||
import android.content.Context;
|
||||
import android.os.PersistableBundle;
|
||||
import android.os.SystemProperties;
|
||||
+import android.provider.Settings;
|
||||
import android.telephony.CarrierConfigManager;
|
||||
import android.telephony.SubscriptionManager;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
+import android.util.Slog;
|
||||
import android.util.StatsLog;
|
||||
|
||||
import libcore.io.IoUtils;
|
||||
@@ -231,6 +233,8 @@ class GnssConfiguration {
|
||||
*/
|
||||
loadPropertiesFromGpsDebugConfig(mProperties);
|
||||
|
||||
+ applyConfigOverrides(mContext, mProperties);
|
||||
+
|
||||
mEsExtensionSec = getRangeCheckedConfigEsExtensionSec();
|
||||
|
||||
logConfigurations();
|
||||
@@ -416,4 +420,15 @@ class GnssConfiguration {
|
||||
private static native boolean native_set_satellite_blacklist(int[] constellations, int[] svIds);
|
||||
|
||||
private static native boolean native_set_es_extension_sec(int emergencyExtensionSeconds);
|
||||
+
|
||||
+ private static void applyConfigOverrides(Context ctx, Properties props) {
|
||||
+ String key = Settings.Global.FORCE_DISABLE_SUPL;
|
||||
+ int def = Settings.Global.FORCE_DISABLE_SUPL_DEFAULT;
|
||||
+ if (Settings.Global.getInt(ctx.getContentResolver(), key, def) == 1) {
|
||||
+ props.setProperty(CONFIG_SUPL_MODE, "0");
|
||||
+ Slog.d(TAG, "SUPL is force disabled");
|
||||
+ } else {
|
||||
+ Slog.d(TAG, "SUPL is not force disabled");
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
diff --git a/services/core/java/com/android/server/location/GnssLocationProvider.java b/services/core/java/com/android/server/location/GnssLocationProvider.java
|
||||
index 71fb465e8806..928e129f98d3 100644
|
||||
--- a/services/core/java/com/android/server/location/GnssLocationProvider.java
|
||||
+++ b/services/core/java/com/android/server/location/GnssLocationProvider.java
|
||||
@@ -64,6 +64,7 @@ import android.telephony.TelephonyManager;
|
||||
import android.telephony.gsm.GsmCellLocation;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
+import android.util.Slog;
|
||||
import android.util.StatsLog;
|
||||
import android.util.TimeUtils;
|
||||
|
||||
@@ -688,6 +689,20 @@ public class GnssLocationProvider extends AbstractLocationProvider implements
|
||||
mGnssBatchingProvider = new GnssBatchingProvider();
|
||||
mGnssGeofenceProvider = new GnssGeofenceProvider();
|
||||
|
||||
+ mContext.getContentResolver().registerContentObserver(
|
||||
+ Settings.Global.getUriFor(Settings.Global.FORCE_DISABLE_SUPL),
|
||||
+ false, new ContentObserver(mHandler) {
|
||||
+ @Override
|
||||
+ public void onChange(boolean selfChange) {
|
||||
+ ContentResolver cr = mContext.getContentResolver();
|
||||
+ String key = Settings.Global.FORCE_DISABLE_SUPL;
|
||||
+ int def = Settings.Global.FORCE_DISABLE_SUPL_DEFAULT;
|
||||
+
|
||||
+ Slog.d(TAG, "FORCE_DISABLE_SUPL changed, value: " + Settings.Global.getInt(cr, key, def));
|
||||
+ mGnssConfiguration.reloadGpsProperties();
|
||||
+ }
|
||||
+ });
|
||||
+
|
||||
mContext.registerReceiverAsUser(new BroadcastReceiver() {
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
@ -0,0 +1,88 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Muhomor <muhomor.dmitry@gmail.com>
|
||||
Date: Fri, 10 Feb 2023 12:44:30 +0200
|
||||
Subject: [PATCH] add a toggle for forcibly disabling SUPL
|
||||
|
||||
---
|
||||
res/values/strings.xml | 3 ++
|
||||
res/xml/location_settings.xml | 6 +++
|
||||
.../ForceDisableSuplPrefController.java | 41 +++++++++++++++++++
|
||||
3 files changed, 50 insertions(+)
|
||||
create mode 100644 src/com/android/settings/location/ForceDisableSuplPrefController.java
|
||||
|
||||
diff --git a/res/values/strings.xml b/res/values/strings.xml
|
||||
index a64940d793..f1ea003e3b 100644
|
||||
--- a/res/values/strings.xml
|
||||
+++ b/res/values/strings.xml
|
||||
@@ -11517,4 +11517,7 @@
|
||||
<string name="bluetooth_connect_access_dialog_negative">Don\u2019t connect</string>
|
||||
<!-- Strings for Dialog connect button -->
|
||||
<string name="bluetooth_connect_access_dialog_positive">Connect</string>
|
||||
+
|
||||
+ <string name="force_disable_supl_title">Force disable Secure User Plane Location (SUPL)</string>
|
||||
+ <string name="force_disable_supl_summary">Always disable SUPL assisted location support regardless of carrier configuration (does not disable control plane A-GNSS and DivestOS does not send IMSI to the SUPL)</string>
|
||||
</resources>
|
||||
diff --git a/res/xml/location_settings.xml b/res/xml/location_settings.xml
|
||||
index 136e6ab619..ae1a0e0f3e 100644
|
||||
--- a/res/xml/location_settings.xml
|
||||
+++ b/res/xml/location_settings.xml
|
||||
@@ -68,6 +68,12 @@
|
||||
android:title="@string/managed_profile_location_services"
|
||||
android:key="location_services_managed_profile" />
|
||||
|
||||
+ <com.android.settingslib.RestrictedSwitchPreference
|
||||
+ android:key="force_disable_supl"
|
||||
+ android:title="@string/force_disable_supl_title"
|
||||
+ android:summary="@string/force_disable_supl_summary"
|
||||
+ settings:controller="com.android.settings.location.ForceDisableSuplPrefController"/>
|
||||
+
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
diff --git a/src/com/android/settings/location/ForceDisableSuplPrefController.java b/src/com/android/settings/location/ForceDisableSuplPrefController.java
|
||||
new file mode 100644
|
||||
index 0000000000..1cfae3f3a6
|
||||
--- /dev/null
|
||||
+++ b/src/com/android/settings/location/ForceDisableSuplPrefController.java
|
||||
@@ -0,0 +1,41 @@
|
||||
+package com.android.settings.location;
|
||||
+
|
||||
+import android.content.ContentResolver;
|
||||
+import android.content.Context;
|
||||
+import android.os.Process;
|
||||
+import android.provider.Settings;
|
||||
+
|
||||
+import com.android.settings.core.TogglePreferenceController;
|
||||
+
|
||||
+public class ForceDisableSuplPrefController extends TogglePreferenceController {
|
||||
+
|
||||
+ public ForceDisableSuplPrefController(Context ctx, String key) {
|
||||
+ super(ctx, key);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int getAvailabilityStatus() {
|
||||
+ if (!Process.myUserHandle().isSystem()) {
|
||||
+ return DISABLED_FOR_USER;
|
||||
+ }
|
||||
+
|
||||
+ return AVAILABLE;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isChecked() {
|
||||
+ ContentResolver cr = mContext.getContentResolver();
|
||||
+ String key = Settings.Global.FORCE_DISABLE_SUPL;
|
||||
+ int def = Settings.Global.FORCE_DISABLE_SUPL_DEFAULT;
|
||||
+
|
||||
+ return Settings.Global.getInt(cr, key, def) == 1;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean setChecked(boolean isChecked) {
|
||||
+ ContentResolver cr = mContext.getContentResolver();
|
||||
+ String key = Settings.Global.FORCE_DISABLE_SUPL;
|
||||
+
|
||||
+ return Settings.Global.putInt(cr, key, isChecked ? 1 : 0);
|
||||
+ }
|
||||
+}
|
@ -10,10 +10,10 @@ requiring the READ_PHONE_STATE permission.
|
||||
1 file changed, 1 insertion(+), 6 deletions(-)
|
||||
|
||||
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
|
||||
index 0ae9cc279e68..6c99f8d8525e 100644
|
||||
index c4ed0bb24fdb..ad5210e64d8b 100644
|
||||
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
|
||||
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
|
||||
@@ -5235,12 +5235,7 @@ public class ActivityManagerService extends IActivityManager.Stub
|
||||
@@ -5239,12 +5239,7 @@ public class ActivityManagerService extends IActivityManager.Stub
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,107 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Muhomor <muhomor.dmitry@gmail.com>
|
||||
Date: Fri, 10 Feb 2023 12:54:21 +0200
|
||||
Subject: [PATCH] add a setting for forcibly disabling SUPL
|
||||
|
||||
Change-Id: I5c31c319d198f09ace493e601278f8224a259f05
|
||||
---
|
||||
core/java/android/provider/Settings.java | 9 +++++++++
|
||||
.../server/location/gnss/GnssConfiguration.java | 15 +++++++++++++++
|
||||
.../location/gnss/GnssLocationProvider.java | 15 +++++++++++++++
|
||||
3 files changed, 39 insertions(+)
|
||||
|
||||
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
|
||||
index 367c57526fe5..89002f0a3a9c 100755
|
||||
--- a/core/java/android/provider/Settings.java
|
||||
+++ b/core/java/android/provider/Settings.java
|
||||
@@ -14492,6 +14492,15 @@ public final class Settings {
|
||||
* @hide
|
||||
*/
|
||||
public static final String SETTINGS_REBOOT_AFTER_TIMEOUT = "settings_reboot_after_timeout";
|
||||
+
|
||||
+ /**
|
||||
+ * Force disable Secure User Plane Location (SUPL), 0 or 1.
|
||||
+ * @hide
|
||||
+ */
|
||||
+ public static final String FORCE_DISABLE_SUPL = "force_disable_supl";
|
||||
+
|
||||
+ /** @hide */
|
||||
+ public static final int FORCE_DISABLE_SUPL_DEFAULT = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
diff --git a/services/core/java/com/android/server/location/gnss/GnssConfiguration.java b/services/core/java/com/android/server/location/gnss/GnssConfiguration.java
|
||||
index 14ab79e7ecde..f46a993336b3 100644
|
||||
--- a/services/core/java/com/android/server/location/gnss/GnssConfiguration.java
|
||||
+++ b/services/core/java/com/android/server/location/gnss/GnssConfiguration.java
|
||||
@@ -19,10 +19,12 @@ package com.android.server.location.gnss;
|
||||
import android.content.Context;
|
||||
import android.os.PersistableBundle;
|
||||
import android.os.SystemProperties;
|
||||
+import android.provider.Settings;
|
||||
import android.telephony.CarrierConfigManager;
|
||||
import android.telephony.SubscriptionManager;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
+import android.util.Slog;
|
||||
|
||||
import com.android.internal.util.FrameworkStatsLog;
|
||||
|
||||
@@ -232,6 +234,8 @@ class GnssConfiguration {
|
||||
*/
|
||||
loadPropertiesFromGpsDebugConfig(mProperties);
|
||||
|
||||
+ applyConfigOverrides(mContext, mProperties);
|
||||
+
|
||||
mEsExtensionSec = getRangeCheckedConfigEsExtensionSec();
|
||||
|
||||
logConfigurations();
|
||||
@@ -417,4 +421,15 @@ class GnssConfiguration {
|
||||
private static native boolean native_set_satellite_blacklist(int[] constellations, int[] svIds);
|
||||
|
||||
private static native boolean native_set_es_extension_sec(int emergencyExtensionSeconds);
|
||||
+
|
||||
+ private static void applyConfigOverrides(Context ctx, Properties props) {
|
||||
+ String key = Settings.Global.FORCE_DISABLE_SUPL;
|
||||
+ int def = Settings.Global.FORCE_DISABLE_SUPL_DEFAULT;
|
||||
+ if (Settings.Global.getInt(ctx.getContentResolver(), key, def) == 1) {
|
||||
+ props.setProperty(CONFIG_SUPL_MODE, "0");
|
||||
+ Slog.d(TAG, "SUPL is force disabled");
|
||||
+ } else {
|
||||
+ Slog.d(TAG, "SUPL is not force disabled");
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
diff --git a/services/core/java/com/android/server/location/gnss/GnssLocationProvider.java b/services/core/java/com/android/server/location/gnss/GnssLocationProvider.java
|
||||
index 7c72a2016d15..fa2c063acd93 100644
|
||||
--- a/services/core/java/com/android/server/location/gnss/GnssLocationProvider.java
|
||||
+++ b/services/core/java/com/android/server/location/gnss/GnssLocationProvider.java
|
||||
@@ -64,6 +64,7 @@ import android.telephony.TelephonyManager;
|
||||
import android.telephony.gsm.GsmCellLocation;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
+import android.util.Slog;
|
||||
import android.util.TimeUtils;
|
||||
|
||||
import com.android.internal.annotations.GuardedBy;
|
||||
@@ -721,6 +722,20 @@ public class GnssLocationProvider extends AbstractLocationProvider implements
|
||||
mGnssBatchingProvider = new GnssBatchingProvider();
|
||||
mGnssGeofenceProvider = new GnssGeofenceProvider();
|
||||
|
||||
+ mContext.getContentResolver().registerContentObserver(
|
||||
+ Settings.Global.getUriFor(Settings.Global.FORCE_DISABLE_SUPL),
|
||||
+ false, new ContentObserver(mHandler) {
|
||||
+ @Override
|
||||
+ public void onChange(boolean selfChange) {
|
||||
+ ContentResolver cr = mContext.getContentResolver();
|
||||
+ String key = Settings.Global.FORCE_DISABLE_SUPL;
|
||||
+ int def = Settings.Global.FORCE_DISABLE_SUPL_DEFAULT;
|
||||
+
|
||||
+ Slog.d(TAG, "FORCE_DISABLE_SUPL changed, value: " + Settings.Global.getInt(cr, key, def));
|
||||
+ mGnssConfiguration.reloadGpsProperties();
|
||||
+ }
|
||||
+ });
|
||||
+
|
||||
mContext.registerReceiverAsUser(new BroadcastReceiver() {
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
@ -0,0 +1,88 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Muhomor <muhomor.dmitry@gmail.com>
|
||||
Date: Fri, 10 Feb 2023 12:44:30 +0200
|
||||
Subject: [PATCH] add a toggle for forcibly disabling SUPL
|
||||
|
||||
---
|
||||
res/values/strings.xml | 3 ++
|
||||
res/xml/location_settings.xml | 6 +++
|
||||
.../ForceDisableSuplPrefController.java | 41 +++++++++++++++++++
|
||||
3 files changed, 50 insertions(+)
|
||||
create mode 100644 src/com/android/settings/location/ForceDisableSuplPrefController.java
|
||||
|
||||
diff --git a/res/values/strings.xml b/res/values/strings.xml
|
||||
index 060f94a48f..2e6e2fc8b2 100644
|
||||
--- a/res/values/strings.xml
|
||||
+++ b/res/values/strings.xml
|
||||
@@ -12297,4 +12297,7 @@
|
||||
|
||||
<string name="connectivity_check_title">Internet connectivity check</string>
|
||||
<string name="connectivity_check_summary">HTTP endpoints to use for performing internet connectivity checks.</string>
|
||||
+
|
||||
+ <string name="force_disable_supl_title">Force disable Secure User Plane Location (SUPL)</string>
|
||||
+ <string name="force_disable_supl_summary">Always disable SUPL assisted location support regardless of carrier configuration (does not disable control plane A-GNSS and DivestOS does not send IMSI to the SUPL)</string>
|
||||
</resources>
|
||||
diff --git a/res/xml/location_settings.xml b/res/xml/location_settings.xml
|
||||
index fb03f4c7f3..a66df8fea6 100644
|
||||
--- a/res/xml/location_settings.xml
|
||||
+++ b/res/xml/location_settings.xml
|
||||
@@ -77,6 +77,12 @@
|
||||
settings:forWork="true"
|
||||
settings:controller="com.android.settings.location.LocationServiceForWorkPreferenceController"/>
|
||||
|
||||
+ <com.android.settingslib.RestrictedSwitchPreference
|
||||
+ android:key="force_disable_supl"
|
||||
+ android:title="@string/force_disable_supl_title"
|
||||
+ android:summary="@string/force_disable_supl_summary"
|
||||
+ settings:controller="com.android.settings.location.ForceDisableSuplPrefController"/>
|
||||
+
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
diff --git a/src/com/android/settings/location/ForceDisableSuplPrefController.java b/src/com/android/settings/location/ForceDisableSuplPrefController.java
|
||||
new file mode 100644
|
||||
index 0000000000..1cfae3f3a6
|
||||
--- /dev/null
|
||||
+++ b/src/com/android/settings/location/ForceDisableSuplPrefController.java
|
||||
@@ -0,0 +1,41 @@
|
||||
+package com.android.settings.location;
|
||||
+
|
||||
+import android.content.ContentResolver;
|
||||
+import android.content.Context;
|
||||
+import android.os.Process;
|
||||
+import android.provider.Settings;
|
||||
+
|
||||
+import com.android.settings.core.TogglePreferenceController;
|
||||
+
|
||||
+public class ForceDisableSuplPrefController extends TogglePreferenceController {
|
||||
+
|
||||
+ public ForceDisableSuplPrefController(Context ctx, String key) {
|
||||
+ super(ctx, key);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int getAvailabilityStatus() {
|
||||
+ if (!Process.myUserHandle().isSystem()) {
|
||||
+ return DISABLED_FOR_USER;
|
||||
+ }
|
||||
+
|
||||
+ return AVAILABLE;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isChecked() {
|
||||
+ ContentResolver cr = mContext.getContentResolver();
|
||||
+ String key = Settings.Global.FORCE_DISABLE_SUPL;
|
||||
+ int def = Settings.Global.FORCE_DISABLE_SUPL_DEFAULT;
|
||||
+
|
||||
+ return Settings.Global.getInt(cr, key, def) == 1;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean setChecked(boolean isChecked) {
|
||||
+ ContentResolver cr = mContext.getContentResolver();
|
||||
+ String key = Settings.Global.FORCE_DISABLE_SUPL;
|
||||
+
|
||||
+ return Settings.Global.putInt(cr, key, isChecked ? 1 : 0);
|
||||
+ }
|
||||
+}
|
@ -1 +1 @@
|
||||
Subproject commit 44be1b574fa8310d96d2e05d72348b62e7a2ba3a
|
||||
Subproject commit f8e4f4c7c27857b98ae2488e3607b6a6427639aa
|
@ -80,8 +80,9 @@ patchWorkspace() {
|
||||
verifyAllPlatformTags;
|
||||
gpgVerifyGitHead "$DOS_BUILD_BASE/external/chromium-webview";
|
||||
|
||||
#source build/envsetup.sh;
|
||||
source build/envsetup.sh;
|
||||
#repopick -it ten-firewall;
|
||||
repopick -it Q_asb_2023-02;
|
||||
|
||||
sh "$DOS_SCRIPTS/Patch.sh";
|
||||
sh "$DOS_SCRIPTS_COMMON/Enable_Verity.sh";
|
||||
|
@ -172,6 +172,7 @@ applyPatch "$DOS_PATCHES/android_frameworks_base/0016-Bluetooth_Timeout.patch";
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0017-WiFi_Timeout.patch"; #Timeout for Wi-Fi (GrapheneOS)
|
||||
if [ "$DOS_GRAPHENE_CONSTIFY" = true ]; then applyPatch "$DOS_PATCHES/android_frameworks_base/0018-constify_JNINativeMethod.patch"; fi; #Constify JNINativeMethod tables (GrapheneOS)
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0019-Random_MAC.patch"; #Add option of always randomizing MAC addresses (GrapheneOS)
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0020-SUPL_Toggle.patch"; #Add a setting for forcibly disabling SUPL (GrapheneOS)
|
||||
applyPatch "$DOS_PATCHES_COMMON/android_frameworks_base/0006-Do-not-throw-in-setAppOnInterfaceLocked.patch"; #Fix random reboots on broken kernels when an app has data restricted XXX: ugly (DivestOS)
|
||||
applyPatch "$DOS_PATCHES_COMMON/android_frameworks_base/0007-ABI_Warning.patch"; #Warn when running activity from 32 bit app on ARM64 devices. (AOSP)
|
||||
sed -i 's/DEFAULT_MAX_FILES = 1000;/DEFAULT_MAX_FILES = 0;/' services/core/java/com/android/server/DropBoxManagerService.java; #Disable DropBox internal logging service
|
||||
@ -188,6 +189,10 @@ rm -rf packages/OsuLogin; #Automatic Wi-Fi connection non-sense
|
||||
rm -rf packages/PrintRecommendationService; #Creates popups to install proprietary print apps
|
||||
fi;
|
||||
|
||||
if enterAndClear "frameworks/ml"; then
|
||||
git fetch https://github.com/LineageOS/android_frameworks_ml refs/changes/94/348894/1 && git cherry-pick FETCH_HEAD; #Q_asb_2023-02
|
||||
fi;
|
||||
|
||||
if enterAndClear "frameworks/native"; then
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_native/0001-Sensors.patch"; #Require OTHER_SENSORS permission for sensors (GrapheneOS)
|
||||
fi;
|
||||
@ -313,6 +318,7 @@ applyPatch "$DOS_PATCHES/android_packages_apps_Settings/0010-Random_MAC-1.patch"
|
||||
applyPatch "$DOS_PATCHES/android_packages_apps_Settings/0010-Random_MAC-2.patch"; #Remove partial MAC randomization translations (GrapheneOS)
|
||||
applyPatch "$DOS_PATCHES/android_packages_apps_Settings/0011-LTE_Only_Mode.patch"; #Add LTE-only option (GrapheneOS)
|
||||
applyPatch "$DOS_PATCHES/android_packages_apps_Settings/0012-hosts_toggle.patch"; #Add a toggle to disable /etc/hosts lookup (heavily based off of a GrapheneOS patch)
|
||||
applyPatch "$DOS_PATCHES/android_packages_apps_Settings/0013-SUPL_Toggle.patch"; #Add a toggle for forcibly disabling SUPL (GrapheneOS)
|
||||
sed -i 's/private int mPasswordMaxLength = 16;/private int mPasswordMaxLength = 64;/' src/com/android/settings/password/ChooseLockPassword.java; #Increase default max password length to 64 (GrapheneOS)
|
||||
sed -i 's/if (isFullDiskEncrypted()) {/if (false) {/' src/com/android/settings/accessibility/*AccessibilityService*.java; #Never disable secure start-up when enabling an accessibility service
|
||||
fi;
|
||||
|
@ -109,10 +109,11 @@ patchWorkspace() {
|
||||
verifyAllPlatformTags;
|
||||
gpgVerifyGitHead "$DOS_BUILD_BASE/external/chromium-webview";
|
||||
|
||||
#source build/envsetup.sh;
|
||||
source build/envsetup.sh;
|
||||
#repopick -it eleven-firewall;
|
||||
#repopick -i 314453; #TaskViewTouchController: Null check current animation on drag
|
||||
#repopick -i 325011; #lineage: Opt-in to shipping full recovery image by default
|
||||
repopick -it R_asb_2023-02;
|
||||
|
||||
sh "$DOS_SCRIPTS/Patch.sh";
|
||||
sh "$DOS_SCRIPTS_COMMON/Enable_Verity.sh";
|
||||
|
@ -161,6 +161,7 @@ sed -i 's/sys.spawn.exec/persist.security.exec_spawn_new/' core/java/com/android
|
||||
fi;
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0019-Random_MAC.patch"; #Add option of always randomizing MAC addresses (GrapheneOS)
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0020-Burnin_Protection.patch"; #SystemUI: add burnIn protection (arter97)
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0021-SUPL_Toggle.patch"; #Add a setting for forcibly disabling SUPL (GrapheneOS)
|
||||
applyPatch "$DOS_PATCHES_COMMON/android_frameworks_base/0006-Do-not-throw-in-setAppOnInterfaceLocked.patch"; #Fix random reboots on broken kernels when an app has data restricted XXX: ugly (DivestOS)
|
||||
applyPatch "$DOS_PATCHES_COMMON/android_frameworks_base/0007-ABI_Warning.patch"; #Warn when running activity from 32 bit app on ARM64 devices. (AOSP)
|
||||
hardenLocationConf services/core/java/com/android/server/location/gps_debug.conf; #Harden the default GPS config
|
||||
@ -182,6 +183,10 @@ 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/ml"; then
|
||||
git fetch https://github.com/LineageOS/android_frameworks_ml refs/changes/79/348879/1 && git cherry-pick FETCH_HEAD; #R_asb_2023-02
|
||||
fi;
|
||||
|
||||
if enterAndClear "frameworks/native"; then
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_native/0001-Sensors.patch"; #Require OTHER_SENSORS permission for sensors (GrapheneOS)
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_native/0002-fix-uaf.patch"; #Fix use-after-free in adbd_auth (GrapheneOS)
|
||||
@ -321,6 +326,7 @@ applyPatch "$DOS_PATCHES/android_packages_apps_Settings/0012-hosts_toggle.patch"
|
||||
applyPatch "$DOS_PATCHES/android_packages_apps_Settings/0013-LTE_Only_Mode-1.patch"; #Add LTE only setting (GrapheneOS)
|
||||
applyPatch "$DOS_PATCHES/android_packages_apps_Settings/0013-LTE_Only_Mode-2.patch"; #Show preferred network options no matter the carrier configuration (GrapheneOS)
|
||||
applyPatch "$DOS_PATCHES/android_packages_apps_Settings/0013-LTE_Only_Mode-3.patch"; #Add LTE only entry when carrier enables world mode (GrapheneOS)
|
||||
applyPatch "$DOS_PATCHES/android_packages_apps_Settings/0014-SUPL_Toggle.patch"; #Add a toggle for forcibly disabling SUPL (GrapheneOS)
|
||||
sed -i 's/if (isFullDiskEncrypted()) {/if (false) {/' src/com/android/settings/accessibility/*AccessibilityService*.java; #Never disable secure start-up when enabling an accessibility service
|
||||
fi;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user