mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-10-01 01:35:54 -04:00
Many changes
- Drop Copperhead patches - More overlay work
This commit is contained in:
parent
39740b384f
commit
1dc92478ed
@ -1,7 +1,7 @@
|
|||||||
PRODUCT_BRAND ?= DivestOS
|
#PRODUCT_BRAND ?= DivestOS
|
||||||
PRODUCT_VERSION_MAJOR = 1
|
#PRODUCT_VERSION_MAJOR = 1
|
||||||
PRODUCT_VERSION_MINOR = 0
|
#PRODUCT_VERSION_MINOR = 0
|
||||||
PRODUCT_VERSION_MAINTENANCE := 0
|
#PRODUCT_VERSION_MAINTENANCE := 0
|
||||||
|
|
||||||
DEVICE_PACKAGE_OVERLAYS += vendor/divested/overlay/common
|
DEVICE_PACKAGE_OVERLAYS += vendor/divested/overlay/common
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@
|
|||||||
<string name="config_mms_user_agent" translatable="false">Android-Mms/2.0</string>
|
<string name="config_mms_user_agent" translatable="false">Android-Mms/2.0</string>
|
||||||
|
|
||||||
<!-- MMS user agent prolfile url -->
|
<!-- MMS user agent prolfile url -->
|
||||||
<string name="config_mms_user_agent_profile_url" translatable="false"></string>
|
<string name="config_mms_user_agent_profile_url" translatable="false">http://www.google.com/oha/rdf/ua-profile-kila.xml</string>
|
||||||
|
|
||||||
<!-- The URL that should be sent in an x-wap-profile header with an HTTP request,
|
<!-- The URL that should be sent in an x-wap-profile header with an HTTP request,
|
||||||
as defined in the Open Mobile Alliance User Agent Profile specification
|
as defined in the Open Mobile Alliance User Agent Profile specification
|
||||||
@ -108,7 +108,7 @@
|
|||||||
|
|
||||||
If this string is empty or the specified package does not exist, then
|
If this string is empty or the specified package does not exist, then
|
||||||
the behavior will be as though no app was named as an explicit default. -->
|
the behavior will be as though no app was named as an explicit default. -->
|
||||||
<string name="default_browser" translatable="false"></string>
|
<string name="default_browser" translatable="false">us.spotco.fennec_dos</string>
|
||||||
|
|
||||||
<!-- Default SMS Application. This will be the default SMS application when
|
<!-- Default SMS Application. This will be the default SMS application when
|
||||||
the phone first boots. The user can then change the default app to one
|
the phone first boots. The user can then change the default app to one
|
||||||
@ -140,6 +140,7 @@
|
|||||||
<!-- The standard AOSP fused location provider -->
|
<!-- The standard AOSP fused location provider -->
|
||||||
<item>com.android.location.fused</item>
|
<item>com.android.location.fused</item>
|
||||||
<item>org.microg.nlp</item>
|
<item>org.microg.nlp</item>
|
||||||
|
<item>com.google.android.gms</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<!-- Package name providing Hardware Activity-Recognition API support. Used only when
|
<!-- Package name providing Hardware Activity-Recognition API support. Used only when
|
||||||
@ -233,7 +234,7 @@
|
|||||||
alpha compositing functionality in hardware. If set, the window
|
alpha compositing functionality in hardware. If set, the window
|
||||||
manager will disable alpha trasformation in animations where not
|
manager will disable alpha trasformation in animations where not
|
||||||
strictly needed. -->
|
strictly needed. -->
|
||||||
<bool name="config_sf_limitedAlpha">false</bool>
|
<bool name="config_sf_limitedAlpha">true</bool>
|
||||||
|
|
||||||
<!-- Flag indicating that the media framework should support playing of sounds on volume
|
<!-- Flag indicating that the media framework should support playing of sounds on volume
|
||||||
key usage. This adds noticeable additional overhead to volume key processing, so
|
key usage. This adds noticeable additional overhead to volume key processing, so
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
# UnifiedNLP Backends
|
|
||||||
PRODUCT_PACKAGES += \
|
|
||||||
IchnaeaNlpBackend \
|
|
||||||
NominatimNlpBackend
|
|
@ -8,13 +8,17 @@ PRODUCT_PACKAGES += \
|
|||||||
# F-DroidOfficial \
|
# F-DroidOfficial \
|
||||||
# F-DroidPrivilegedExtensionOfficial
|
# F-DroidPrivilegedExtensionOfficial
|
||||||
|
|
||||||
# UnifiedNLP Backends (DejaVu is always included even when microG is disabled to prevent deletion of a user's database)
|
# UnifiedNLP
|
||||||
PRODUCT_PACKAGES += \
|
PRODUCT_PACKAGES += \
|
||||||
DejaVuNlpBackend
|
UnifiedNLP \
|
||||||
|
DejaVuNlpBackend \
|
||||||
|
IchnaeaNlpBackend \
|
||||||
|
NominatimNlpBackend
|
||||||
|
|
||||||
# Replacements
|
# Replacements
|
||||||
PRODUCT_PACKAGES += \
|
PRODUCT_PACKAGES += \
|
||||||
CameraRoll \
|
CameraRoll \
|
||||||
|
Silence \
|
||||||
VanillaMusic
|
VanillaMusic
|
||||||
|
|
||||||
# Others
|
# Others
|
||||||
|
@ -1,159 +0,0 @@
|
|||||||
From 5a0424ac9cc4bf5978694c76fb1c46ed42d7f4f5 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Daniel Micay <danielmicay@gmail.com>
|
|
||||||
Date: Wed, 16 Aug 2017 08:35:43 -0400
|
|
||||||
Subject: [PATCH] LTE only option
|
|
||||||
|
|
||||||
This is a modified version of thestinger's implementation in CopperheadOS from a time when the repo was/is still licensed under Apache2
|
|
||||||
https://github.com/CopperheadOS/platform_packages_services_Telephony/commit/567b8daca2d5d570e4eeecd548aa03c606ee9c18
|
|
||||||
|
|
||||||
Change-Id: I708135604960f83c1f92ed41d0584a3b48a7886a
|
|
||||||
---
|
|
||||||
res/values/strings.xml | 16 ++++++++++++++++
|
|
||||||
src/com/android/phone/MobileNetworkSettings.java | 10 ++++++++--
|
|
||||||
2 files changed, 24 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/res/values/strings.xml b/res/values/strings.xml
|
|
||||||
index 4ec44534..bf251f88 100644
|
|
||||||
--- a/res/values/strings.xml
|
|
||||||
+++ b/res/values/strings.xml
|
|
||||||
@@ -423,6 +423,8 @@
|
|
||||||
<string name="preferred_network_mode_cdma_evdo_gsm_wcdma_summary">Preferred network mode: CDMA/EvDo/GSM/WCDMA</string>
|
|
||||||
<!-- Mobile network settings, summary for preferred network mode LTE [CHAR LIMIT=100] -->
|
|
||||||
<string name="preferred_network_mode_lte_summary">Preferred network mode: LTE </string>
|
|
||||||
+ <!-- Mobile network settings, summary for preferred network mode LTE only [CHAR LIMIT=100] -->
|
|
||||||
+ <string name="preferred_network_mode_lte_only_summary">Preferred network mode: LTE only</string>
|
|
||||||
<!-- Mobile network settings, summary for preferred network mode GSM/WCDMA/LTE [CHAR LIMIT=100] -->
|
|
||||||
<string name="preferred_network_mode_lte_gsm_wcdma_summary">Preferred network mode: GSM/WCDMA/LTE</string>
|
|
||||||
<!-- Mobile network settings, summary for preferred network mode CDMA+LTE/EVDO[CHAR LIMIT=100] -->
|
|
||||||
@@ -681,7 +683,9 @@
|
|
||||||
<string name="multi_category_disable">Multi-category disabled</string>
|
|
||||||
|
|
||||||
<string name="network_lte">LTE (recommended)</string>
|
|
||||||
+ <string name="network_lte_only">LTE only</string>
|
|
||||||
<string name="network_4G">4G (recommended)</string>
|
|
||||||
+ <string name="network_4G_only">4G only</string>
|
|
||||||
<string name="network_3G" translatable="false">3G</string>
|
|
||||||
<string name="network_2G" translatable="false">2G</string>
|
|
||||||
<string name="network_1x" translatable="false">1x</string>
|
|
||||||
@@ -689,14 +693,17 @@
|
|
||||||
|
|
||||||
<string-array name="enabled_networks_except_gsm_choices" translatable="false">
|
|
||||||
<item>@string/network_lte</item>
|
|
||||||
+ <item>@string/network_lte_only</item>
|
|
||||||
<item>@string/network_3G</item>
|
|
||||||
</string-array>
|
|
||||||
<string-array name="enabled_networks_except_gsm_4g_choices" translatable="false">
|
|
||||||
<item>@string/network_4G</item>
|
|
||||||
+ <item>@string/network_4G_only</item>
|
|
||||||
<item>@string/network_3G</item>
|
|
||||||
</string-array>
|
|
||||||
<string-array name="enabled_networks_except_gsm_values" translatable="false">
|
|
||||||
<item>"9"</item>
|
|
||||||
+ <item>"11"</item>
|
|
||||||
<item>"0"</item>
|
|
||||||
</string-array>
|
|
||||||
|
|
||||||
@@ -718,28 +725,33 @@
|
|
||||||
|
|
||||||
<string-array name="enabled_networks_choices" translatable="false">
|
|
||||||
<item>@string/network_lte</item>
|
|
||||||
+ <item>@string/network_lte_only</item>
|
|
||||||
<item>@string/network_3G</item>
|
|
||||||
<item>@string/network_2G</item>
|
|
||||||
</string-array>
|
|
||||||
<string-array name="enabled_networks_4g_choices" translatable="false">
|
|
||||||
<item>@string/network_4G</item>
|
|
||||||
+ <item>@string/network_4G_only</item>
|
|
||||||
<item>@string/network_3G</item>
|
|
||||||
<item>@string/network_2G</item>
|
|
||||||
</string-array>
|
|
||||||
<string-array name="enabled_networks_values" translatable="false">
|
|
||||||
<item>"9"</item>
|
|
||||||
+ <item>"11"</item>
|
|
||||||
<item>"0"</item>
|
|
||||||
<item>"1"</item>
|
|
||||||
</string-array>
|
|
||||||
|
|
||||||
<string-array name="enabled_networks_cdma_choices" translatable="false">
|
|
||||||
<item>@string/network_lte</item>
|
|
||||||
+ <item>@string/network_lte_only</item>
|
|
||||||
<item>@string/network_3G</item>
|
|
||||||
<item>@string/network_1x</item>
|
|
||||||
<item>@string/network_global</item>
|
|
||||||
</string-array>
|
|
||||||
<string-array name="enabled_networks_cdma_values" translatable="false">
|
|
||||||
<item>"8"</item>
|
|
||||||
+ <item>"11"</item>
|
|
||||||
<item>"4"</item>
|
|
||||||
<item>"5"</item>
|
|
||||||
<item>"10"</item>
|
|
||||||
@@ -756,20 +768,24 @@
|
|
||||||
|
|
||||||
<string-array name="enabled_networks_cdma_only_lte_choices" translatable="false">
|
|
||||||
<item>@string/network_lte</item>
|
|
||||||
+ <item>@string/network_lte_only</item>
|
|
||||||
<item>@string/network_global</item>
|
|
||||||
</string-array>
|
|
||||||
<string-array name="enabled_networks_cdma_only_lte_values" translatable="false">
|
|
||||||
<item>"8"</item>
|
|
||||||
+ <item>"11"</item>
|
|
||||||
<item>"10"</item>
|
|
||||||
</string-array>
|
|
||||||
|
|
||||||
<string-array name="enabled_networks_tdscdma_choices" translatable="false">
|
|
||||||
<item>@string/network_lte</item>
|
|
||||||
+ <item>@string/network_lte_only</item>
|
|
||||||
<item>@string/network_3G</item>
|
|
||||||
<item>@string/network_2G</item>
|
|
||||||
</string-array>
|
|
||||||
<string-array name="enabled_networks_tdscdma_values" translatable="false">
|
|
||||||
<item>"22"</item>
|
|
||||||
+ <item>"11"</item>
|
|
||||||
<item>"18"</item>
|
|
||||||
<item>"1"</item>
|
|
||||||
</string-array>
|
|
||||||
diff --git a/src/com/android/phone/MobileNetworkSettings.java b/src/com/android/phone/MobileNetworkSettings.java
|
|
||||||
index 71feff8b..2a68c99a 100644
|
|
||||||
--- a/src/com/android/phone/MobileNetworkSettings.java
|
|
||||||
+++ b/src/com/android/phone/MobileNetworkSettings.java
|
|
||||||
@@ -819,6 +819,7 @@ public class MobileNetworkSettings extends PreferenceActivity
|
|
||||||
switch (buttonNetworkMode) {
|
|
||||||
case Phone.NT_MODE_WCDMA_PREF:
|
|
||||||
case Phone.NT_MODE_GSM_ONLY:
|
|
||||||
+ case Phone.NT_MODE_LTE_ONLY:
|
|
||||||
case Phone.NT_MODE_LTE_GSM_WCDMA:
|
|
||||||
case Phone.NT_MODE_LTE_CDMA_EVDO_GSM_WCDMA:
|
|
||||||
case Phone.NT_MODE_CDMA:
|
|
||||||
@@ -1007,7 +1008,7 @@ public class MobileNetworkSettings extends PreferenceActivity
|
|
||||||
break;
|
|
||||||
case Phone.NT_MODE_LTE_ONLY:
|
|
||||||
mButtonPreferredNetworkMode.setSummary(
|
|
||||||
- R.string.preferred_network_mode_lte_summary);
|
|
||||||
+ R.string.preferred_network_mode_lte_only_summary);
|
|
||||||
break;
|
|
||||||
case Phone.NT_MODE_LTE_TDSCDMA_GSM:
|
|
||||||
mButtonPreferredNetworkMode.setSummary(
|
|
||||||
@@ -1107,7 +1108,6 @@ public class MobileNetworkSettings extends PreferenceActivity
|
|
||||||
controlGsmOptions(true);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
- case Phone.NT_MODE_LTE_ONLY:
|
|
||||||
case Phone.NT_MODE_LTE_WCDMA:
|
|
||||||
if (!mIsGlobalCdma) {
|
|
||||||
mButtonEnabledNetworks.setValue(
|
|
||||||
@@ -1120,6 +1120,12 @@ public class MobileNetworkSettings extends PreferenceActivity
|
|
||||||
mButtonEnabledNetworks.setSummary(R.string.network_global);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
+ case Phone.NT_MODE_LTE_ONLY:
|
|
||||||
+ mButtonEnabledNetworks.setValue(
|
|
||||||
+ Integer.toString(Phone.NT_MODE_LTE_ONLY));
|
|
||||||
+ mButtonEnabledNetworks.setSummary((mShow4GForLTE == true)
|
|
||||||
+ ? R.string.network_4G_only : R.string.network_lte_only);
|
|
||||||
+ break;
|
|
||||||
case Phone.NT_MODE_LTE_CDMA_AND_EVDO:
|
|
||||||
if (isWorldMode()) {
|
|
||||||
mButtonEnabledNetworks.setSummary(
|
|
||||||
--
|
|
||||||
2.14.1
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
|||||||
diff --git a/keymaster_configuration.cpp b/keymaster_configuration.cpp
|
|
||||||
index 428197c..42df7d6 100644
|
|
||||||
--- a/keymaster_configuration.cpp
|
|
||||||
+++ b/keymaster_configuration.cpp
|
|
||||||
@@ -89,7 +89,10 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
regmatch_t matches[kPlatformVersionMatchCount];
|
|
||||||
- if (regexec(®ex, version_str, kPlatformVersionMatchCount, matches, 0 /* flags */)) {
|
|
||||||
+ int not_match
|
|
||||||
+ = regexec(®ex, version_str, kPlatformVersionMatchCount, matches, 0 /* flags */);
|
|
||||||
+ regfree(®ex);
|
|
||||||
+ if (not_match) {
|
|
||||||
ALOGI("Platform version string does not match expected format. Using version 0.");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -109,7 +112,10 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
regmatch_t matches[kPlatformPatchlevelMatchCount];
|
|
||||||
- if (regexec(®ex, patchlevel_str, kPlatformPatchlevelMatchCount, matches, 0 /* flags */)) {
|
|
||||||
+ int not_match
|
|
||||||
+ = regexec(®ex, patchlevel_str, kPlatformPatchlevelMatchCount, matches, 0 /* flags */);
|
|
||||||
+ regfree(®ex);
|
|
||||||
+ if (not_match) {
|
|
||||||
ALOGI("Platform patchlevel string does not match expected format. Using patchlevel 0");
|
|
||||||
return 0;
|
|
||||||
}
|
|
@ -1,96 +0,0 @@
|
|||||||
diff --git a/include/keymaster/keymaster_configuration.h b/include/keymaster/keymaster_configuration.h
|
|
||||||
index 97b7fa5..69738fd 100644
|
|
||||||
--- a/include/keymaster/keymaster_configuration.h
|
|
||||||
+++ b/include/keymaster/keymaster_configuration.h
|
|
||||||
@@ -40,12 +40,24 @@
|
|
||||||
uint32_t GetOsVersion(const char* version_string);
|
|
||||||
|
|
||||||
/**
|
|
||||||
+ * Retrieves and parses OS version information from build properties. Returns 0 if the string
|
|
||||||
+ * doesn't contain a numeric version number.
|
|
||||||
+ */
|
|
||||||
+uint32_t GetOsVersion();
|
|
||||||
+
|
|
||||||
+/**
|
|
||||||
* Parses OS patch level string, returning year and month in integer form. For example, "2016-03-25"
|
|
||||||
* will be returned as 201603. Returns 0 if the string doesn't contain a date in the form
|
|
||||||
* YYYY-MM-DD.
|
|
||||||
*/
|
|
||||||
uint32_t GetOsPatchlevel(const char* patchlevel_string);
|
|
||||||
|
|
||||||
+/**
|
|
||||||
+ * Retrieves and parses OS patch level from build properties. Returns 0 if the string doesn't
|
|
||||||
+ * contain a date in the form YYYY-MM-DD.
|
|
||||||
+ */
|
|
||||||
+uint32_t GetOsPatchlevel();
|
|
||||||
+
|
|
||||||
} // namespace keymaster
|
|
||||||
|
|
||||||
#endif // SYSTEM_KEYMASTER_KEYMASTER_CONFIGURATION_H_
|
|
||||||
diff --git a/keymaster_configuration.cpp b/keymaster_configuration.cpp
|
|
||||||
index 42df7d6..ac6d3c1 100644
|
|
||||||
--- a/keymaster_configuration.cpp
|
|
||||||
+++ b/keymaster_configuration.cpp
|
|
||||||
@@ -70,15 +70,7 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
keymaster_error_t ConfigureDevice(keymaster2_device_t* dev) {
|
|
||||||
- char version_str[PROPERTY_VALUE_MAX];
|
|
||||||
- property_get(kPlatformVersionProp, version_str, "" /* default */);
|
|
||||||
- uint32_t version = GetOsVersion(version_str);
|
|
||||||
-
|
|
||||||
- char patchlevel_str[PROPERTY_VALUE_MAX];
|
|
||||||
- property_get(kPlatformPatchlevelProp, patchlevel_str, "" /* default */);
|
|
||||||
- uint32_t patchlevel = GetOsPatchlevel(patchlevel_str);
|
|
||||||
-
|
|
||||||
- return ConfigureDevice(dev, version, patchlevel);
|
|
||||||
+ return ConfigureDevice(dev, GetOsVersion(), GetOsPatchlevel());
|
|
||||||
}
|
|
||||||
|
|
||||||
uint32_t GetOsVersion(const char* version_str) {
|
|
||||||
@@ -89,8 +81,8 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
regmatch_t matches[kPlatformVersionMatchCount];
|
|
||||||
- int not_match
|
|
||||||
- = regexec(®ex, version_str, kPlatformVersionMatchCount, matches, 0 /* flags */);
|
|
||||||
+ int not_match =
|
|
||||||
+ regexec(®ex, version_str, kPlatformVersionMatchCount, matches, 0 /* flags */);
|
|
||||||
regfree(®ex);
|
|
||||||
if (not_match) {
|
|
||||||
ALOGI("Platform version string does not match expected format. Using version 0.");
|
|
||||||
@@ -104,6 +96,12 @@
|
|
||||||
return (major * 100 + minor) * 100 + subminor;
|
|
||||||
}
|
|
||||||
|
|
||||||
+uint32_t GetOsVersion() {
|
|
||||||
+ char version_str[PROPERTY_VALUE_MAX];
|
|
||||||
+ property_get(kPlatformVersionProp, version_str, "" /* default */);
|
|
||||||
+ return GetOsVersion(version_str);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
uint32_t GetOsPatchlevel(const char* patchlevel_str) {
|
|
||||||
regex_t regex;
|
|
||||||
if (regcomp(®ex, kPlatformPatchlevelRegex, REG_EXTENDED) != 0) {
|
|
||||||
@@ -112,8 +110,8 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
regmatch_t matches[kPlatformPatchlevelMatchCount];
|
|
||||||
- int not_match
|
|
||||||
- = regexec(®ex, patchlevel_str, kPlatformPatchlevelMatchCount, matches, 0 /* flags */);
|
|
||||||
+ int not_match =
|
|
||||||
+ regexec(®ex, patchlevel_str, kPlatformPatchlevelMatchCount, matches, 0 /* flags */);
|
|
||||||
regfree(®ex);
|
|
||||||
if (not_match) {
|
|
||||||
ALOGI("Platform patchlevel string does not match expected format. Using patchlevel 0");
|
|
||||||
@@ -130,4 +128,10 @@
|
|
||||||
return year * 100 + month;
|
|
||||||
}
|
|
||||||
|
|
||||||
+uint32_t GetOsPatchlevel() {
|
|
||||||
+ char patchlevel_str[PROPERTY_VALUE_MAX];
|
|
||||||
+ property_get(kPlatformPatchlevelProp, patchlevel_str, "" /* default */);
|
|
||||||
+ return GetOsPatchlevel(patchlevel_str);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
} // namespace keymaster
|
|
@ -1,22 +0,0 @@
|
|||||||
From d0d489b8380cb06a7738e9b7276056d9d7479d44 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Daniel Micay <danielmicay@gmail.com>
|
|
||||||
Date: Fri, 17 Jun 2016 07:13:49 -0400
|
|
||||||
Subject: [PATCH] set deny_new_usb feature to dynamic by default
|
|
||||||
|
|
||||||
Change-Id: Ied8e75e6c7f8cc5e1483fe93281a32fe799638c3
|
|
||||||
---
|
|
||||||
core/main.mk | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/core/main.mk b/core/main.mk
|
|
||||||
index af98b548c..e2c90d2d0 100644
|
|
||||||
--- a/core/main.mk
|
|
||||||
+++ b/core/main.mk
|
|
||||||
@@ -244,6 +244,7 @@ ifneq (,$(user_variant))
|
|
||||||
# Target is secure in user builds.
|
|
||||||
ADDITIONAL_DEFAULT_PROPERTIES += ro.secure=1
|
|
||||||
ADDITIONAL_DEFAULT_PROPERTIES += security.perf_harden=1
|
|
||||||
+ ADDITIONAL_DEFAULT_PROPERTIES += persist.security.deny_new_usb=dynamic
|
|
||||||
|
|
||||||
ifeq ($(user_variant),user)
|
|
||||||
ADDITIONAL_DEFAULT_PROPERTIES += ro.adb.secure=1
|
|
@ -1,32 +0,0 @@
|
|||||||
From 7b811853c5d2b05ec5db11786ab3f4b6a079e1a1 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Daniel Micay <danielmicay@gmail.com>
|
|
||||||
Date: Thu, 16 Jun 2016 01:19:53 -0400
|
|
||||||
Subject: [PATCH] dynamic deny_new_usb toggle
|
|
||||||
|
|
||||||
Change-Id: Ie05bf2aaebd8660ec3ff9d823be93cd1202e22db
|
|
||||||
---
|
|
||||||
.../java/com/android/server/policy/keyguard/KeyguardStateMonitor.java | 4 ++++
|
|
||||||
1 file changed, 4 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/services/core/java/com/android/server/policy/keyguard/KeyguardStateMonitor.java b/services/core/java/com/android/server/policy/keyguard/KeyguardStateMonitor.java
|
|
||||||
index 941cd4441e2..80b79bd04da 100644
|
|
||||||
--- a/services/core/java/com/android/server/policy/keyguard/KeyguardStateMonitor.java
|
|
||||||
+++ b/services/core/java/com/android/server/policy/keyguard/KeyguardStateMonitor.java
|
|
||||||
@@ -19,6 +19,7 @@
|
|
||||||
import android.app.ActivityManager;
|
|
||||||
import android.content.Context;
|
|
||||||
import android.os.RemoteException;
|
|
||||||
+import android.os.SystemProperties;
|
|
||||||
import android.util.Slog;
|
|
||||||
|
|
||||||
import com.android.internal.policy.IKeyguardService;
|
|
||||||
@@ -85,6 +86,9 @@ public boolean hasLockscreenWallpaper() {
|
|
||||||
|
|
||||||
@Override // Binder interface
|
|
||||||
public void onShowingStateChanged(boolean showing) {
|
|
||||||
+ if ("dynamic".equals(SystemProperties.get("persist.security.deny_new_usb"))) {
|
|
||||||
+ SystemProperties.set("security.deny_new_usb", showing ? "1" : "0");
|
|
||||||
+ }
|
|
||||||
mIsShowing = showing;
|
|
||||||
}
|
|
||||||
|
|
@ -1,238 +0,0 @@
|
|||||||
From 8d6cd259a90a009167c11a2f135cb9845a8f3e7f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Daniel Micay <danielmicay@gmail.com>
|
|
||||||
Date: Thu, 14 Apr 2016 20:44:06 -0400
|
|
||||||
Subject: [PATCH] add deny_new_usb setting
|
|
||||||
|
|
||||||
Change-Id: If4ee98d636e1876ba546f8a5d562859e8ab7b931
|
|
||||||
---
|
|
||||||
res/values/arrays.xml | 16 +++++++++++++
|
|
||||||
res/values/strings.xml | 3 +++
|
|
||||||
res/xml/security_settings_chooser.xml | 8 +++++++
|
|
||||||
res/xml/security_settings_lockscreen.xml | 8 +++++++
|
|
||||||
res/xml/security_settings_password.xml | 8 +++++++
|
|
||||||
res/xml/security_settings_pattern.xml | 8 +++++++
|
|
||||||
res/xml/security_settings_pin.xml | 8 +++++++
|
|
||||||
src/com/android/settings/SecuritySettings.java | 31 +++++++++++++++++++++++++-
|
|
||||||
8 files changed, 89 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/res/values/arrays.xml b/res/values/arrays.xml
|
|
||||||
index 5e1a468f87..16a7300e96 100644
|
|
||||||
--- a/res/values/arrays.xml
|
|
||||||
+++ b/res/values/arrays.xml
|
|
||||||
@@ -1038,4 +1038,20 @@
|
|
||||||
<item>never</item>
|
|
||||||
</string-array>
|
|
||||||
|
|
||||||
+ <!-- Security Settings -->
|
|
||||||
+ <string-array name="deny_new_usb_entries">
|
|
||||||
+ <item>Disallow new USB peripherals</item>
|
|
||||||
+ <item>Allow new USB peripherals when unlocked</item>
|
|
||||||
+ <item>Allow new USB peripherals</item>
|
|
||||||
+ </string-array>
|
|
||||||
+
|
|
||||||
+ <!-- Do not translate. -->
|
|
||||||
+ <string-array name="deny_new_usb_values" translatable="false">
|
|
||||||
+ <!-- Do not translate. -->
|
|
||||||
+ <item>enabled</item>
|
|
||||||
+ <!-- Do not translate. -->
|
|
||||||
+ <item>dynamic</item>
|
|
||||||
+ <!-- Do not translate. -->
|
|
||||||
+ <item>disabled</item>
|
|
||||||
+ </string-array>
|
|
||||||
</resources>
|
|
||||||
diff --git a/res/values/strings.xml b/res/values/strings.xml
|
|
||||||
index 8265475a98..84ebf5d10b 100644
|
|
||||||
--- a/res/values/strings.xml
|
|
||||||
+++ b/res/values/strings.xml
|
|
||||||
@@ -9052,4 +9052,7 @@
|
|
||||||
|
|
||||||
<!-- Note displayed when certain features are not available on low ram devices. [CHAR LIMIT=NONE] -->
|
|
||||||
<string name="disabled_low_ram_device">This feature is not available on this device</string>
|
|
||||||
+
|
|
||||||
+ <string name="deny_new_usb_title">USB accessories</string>
|
|
||||||
+ <string name="deny_new_usb_summary">Control support for USB peripherals such as input (mice, keyboards, joysticks) and storage devices.</string>
|
|
||||||
</resources>
|
|
||||||
diff --git a/res/xml/security_settings_chooser.xml b/res/xml/security_settings_chooser.xml
|
|
||||||
index 067ebaba0d..2ba2b41006 100644
|
|
||||||
--- a/res/xml/security_settings_chooser.xml
|
|
||||||
+++ b/res/xml/security_settings_chooser.xml
|
|
||||||
@@ -33,6 +33,14 @@
|
|
||||||
android:title="@string/lockscreen_settings_title"
|
|
||||||
android:fragment="com.android.settings.security.LockscreenDashboardFragment"/>
|
|
||||||
|
|
||||||
+ <ListPreference
|
|
||||||
+ android:key="deny_new_usb"
|
|
||||||
+ android:title="@string/deny_new_usb_title"
|
|
||||||
+ android:summary="@string/deny_new_usb_summary"
|
|
||||||
+ android:persistent="false"
|
|
||||||
+ android:entries="@array/deny_new_usb_entries"
|
|
||||||
+ android:entryValues="@array/deny_new_usb_values" />
|
|
||||||
+
|
|
||||||
</PreferenceCategory>
|
|
||||||
|
|
||||||
</PreferenceScreen>
|
|
||||||
diff --git a/res/xml/security_settings_lockscreen.xml b/res/xml/security_settings_lockscreen.xml
|
|
||||||
index c141fb7c74..5181997c99 100644
|
|
||||||
--- a/res/xml/security_settings_lockscreen.xml
|
|
||||||
+++ b/res/xml/security_settings_lockscreen.xml
|
|
||||||
@@ -29,6 +29,14 @@
|
|
||||||
settings:keywords="@string/keywords_lockscreen"
|
|
||||||
android:persistent="false"/>
|
|
||||||
|
|
||||||
+ <ListPreference
|
|
||||||
+ android:key="deny_new_usb"
|
|
||||||
+ android:title="@string/deny_new_usb_title"
|
|
||||||
+ android:summary="@string/deny_new_usb_summary"
|
|
||||||
+ android:persistent="false"
|
|
||||||
+ android:entries="@array/deny_new_usb_entries"
|
|
||||||
+ android:entryValues="@array/deny_new_usb_values" />
|
|
||||||
+
|
|
||||||
</PreferenceCategory>
|
|
||||||
|
|
||||||
</PreferenceScreen>
|
|
||||||
diff --git a/res/xml/security_settings_password.xml b/res/xml/security_settings_password.xml
|
|
||||||
index 7de65f7cc0..2e8361f470 100644
|
|
||||||
--- a/res/xml/security_settings_password.xml
|
|
||||||
+++ b/res/xml/security_settings_password.xml
|
|
||||||
@@ -32,6 +32,14 @@
|
|
||||||
android:title="@string/lockscreen_settings_title"
|
|
||||||
android:fragment="com.android.settings.security.LockscreenDashboardFragment"/>
|
|
||||||
|
|
||||||
+ <ListPreference
|
|
||||||
+ android:key="deny_new_usb"
|
|
||||||
+ android:title="@string/deny_new_usb_title"
|
|
||||||
+ android:summary="@string/deny_new_usb_summary"
|
|
||||||
+ android:persistent="false"
|
|
||||||
+ android:entries="@array/deny_new_usb_entries"
|
|
||||||
+ android:entryValues="@array/deny_new_usb_values" />
|
|
||||||
+
|
|
||||||
</PreferenceCategory>
|
|
||||||
|
|
||||||
</PreferenceScreen>
|
|
||||||
diff --git a/res/xml/security_settings_pattern.xml b/res/xml/security_settings_pattern.xml
|
|
||||||
index 1585f016ee..9ce00d616e 100644
|
|
||||||
--- a/res/xml/security_settings_pattern.xml
|
|
||||||
+++ b/res/xml/security_settings_pattern.xml
|
|
||||||
@@ -32,6 +32,14 @@
|
|
||||||
android:title="@string/lockscreen_settings_title"
|
|
||||||
android:fragment="com.android.settings.security.LockscreenDashboardFragment"/>
|
|
||||||
|
|
||||||
+ <ListPreference
|
|
||||||
+ android:key="deny_new_usb"
|
|
||||||
+ android:title="@string/deny_new_usb_title"
|
|
||||||
+ android:summary="@string/deny_new_usb_summary"
|
|
||||||
+ android:persistent="false"
|
|
||||||
+ android:entries="@array/deny_new_usb_entries"
|
|
||||||
+ android:entryValues="@array/deny_new_usb_values" />
|
|
||||||
+
|
|
||||||
</PreferenceCategory>
|
|
||||||
|
|
||||||
</PreferenceScreen>
|
|
||||||
diff --git a/res/xml/security_settings_pin.xml b/res/xml/security_settings_pin.xml
|
|
||||||
index f7705b7e9c..c291f118a2 100644
|
|
||||||
--- a/res/xml/security_settings_pin.xml
|
|
||||||
+++ b/res/xml/security_settings_pin.xml
|
|
||||||
@@ -32,6 +32,14 @@
|
|
||||||
android:title="@string/lockscreen_settings_title"
|
|
||||||
android:fragment="com.android.settings.security.LockscreenDashboardFragment"/>
|
|
||||||
|
|
||||||
+ <ListPreference
|
|
||||||
+ android:key="deny_new_usb"
|
|
||||||
+ android:title="@string/deny_new_usb_title"
|
|
||||||
+ android:summary="@string/deny_new_usb_summary"
|
|
||||||
+ android:persistent="false"
|
|
||||||
+ android:entries="@array/deny_new_usb_entries"
|
|
||||||
+ android:entryValues="@array/deny_new_usb_values" />
|
|
||||||
+
|
|
||||||
</PreferenceCategory>
|
|
||||||
|
|
||||||
</PreferenceScreen>
|
|
||||||
diff --git a/src/com/android/settings/SecuritySettings.java b/src/com/android/settings/SecuritySettings.java
|
|
||||||
index 55f21fd22a..555b4a7c90 100644
|
|
||||||
--- a/src/com/android/settings/SecuritySettings.java
|
|
||||||
+++ b/src/com/android/settings/SecuritySettings.java
|
|
||||||
@@ -38,11 +38,13 @@
|
|
||||||
import android.os.UserHandle;
|
|
||||||
import android.os.UserManager;
|
|
||||||
import android.os.storage.StorageManager;
|
|
||||||
+import android.os.SystemProperties;
|
|
||||||
import android.provider.SearchIndexableResource;
|
|
||||||
import android.provider.Settings;
|
|
||||||
import android.service.trust.TrustAgentService;
|
|
||||||
import android.support.annotation.VisibleForTesting;
|
|
||||||
import android.support.v14.preference.SwitchPreference;
|
|
||||||
+import android.support.v7.preference.ListPreference;
|
|
||||||
import android.support.v7.preference.Preference;
|
|
||||||
import android.support.v7.preference.Preference.OnPreferenceChangeListener;
|
|
||||||
import android.support.v7.preference.PreferenceGroup;
|
|
||||||
@@ -118,6 +120,10 @@
|
|
||||||
private static final int UNUNIFY_LOCK_CONFIRM_DEVICE_REQUEST = 130;
|
|
||||||
private static final String TAG_UNIFICATION_DIALOG = "unification_dialog";
|
|
||||||
|
|
||||||
+ private static final String KEY_DENY_NEW_USB = "deny_new_usb";
|
|
||||||
+ private static final String DENY_NEW_USB_PROP = "security.deny_new_usb";
|
|
||||||
+ private static final String DENY_NEW_USB_PERSIST_PROP = "persist.security.deny_new_usb";
|
|
||||||
+
|
|
||||||
// Misc Settings
|
|
||||||
private static final String KEY_SIM_LOCK = "sim_lock_settings";
|
|
||||||
private static final String KEY_SHOW_PASSWORD = "show_password";
|
|
||||||
@@ -139,7 +145,7 @@
|
|
||||||
|
|
||||||
// These switch preferences need special handling since they're not all stored in Settings.
|
|
||||||
private static final String SWITCH_PREFERENCE_KEYS[] = {
|
|
||||||
- KEY_SHOW_PASSWORD, KEY_UNIFICATION, KEY_VISIBLE_PATTERN_PROFILE
|
|
||||||
+ KEY_SHOW_PASSWORD, KEY_UNIFICATION, KEY_VISIBLE_PATTERN_PROFILE, KEY_DENY_NEW_USB
|
|
||||||
};
|
|
||||||
|
|
||||||
// Only allow one trust agent on the platform.
|
|
||||||
@@ -169,6 +175,8 @@
|
|
||||||
|
|
||||||
private int mProfileChallengeUserId;
|
|
||||||
|
|
||||||
+ private ListPreference mDenyNewUsb;
|
|
||||||
+
|
|
||||||
private String mCurrentDevicePassword;
|
|
||||||
private String mCurrentProfilePassword;
|
|
||||||
|
|
||||||
@@ -324,6 +332,16 @@ private PreferenceScreen createPreferenceHierarchy() {
|
|
||||||
|
|
||||||
mIsAdmin = mUm.isAdminUser();
|
|
||||||
|
|
||||||
+ if (mIsAdmin) {
|
|
||||||
+ mDenyNewUsb = (ListPreference) findPreference(KEY_DENY_NEW_USB);
|
|
||||||
+ } else {
|
|
||||||
+ PreferenceGroup securityCategory = (PreferenceGroup)
|
|
||||||
+ root.findPreference(KEY_SECURITY_CATEGORY);
|
|
||||||
+ if (securityCategory != null) {
|
|
||||||
+ securityCategory.removePreference(securityCategory.findPreference(KEY_DENY_NEW_USB));
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
// Fingerprint and trust agents
|
|
||||||
int numberOfTrustAgent = 0;
|
|
||||||
PreferenceGroup securityCategory = (PreferenceGroup)
|
|
||||||
@@ -626,6 +644,10 @@ public void onResume() {
|
|
||||||
}
|
|
||||||
|
|
||||||
mLocationcontroller.updateSummary();
|
|
||||||
+
|
|
||||||
+ if (mDenyNewUsb != null) {
|
|
||||||
+ mDenyNewUsb.setValue(SystemProperties.get(DENY_NEW_USB_PERSIST_PROP, "disabled"));
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updateUnificationPreference() {
|
|
||||||
@@ -812,6 +834,13 @@ public boolean onPreferenceChange(Preference preference, Object value) {
|
|
||||||
Settings.System.putInt(getContentResolver(), Settings.System.TEXT_SHOW_PASSWORD,
|
|
||||||
((Boolean) value) ? 1 : 0);
|
|
||||||
lockPatternUtils.setVisiblePasswordEnabled((Boolean) value, MY_USER_ID);
|
|
||||||
+ } else if (KEY_DENY_NEW_USB.equals(key)) {
|
|
||||||
+ String mode = (String) value;
|
|
||||||
+ SystemProperties.set(DENY_NEW_USB_PERSIST_PROP, mode);
|
|
||||||
+ // The dynamic mode defaults to the disabled state
|
|
||||||
+ if (mode.equals("dynamic")) {
|
|
||||||
+ SystemProperties.set(DENY_NEW_USB_PROP, "0");
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
@ -1,159 +0,0 @@
|
|||||||
From f6132218fcfcf8932e963b7f7e785710cdd13f13 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Daniel Micay <danielmicay@gmail.com>
|
|
||||||
Date: Mon, 12 Feb 2018 07:27:04 -0500
|
|
||||||
Subject: [PATCH] LTE only option
|
|
||||||
|
|
||||||
This is a modified version of thestinger's implementation in CopperheadOS from a time when the repo was/is still licensed under Apache2
|
|
||||||
https://github.com/CopperheadOS/platform_packages_services_Telephony/commit/567b8daca2d5d570e4eeecd548aa03c606ee9c18
|
|
||||||
|
|
||||||
Change-Id: I63cd7d31bc5942b4dd48ce0c3bef0397a06091a6
|
|
||||||
---
|
|
||||||
res/values/strings.xml | 16 ++++++++++++++++
|
|
||||||
src/com/android/phone/MobileNetworkSettings.java | 10 ++++++++--
|
|
||||||
2 files changed, 24 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/res/values/strings.xml b/res/values/strings.xml
|
|
||||||
index a5651571c..7bf60a8df 100644
|
|
||||||
--- a/res/values/strings.xml
|
|
||||||
+++ b/res/values/strings.xml
|
|
||||||
@@ -408,6 +408,8 @@
|
|
||||||
<string name="preferred_network_mode_cdma_evdo_gsm_wcdma_summary">Preferred network mode: CDMA/EvDo/GSM/WCDMA</string>
|
|
||||||
<!-- Mobile network settings, summary for preferred network mode LTE [CHAR LIMIT=100] -->
|
|
||||||
<string name="preferred_network_mode_lte_summary">Preferred network mode: LTE </string>
|
|
||||||
+ <!-- Mobile network settings, summary for preferred network mode LTE only [CHAR LIMIT=100] -->
|
|
||||||
+ <string name="preferred_network_mode_lte_only_summary">Preferred network mode: LTE only</string>
|
|
||||||
<!-- Mobile network settings, summary for preferred network mode GSM/WCDMA/LTE [CHAR LIMIT=100] -->
|
|
||||||
<string name="preferred_network_mode_lte_gsm_wcdma_summary">Preferred network mode: GSM/WCDMA/LTE</string>
|
|
||||||
<!-- Mobile network settings, summary for preferred network mode CDMA+LTE/EVDO[CHAR LIMIT=100] -->
|
|
||||||
@@ -695,7 +697,9 @@
|
|
||||||
<string name="multi_category_disable">Multi-category disabled</string>
|
|
||||||
|
|
||||||
<string name="network_lte">LTE (recommended)</string>
|
|
||||||
+ <string name="network_lte_only">LTE only</string>
|
|
||||||
<string name="network_4G">4G (recommended)</string>
|
|
||||||
+ <string name="network_4G_only">4G only</string>
|
|
||||||
<string name="network_3G" translatable="false">3G</string>
|
|
||||||
<string name="network_2G" translatable="false">2G</string>
|
|
||||||
<string name="network_1x" translatable="false">1x</string>
|
|
||||||
@@ -703,14 +707,17 @@
|
|
||||||
|
|
||||||
<string-array name="enabled_networks_except_gsm_choices" translatable="false">
|
|
||||||
<item>@string/network_lte</item>
|
|
||||||
+ <item>@string/network_lte_only</item>
|
|
||||||
<item>@string/network_3G</item>
|
|
||||||
</string-array>
|
|
||||||
<string-array name="enabled_networks_except_gsm_4g_choices" translatable="false">
|
|
||||||
<item>@string/network_4G</item>
|
|
||||||
+ <item>@string/network_4G_only</item>
|
|
||||||
<item>@string/network_3G</item>
|
|
||||||
</string-array>
|
|
||||||
<string-array name="enabled_networks_except_gsm_values" translatable="false">
|
|
||||||
<item>"9"</item>
|
|
||||||
+ <item>"11"</item>
|
|
||||||
<item>"0"</item>
|
|
||||||
</string-array>
|
|
||||||
|
|
||||||
@@ -732,28 +739,33 @@
|
|
||||||
|
|
||||||
<string-array name="enabled_networks_choices" translatable="false">
|
|
||||||
<item>@string/network_lte</item>
|
|
||||||
+ <item>@string/network_lte_only</item>
|
|
||||||
<item>@string/network_3G</item>
|
|
||||||
<item>@string/network_2G</item>
|
|
||||||
</string-array>
|
|
||||||
<string-array name="enabled_networks_4g_choices" translatable="false">
|
|
||||||
<item>@string/network_4G</item>
|
|
||||||
+ <item>@string/network_4G_only</item>
|
|
||||||
<item>@string/network_3G</item>
|
|
||||||
<item>@string/network_2G</item>
|
|
||||||
</string-array>
|
|
||||||
<string-array name="enabled_networks_values" translatable="false">
|
|
||||||
<item>"9"</item>
|
|
||||||
+ <item>"11"</item>
|
|
||||||
<item>"0"</item>
|
|
||||||
<item>"1"</item>
|
|
||||||
</string-array>
|
|
||||||
|
|
||||||
<string-array name="enabled_networks_cdma_choices" translatable="false">
|
|
||||||
<item>@string/network_lte</item>
|
|
||||||
+ <item>@string/network_lte_only</item>
|
|
||||||
<item>@string/network_3G</item>
|
|
||||||
<item>@string/network_1x</item>
|
|
||||||
<item>@string/network_global</item>
|
|
||||||
</string-array>
|
|
||||||
<string-array name="enabled_networks_cdma_values" translatable="false">
|
|
||||||
<item>"8"</item>
|
|
||||||
+ <item>"11"</item>
|
|
||||||
<item>"4"</item>
|
|
||||||
<item>"5"</item>
|
|
||||||
<item>"10"</item>
|
|
||||||
@@ -770,20 +782,24 @@
|
|
||||||
|
|
||||||
<string-array name="enabled_networks_cdma_only_lte_choices" translatable="false">
|
|
||||||
<item>@string/network_lte</item>
|
|
||||||
+ <item>@string/network_lte_only</item>
|
|
||||||
<item>@string/network_global</item>
|
|
||||||
</string-array>
|
|
||||||
<string-array name="enabled_networks_cdma_only_lte_values" translatable="false">
|
|
||||||
<item>"8"</item>
|
|
||||||
+ <item>"11"</item>
|
|
||||||
<item>"10"</item>
|
|
||||||
</string-array>
|
|
||||||
|
|
||||||
<string-array name="enabled_networks_tdscdma_choices" translatable="false">
|
|
||||||
<item>@string/network_lte</item>
|
|
||||||
+ <item>@string/network_lte_only</item>
|
|
||||||
<item>@string/network_3G</item>
|
|
||||||
<item>@string/network_2G</item>
|
|
||||||
</string-array>
|
|
||||||
<string-array name="enabled_networks_tdscdma_values" translatable="false">
|
|
||||||
<item>"22"</item>
|
|
||||||
+ <item>"11"</item>
|
|
||||||
<item>"18"</item>
|
|
||||||
<item>"1"</item>
|
|
||||||
</string-array>
|
|
||||||
diff --git a/src/com/android/phone/MobileNetworkSettings.java b/src/com/android/phone/MobileNetworkSettings.java
|
|
||||||
index 0ea4702b4..47e8bcf12 100644
|
|
||||||
--- a/src/com/android/phone/MobileNetworkSettings.java
|
|
||||||
+++ b/src/com/android/phone/MobileNetworkSettings.java
|
|
||||||
@@ -1157,6 +1157,7 @@ public class MobileNetworkSettings extends Activity {
|
|
||||||
switch (buttonNetworkMode) {
|
|
||||||
case Phone.NT_MODE_WCDMA_PREF:
|
|
||||||
case Phone.NT_MODE_GSM_ONLY:
|
|
||||||
+ case Phone.NT_MODE_LTE_ONLY:
|
|
||||||
case Phone.NT_MODE_LTE_GSM_WCDMA:
|
|
||||||
case Phone.NT_MODE_LTE_CDMA_EVDO_GSM_WCDMA:
|
|
||||||
case Phone.NT_MODE_CDMA:
|
|
||||||
@@ -1363,7 +1364,7 @@ public class MobileNetworkSettings extends Activity {
|
|
||||||
break;
|
|
||||||
case Phone.NT_MODE_LTE_ONLY:
|
|
||||||
mButtonPreferredNetworkMode.setSummary(
|
|
||||||
- R.string.preferred_network_mode_lte_summary);
|
|
||||||
+ R.string.preferred_network_mode_lte_only_summary);
|
|
||||||
break;
|
|
||||||
case Phone.NT_MODE_LTE_TDSCDMA_GSM:
|
|
||||||
mButtonPreferredNetworkMode.setSummary(
|
|
||||||
@@ -1463,7 +1464,6 @@ public class MobileNetworkSettings extends Activity {
|
|
||||||
controlGsmOptions(true);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
- case Phone.NT_MODE_LTE_ONLY:
|
|
||||||
case Phone.NT_MODE_LTE_WCDMA:
|
|
||||||
if (!mIsGlobalCdma) {
|
|
||||||
mButtonEnabledNetworks.setValue(
|
|
||||||
@@ -1476,6 +1476,12 @@ public class MobileNetworkSettings extends Activity {
|
|
||||||
mButtonEnabledNetworks.setSummary(R.string.network_global);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
+ case Phone.NT_MODE_LTE_ONLY:
|
|
||||||
+ mButtonEnabledNetworks.setValue(
|
|
||||||
+ Integer.toString(Phone.NT_MODE_LTE_ONLY));
|
|
||||||
+ mButtonEnabledNetworks.setSummary((mShow4GForLTE == true)
|
|
||||||
+ ? R.string.network_4G_only : R.string.network_lte_only);
|
|
||||||
+ break;
|
|
||||||
case Phone.NT_MODE_LTE_CDMA_AND_EVDO:
|
|
||||||
if (isWorldMode()) {
|
|
||||||
mButtonEnabledNetworks.setSummary(
|
|
||||||
--
|
|
||||||
2.16.1
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
|||||||
From 808fb79d8171f26bc29332145df4edac1925e76e Mon Sep 17 00:00:00 2001
|
|
||||||
From: Daniel Micay <danielmicay@gmail.com>
|
|
||||||
Date: Sun, 22 Apr 2018 10:18:06 -0400
|
|
||||||
Subject: [PATCH] add properties for controlling deny_new_usb
|
|
||||||
|
|
||||||
Change-Id: I0ead2254b7e379abaeab6f0f78a48680d40a8994
|
|
||||||
---
|
|
||||||
rootdir/init.rc | 12 ++++++++++++
|
|
||||||
1 file changed, 12 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/rootdir/init.rc b/rootdir/init.rc
|
|
||||||
index 2a7333563..aa654c38f 100644
|
|
||||||
--- a/rootdir/init.rc
|
|
||||||
+++ b/rootdir/init.rc
|
|
||||||
@@ -696,6 +696,18 @@ on property:sys.sysctl.extra_free_kbytes=*
|
|
||||||
on property:sys.sysctl.tcp_def_init_rwnd=*
|
|
||||||
write /proc/sys/net/ipv4/tcp_default_init_rwnd ${sys.sysctl.tcp_def_init_rwnd}
|
|
||||||
|
|
||||||
+on property:persist.security.deny_new_usb=disabled
|
|
||||||
+ write /proc/sys/kernel/deny_new_usb 0
|
|
||||||
+
|
|
||||||
+on property:persist.security.deny_new_usb=enabled
|
|
||||||
+ write /proc/sys/kernel/deny_new_usb 1
|
|
||||||
+
|
|
||||||
+on property:persist.security.deny_new_usb=dynamic
|
|
||||||
+ write /proc/sys/kernel/deny_new_usb 1
|
|
||||||
+
|
|
||||||
+on property:security.deny_new_usb=*
|
|
||||||
+ write /proc/sys/kernel/deny_new_usb ${security.deny_new_usb}
|
|
||||||
+
|
|
||||||
on property:security.perf_harden=0
|
|
||||||
write /proc/sys/kernel/perf_event_paranoid 1
|
|
||||||
|
|
||||||
--
|
|
||||||
2.17.0
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
|||||||
From 9bd23222fab996016eb2d31772129b09594f4667 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Daniel Micay <danielmicay@gmail.com>
|
|
||||||
Date: Thu, 16 Jun 2016 01:07:25 -0400
|
|
||||||
Subject: [PATCH] allow system to set security.deny_new_usb
|
|
||||||
|
|
||||||
---
|
|
||||||
private/property_contexts | 2 ++
|
|
||||||
1 file changed, 2 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/private/property_contexts b/private/property_contexts
|
|
||||||
index e524f54e..86b7d8a3 100644
|
|
||||||
--- a/private/property_contexts
|
|
||||||
+++ b/private/property_contexts
|
|
||||||
@@ -66,6 +66,8 @@ ro.boot.btmacaddr u:object_r:bluetooth_prop:s0
|
|
||||||
ro.boot.serialno u:object_r:serialno_prop:s0
|
|
||||||
ro.bt. u:object_r:bluetooth_prop:s0
|
|
||||||
|
|
||||||
+security.deny_new_usb u:object_r:system_prop:s0
|
|
||||||
+
|
|
||||||
# Boolean property set by system server upon boot indicating
|
|
||||||
# if device owner is provisioned.
|
|
||||||
ro.device_owner u:object_r:device_logging_prop:s0
|
|
@ -139,7 +139,7 @@ export -f enableDexPreOptFull;
|
|||||||
|
|
||||||
enableLowRam() {
|
enableLowRam() {
|
||||||
cd "$DOS_BUILD_BASE$1";
|
cd "$DOS_BUILD_BASE$1";
|
||||||
if [ -f lineage.mk ]; then echo '$(call inherit-product, $(SRC_TARGET_DIR)/product/lowram.mk)' >> lineage.mk; fi;
|
if [ -f lineage.mk ]; then echo '$(call inherit-product, vendor/divested/target/product/lowram.mk)' >> lineage.mk; fi;
|
||||||
if [ -f BoardConfig.mk ]; then echo 'MALLOC_SVELTE := true' >> BoardConfig.mk; fi;
|
if [ -f BoardConfig.mk ]; then echo 'MALLOC_SVELTE := true' >> BoardConfig.mk; fi;
|
||||||
if [ -f BoardConfigCommon.mk ]; then echo 'MALLOC_SVELTE := true' >> BoardConfigCommon.mk; fi;
|
if [ -f BoardConfigCommon.mk ]; then echo 'MALLOC_SVELTE := true' >> BoardConfigCommon.mk; fi;
|
||||||
echo "Enabled lowram for $1";
|
echo "Enabled lowram for $1";
|
||||||
|
@ -65,10 +65,6 @@ patch -p1 < "$DOS_PATCHES/android_bootable_recovery/0001-Squash_Menus.patch"; #W
|
|||||||
|
|
||||||
enterAndClear "build";
|
enterAndClear "build";
|
||||||
patch -p1 < "$DOS_PATCHES/android_build/0001-Automated_Build_Signing.patch"; #Automated build signing (CopperheadOS-13.0)
|
patch -p1 < "$DOS_PATCHES/android_build/0001-Automated_Build_Signing.patch"; #Automated build signing (CopperheadOS-13.0)
|
||||||
sed -i 's/messaging/Silence/' target/product/*.mk; #Replace AOSP Messaging app with Silence
|
|
||||||
sed -i 's/ro.secure=0/ro.secure=1/' core/main.mk;
|
|
||||||
#sed -i 's/ro.adb.secure=0/ro.adb.secure=1/' core/main.mk;
|
|
||||||
cp "$DOS_PATCHES_COMMON/android_build/lowram.mk" target/product/lowram.mk;
|
|
||||||
|
|
||||||
enterAndClear "device/qcom/sepolicy";
|
enterAndClear "device/qcom/sepolicy";
|
||||||
patch -p1 < "$DOS_PATCHES/android_device_qcom_sepolicy/0001-Camera_Fix.patch"; #Fix camera on user builds XXX: REMOVE THIS TRASH
|
patch -p1 < "$DOS_PATCHES/android_device_qcom_sepolicy/0001-Camera_Fix.patch"; #Fix camera on user builds XXX: REMOVE THIS TRASH
|
||||||
@ -79,13 +75,9 @@ patch -p1 < "$DOS_PATCHES/android_external_sqlite/0001-Secure_Delete.patch"; #En
|
|||||||
enterAndClear "frameworks/base";
|
enterAndClear "frameworks/base";
|
||||||
git revert 0326bb5e41219cf502727c3aa44ebf2daa19a5b3; #re-enable doze on devices without gms
|
git revert 0326bb5e41219cf502727c3aa44ebf2daa19a5b3; #re-enable doze on devices without gms
|
||||||
sed -i 's/DEFAULT_MAX_FILES = 1000;/DEFAULT_MAX_FILES = 0;/' services/core/java/com/android/server/DropBoxManagerService.java; #Disable DropBox
|
sed -i 's/DEFAULT_MAX_FILES = 1000;/DEFAULT_MAX_FILES = 0;/' services/core/java/com/android/server/DropBoxManagerService.java; #Disable DropBox
|
||||||
sed -i 's/com.android.messaging/org.smssecure.smssecure/' core/res/res/values/config.xml; #Change default SMS app to Silence
|
|
||||||
sed -i 's|db_default_journal_mode" translatable="false">PERSIST|db_default_journal_mode" translatable="false">TRUNCATE|' core/res/res/values/config.xml; #Mirror SQLite secure_delete
|
|
||||||
sed -i 's|config_permissionReviewRequired">false|config_permissionReviewRequired">true|' core/res/res/values/config.xml;
|
|
||||||
patch -p1 < "$DOS_PATCHES/android_frameworks_base/0001-Reduced_Resolution.patch"; #Allow reducing resolution to save power TODO: Add 800x480
|
patch -p1 < "$DOS_PATCHES/android_frameworks_base/0001-Reduced_Resolution.patch"; #Allow reducing resolution to save power TODO: Add 800x480
|
||||||
if [ "$DOS_MICROG_INCLUDED" = "FULL" ]; then patch -p1 < "$DOS_PATCHES/android_frameworks_base/0003-Signature_Spoofing.patch"; fi; #Allow packages to spoof their signature (microG)
|
if [ "$DOS_MICROG_INCLUDED" = "FULL" ]; then patch -p1 < "$DOS_PATCHES/android_frameworks_base/0003-Signature_Spoofing.patch"; fi; #Allow packages to spoof their signature (microG)
|
||||||
if [ "$DOS_MICROG_INCLUDED" = "FULL" ]; then patch -p1 < "$DOS_PATCHES/android_frameworks_base/0005-Harden_Sig_Spoofing.patch"; fi; #Restrict signature spoofing to system apps signed with the platform key
|
if [ "$DOS_MICROG_INCLUDED" = "FULL" ]; then patch -p1 < "$DOS_PATCHES/android_frameworks_base/0005-Harden_Sig_Spoofing.patch"; fi; #Restrict signature spoofing to system apps signed with the platform key
|
||||||
if [ "$DOS_MICROG_INCLUDED" = "NLP" ]; then sed -i '/<item>com.android.location.fused<\/item>/a \ \ \ \ \ \ \ \ <item>org.microg.nlp</item>' core/res/res/values/config.xml; fi; #Add UnifiedNLP to location providers
|
|
||||||
changeDefaultDNS;
|
changeDefaultDNS;
|
||||||
#patch -p1 < "$DOS_PATCHES/android_frameworks_base/0007-Connectivity.patch"; #Change connectivity check URLs to ours
|
#patch -p1 < "$DOS_PATCHES/android_frameworks_base/0007-Connectivity.patch"; #Change connectivity check URLs to ours
|
||||||
patch -p1 < "$DOS_PATCHES/android_frameworks_base/0008-Disable_Analytics.patch"; #Disable/reduce functionality of various ad/analytics libraries
|
patch -p1 < "$DOS_PATCHES/android_frameworks_base/0008-Disable_Analytics.patch"; #Disable/reduce functionality of various ad/analytics libraries
|
||||||
@ -107,19 +99,11 @@ awk -i inplace '!/com.android.internal.R.bool.config_permissionReviewRequired/'
|
|||||||
|
|
||||||
enterAndClear "packages/apps/CMParts";
|
enterAndClear "packages/apps/CMParts";
|
||||||
rm -rf src/org/cyanogenmod/cmparts/cmstats/ res/xml/anonymous_stats.xml res/xml/preview_data.xml; #Nuke part of CMStats
|
rm -rf src/org/cyanogenmod/cmparts/cmstats/ res/xml/anonymous_stats.xml res/xml/preview_data.xml; #Nuke part of CMStats
|
||||||
sed -i 's|config_showWeatherMenu">true|config_showWeatherMenu">false|' res/values/config.xml; #Disable Weather
|
sed -i 's|config_showWeatherMenu">true|config_showWeatherMenu">false|' res/values/config.xml; #Disable Weather #TODO OVERLAY
|
||||||
patch -p1 < "$DOS_PATCHES/android_packages_apps_CMParts/0001-Remove_Analytics.patch"; #Remove the rest of CMStats
|
patch -p1 < "$DOS_PATCHES/android_packages_apps_CMParts/0001-Remove_Analytics.patch"; #Remove the rest of CMStats
|
||||||
patch -p1 < "$DOS_PATCHES/android_packages_apps_CMParts/0002-Reduced_Resolution.patch"; #Allow reducing resolution to save power
|
patch -p1 < "$DOS_PATCHES/android_packages_apps_CMParts/0002-Reduced_Resolution.patch"; #Allow reducing resolution to save power
|
||||||
|
|
||||||
if [ "$DOS_MICROG_INCLUDED" = "FULL" ]; then
|
|
||||||
enterAndClear "packages/apps/FakeStore";
|
|
||||||
sed -i 's|$(OUT_DIR)/target/|$(PWD)/$(OUT_DIR)/target/|' Android.mk;
|
|
||||||
sed -i 's/ln -s /ln -sf /' Android.mk;
|
|
||||||
sed -i 's/ext.androidBuildVersionTools = "24.0.3"/ext.androidBuildVersionTools = "25.0.3"/' build.gradle;
|
|
||||||
fi;
|
|
||||||
|
|
||||||
enterAndClear "packages/apps/FDroid";
|
enterAndClear "packages/apps/FDroid";
|
||||||
cp "$DOS_PATCHES_COMMON/android_packages_apps_FDroid/default_repos.xml" app/src/main/res/values/default_repos.xml; #Add extra repos
|
|
||||||
sed -i 's|outputs/apk/|outputs/apk/full/release/|' Android.mk;
|
sed -i 's|outputs/apk/|outputs/apk/full/release/|' Android.mk;
|
||||||
sed -i 's|-release-unsigned|-full-release-unsigned|' Android.mk;
|
sed -i 's|-release-unsigned|-full-release-unsigned|' Android.mk;
|
||||||
sed -i 's|gradle|./gradlew|' Android.mk; #Gradle 4.0 fix
|
sed -i 's|gradle|./gradlew|' Android.mk; #Gradle 4.0 fix
|
||||||
@ -132,16 +116,6 @@ sed -i 's/\"org\.fdroid\.fdroid/\"org.fdroid.fdroid_dos/' app/src/main/java/org/
|
|||||||
#release-key: CB:1E:E2:EC:40:D0:5E:D6:78:F4:2A:E7:01:CD:FA:29:EE:A7:9D:0E:6D:63:32:76:DE:23:0B:F3:49:40:67:C3
|
#release-key: CB:1E:E2:EC:40:D0:5E:D6:78:F4:2A:E7:01:CD:FA:29:EE:A7:9D:0E:6D:63:32:76:DE:23:0B:F3:49:40:67:C3
|
||||||
#test-key: C8:A2:E9:BC:CF:59:7C:2F:B6:DC:66:BE:E2:93:FC:13:F2:FC:47:EC:77:BC:6B:2B:0D:52:C1:1F:51:19:2A:B8
|
#test-key: C8:A2:E9:BC:CF:59:7C:2F:B6:DC:66:BE:E2:93:FC:13:F2:FC:47:EC:77:BC:6B:2B:0D:52:C1:1F:51:19:2A:B8
|
||||||
|
|
||||||
if [ "$DOS_MICROG_INCLUDED" = "FULL" ]; then
|
|
||||||
enterAndClear "packages/apps/GmsCore";
|
|
||||||
git submodule update --init --recursive;
|
|
||||||
fi;
|
|
||||||
|
|
||||||
if [ "$DOS_MICROG_INCLUDED" = "FULL" ]; then
|
|
||||||
enterAndClear "packages/apps/GsfProxy";
|
|
||||||
sed -i 's/ext.androidBuildVersionTools = "24.0.3"/ext.androidBuildVersionTools = "25.0.3"/' build.gradle;
|
|
||||||
fi;
|
|
||||||
|
|
||||||
enterAndClear "packages/apps/PackageInstaller";
|
enterAndClear "packages/apps/PackageInstaller";
|
||||||
patch -p1 < "$DOS_PATCHES/android_packages_apps_PackageInstaller/64d8b44.diff"; #Fix an issue with Permission Review
|
patch -p1 < "$DOS_PATCHES/android_packages_apps_PackageInstaller/64d8b44.diff"; #Fix an issue with Permission Review
|
||||||
|
|
||||||
@ -153,9 +127,6 @@ if [ "$DOS_MICROG_INCLUDED" = "FULL" ]; then sed -i 's/GSETTINGS_PROVIDER = "com
|
|||||||
enterAndClear "packages/apps/SetupWizard";
|
enterAndClear "packages/apps/SetupWizard";
|
||||||
patch -p1 < "$DOS_PATCHES/android_packages_apps_SetupWizard/0001-Remove_Analytics.patch"; #Remove the rest of CMStats
|
patch -p1 < "$DOS_PATCHES/android_packages_apps_SetupWizard/0001-Remove_Analytics.patch"; #Remove the rest of CMStats
|
||||||
|
|
||||||
enterAndClear "packages/apps/Trebuchet";
|
|
||||||
cp -r "$DOS_PATCHES_COMMON/android_packages_apps_Trebuchet/default_workspace/." "res/xml/";
|
|
||||||
|
|
||||||
enterAndClear "packages/apps/Updater";
|
enterAndClear "packages/apps/Updater";
|
||||||
patch -p1 < "$DOS_PATCHES_COMMON/android_packages_apps_Updater/0001-Server.patch"; #Switch to our server
|
patch -p1 < "$DOS_PATCHES_COMMON/android_packages_apps_Updater/0001-Server.patch"; #Switch to our server
|
||||||
#TODO: Remove changelog
|
#TODO: Remove changelog
|
||||||
@ -172,18 +143,11 @@ sed -i 's/WallpaperUtils.EXTRA_WALLPAPER_OFFSET, 0);/WallpaperUtils.EXTRA_WALLPA
|
|||||||
enterAndClear "packages/inputmethods/LatinIME";
|
enterAndClear "packages/inputmethods/LatinIME";
|
||||||
patch -p1 < "$DOS_PATCHES_COMMON/android_packages_inputmethods_LatinIME/0001-Voice.patch"; #Remove voice input key
|
patch -p1 < "$DOS_PATCHES_COMMON/android_packages_inputmethods_LatinIME/0001-Voice.patch"; #Remove voice input key
|
||||||
|
|
||||||
enterAndClear "packages/services/Telephony";
|
|
||||||
if [ "$DOS_NON_COMMERCIAL_USE_PATCHES" = true ]; then patch -p1 < "$DOS_PATCHES/android_packages_services_Telephony/Copperhead/0001-LTE_Only.patch"; fi; #LTE only preferred network mode choice (Copperhead CC BY-NC-SA)
|
|
||||||
|
|
||||||
enterAndClear "system/core";
|
enterAndClear "system/core";
|
||||||
if [ "$DOS_HOSTS_BLOCKING" = true ]; then cat "$DOS_HOSTS_FILE" >> rootdir/etc/hosts; fi; #Merge in our HOSTS file
|
if [ "$DOS_HOSTS_BLOCKING" = true ]; then cat "$DOS_HOSTS_FILE" >> rootdir/etc/hosts; fi; #Merge in our HOSTS file
|
||||||
git revert 0217dddeb5c16903c13ff6c75213619b79ea622b d7aa1231b6a0631f506c0c23816f2cd81645b15f; #Always update recovery XXX: This doesn't seem to work
|
git revert 0217dddeb5c16903c13ff6c75213619b79ea622b d7aa1231b6a0631f506c0c23816f2cd81645b15f; #Always update recovery XXX: This doesn't seem to work
|
||||||
patch -p1 < "$DOS_PATCHES/android_system_core/0001-Harden_Mounts.patch"; #Harden mounts with nodev/noexec/nosuid (CopperheadOS-13.0)
|
patch -p1 < "$DOS_PATCHES/android_system_core/0001-Harden_Mounts.patch"; #Harden mounts with nodev/noexec/nosuid (CopperheadOS-13.0)
|
||||||
|
|
||||||
enterAndClear "system/keymaster";
|
|
||||||
patch -p1 < "$DOS_PATCHES/android_system_keymaster/0001-Backport_Fixes.patch"; #Fixes from 8.1, appears to fix https://jira.lineageos.org/browse/BUGBASH-590
|
|
||||||
patch -p1 < "$DOS_PATCHES/android_system_keymaster/0002-Backport_Fixes.patch";
|
|
||||||
|
|
||||||
enterAndClear "system/sepolicy";
|
enterAndClear "system/sepolicy";
|
||||||
patch -p1 < "$DOS_PATCHES/android_system_sepolicy/0001-LGE_Fixes.patch"; #Fix -user builds for LGE devices
|
patch -p1 < "$DOS_PATCHES/android_system_sepolicy/0001-LGE_Fixes.patch"; #Fix -user builds for LGE devices
|
||||||
|
|
||||||
@ -195,30 +159,23 @@ rm -rf overlay/common/vendor/cmsdk/packages; #Remove analytics
|
|||||||
awk -i inplace '!/50-cm.sh/' config/common.mk; #Make sure our hosts is always used
|
awk -i inplace '!/50-cm.sh/' config/common.mk; #Make sure our hosts is always used
|
||||||
awk -i inplace '!/PRODUCT_EXTRA_RECOVERY_KEYS/' config/common.mk; #Remove extra keys
|
awk -i inplace '!/PRODUCT_EXTRA_RECOVERY_KEYS/' config/common.mk; #Remove extra keys
|
||||||
awk -i inplace '!/security\/lineage/' config/common.mk; #Remove extra keys
|
awk -i inplace '!/security\/lineage/' config/common.mk; #Remove extra keys
|
||||||
sed -i '3iinclude vendor/cm/config/sce.mk' config/common.mk; #Include extra apps
|
|
||||||
if [ "$DOS_DEBLOBBER_REMOVE_AUDIOFX" = true ]; then
|
if [ "$DOS_DEBLOBBER_REMOVE_AUDIOFX" = true ]; then
|
||||||
awk -i inplace '!/AudioFX/' config/common.mk;
|
awk -i inplace '!/AudioFX/' config/common.mk;
|
||||||
awk -i inplace '!/AudioService/' config/common.mk;
|
awk -i inplace '!/AudioService/' config/common.mk;
|
||||||
fi;
|
fi;
|
||||||
cp "$DOS_PATCHES_COMMON/android_vendor_divested/sce.mk" config/sce.mk;
|
|
||||||
if [ "$DOS_MICROG_INCLUDED" = "FULL" ]; then echo "PRODUCT_PACKAGES += GmsCore GsfProxy FakeStore" >> config/sce.mk; fi;
|
|
||||||
if [ "$DOS_MICROG_INCLUDED" = "NLP" ]; then echo "PRODUCT_PACKAGES += UnifiedNLP" >> config/sce.mk; fi;
|
|
||||||
if [ "$DOS_MICROG_INCLUDED" = "NLP" ]; then sed -i '/Google provider/!b;n;s/com.google.android.gms/org.microg.nlp/' overlay/common/frameworks/base/core/res/res/values/config.xml; fi;
|
|
||||||
if [ "$DOS_MICROG_INCLUDED" != "NONE" ]; then cp "$DOS_PATCHES_COMMON/android_vendor_divested/sce-UnifiedNLP-Backends.mk" config/sce-UnifiedNLP-Backends.mk; fi;
|
|
||||||
if [ "$DOS_MICROG_INCLUDED" != "NONE" ]; then echo "include vendor/cm/config/sce-UnifiedNLP-Backends.mk" >> config/sce.mk; fi;
|
|
||||||
cp "$DOS_PATCHES/android_vendor_cm/config.xml" overlay/common/vendor/cmsdk/cm/res/res/values/config.xml; #Per app performance profiles
|
|
||||||
cp -r "$DOS_PATCHES_COMMON/android_vendor_divested/firmware_deblobber" .;
|
|
||||||
cp "$DOS_PATCHES/android_vendor_cm/firmware_deblobber.mk" build/tasks/firmware_deblobber.mk;
|
|
||||||
sed -i 's/CM_BUILDTYPE := UNOFFICIAL/CM_BUILDTYPE := dos/' config/common.mk; #Change buildtype
|
sed -i 's/CM_BUILDTYPE := UNOFFICIAL/CM_BUILDTYPE := dos/' config/common.mk; #Change buildtype
|
||||||
if [ "$DOS_NON_COMMERCIAL_USE_PATCHES" = true ]; then sed -i 's/CM_BUILDTYPE := dos/CM_BUILDTYPE := dosNC/' config/common.mk; fi;
|
if [ "$DOS_NON_COMMERCIAL_USE_PATCHES" = true ]; then sed -i 's/CM_BUILDTYPE := dos/CM_BUILDTYPE := dosNC/' config/common.mk; fi;
|
||||||
sed -i 's/messaging/Silence/' config/telephony.mk; #Replace AOSP Messaging app with Silence
|
cp "$DOS_PATCHES/android_vendor_cm/config.xml" overlay/common/vendor/cmsdk/cm/res/res/values/config.xml; #Per app performance profiles
|
||||||
#if [ "$DOS_HOSTS_BLOCKING" = false ]; then echo "PRODUCT_PACKAGES += DNS66" >> config/sce.mk; fi; #Include DNS66 as an alternative
|
sed -i '3iinclude vendor/divested/divested.mk' config/common.mk; #Include our customizations
|
||||||
|
|
||||||
enterAndClear "vendor/cmsdk";
|
enterAndClear "vendor/cmsdk";
|
||||||
awk -i inplace '!/WeatherManagerServiceBroker/' cm/res/res/values/config.xml; #Disable Weather
|
awk -i inplace '!/WeatherManagerServiceBroker/' cm/res/res/values/config.xml; #Disable Weather
|
||||||
if [ "$DOS_DEBLOBBER_REMOVE_AUDIOFX" = true ]; then awk -i inplace '!/CMAudioService/' cm/res/res/values/config.xml; fi;
|
if [ "$DOS_DEBLOBBER_REMOVE_AUDIOFX" = true ]; then awk -i inplace '!/CMAudioService/' cm/res/res/values/config.xml; fi;
|
||||||
cp "$DOS_PATCHES_COMMON/android_lineage-sdk/profile_default.xml" cm/res/res/xml/profile_default.xml; #Replace default profiles with *way* better ones
|
|
||||||
sed -i 's/shouldUseOptimizations(weight)/true/' cm/lib/main/java/org/cyanogenmod/platform/internal/PerformanceManagerService.java; #Per app performance profiles fix
|
sed -i 's/shouldUseOptimizations(weight)/true/' cm/lib/main/java/org/cyanogenmod/platform/internal/PerformanceManagerService.java; #Per app performance profiles fix
|
||||||
|
|
||||||
|
enterAndClear "vendor/divested";
|
||||||
|
if [ "$DOS_MICROG_INCLUDED" = "FULL" ]; then echo "PRODUCT_PACKAGES += microG" >> packages.mk;
|
||||||
|
if [ "$DOS_HOSTS_BLOCKING" = false ]; then echo "PRODUCT_PACKAGES += DNS66" >> packages.mk;
|
||||||
#
|
#
|
||||||
#END OF ROM CHANGES
|
#END OF ROM CHANGES
|
||||||
#
|
#
|
||||||
|
@ -127,7 +127,7 @@ export -f enableDexPreOptFull;
|
|||||||
enableLowRam() {
|
enableLowRam() {
|
||||||
cd "$DOS_BUILD_BASE$1";
|
cd "$DOS_BUILD_BASE$1";
|
||||||
#if [ -f lineage.mk ]; then echo '$(call inherit-product, $(SRC_TARGET_DIR)/product/go_defaults.mk)' >> lineage.mk; fi;
|
#if [ -f lineage.mk ]; then echo '$(call inherit-product, $(SRC_TARGET_DIR)/product/go_defaults.mk)' >> lineage.mk; fi;
|
||||||
if [ -f lineage.mk ]; then echo '$(call inherit-product, $(SRC_TARGET_DIR)/product/lowram.mk)' >> lineage.mk; fi;
|
if [ -f lineage.mk ]; then echo '$(call inherit-product, vendor/divested/target/product/lowram.mk)' >> lineage.mk; fi;
|
||||||
if [ -f BoardConfig.mk ]; then echo 'MALLOC_SVELTE := true' >> BoardConfig.mk; fi;
|
if [ -f BoardConfig.mk ]; then echo 'MALLOC_SVELTE := true' >> BoardConfig.mk; fi;
|
||||||
if [ -f BoardConfigCommon.mk ]; then echo 'MALLOC_SVELTE := true' >> BoardConfigCommon.mk; fi;
|
if [ -f BoardConfigCommon.mk ]; then echo 'MALLOC_SVELTE := true' >> BoardConfigCommon.mk; fi;
|
||||||
echo "Enabled lowram for $1";
|
echo "Enabled lowram for $1";
|
||||||
|
@ -62,12 +62,7 @@ cp -r "$DOS_PREBUILT_APPS""android_vendor_FDroid_PrebuiltApps/." "$DOS_BUILD_BAS
|
|||||||
|
|
||||||
enterAndClear "build/make";
|
enterAndClear "build/make";
|
||||||
patch -p1 < "$DOS_PATCHES/android_build/0001-Automated_Build_Signing.patch"; #Automated build signing (CopperheadOS-13.0)
|
patch -p1 < "$DOS_PATCHES/android_build/0001-Automated_Build_Signing.patch"; #Automated build signing (CopperheadOS-13.0)
|
||||||
if [ "$DOS_NON_COMMERCIAL_USE_PATCHES" = true ]; then patch -p1 < "$DOS_PATCHES/android_build/Copperhead/0002-Deny_USB.patch"; fi; #Deny USB support (Copperhead CC BY-NC-SA)
|
|
||||||
awk -i inplace '!/PRODUCT_EXTRA_RECOVERY_KEYS/' core/product.mk;
|
awk -i inplace '!/PRODUCT_EXTRA_RECOVERY_KEYS/' core/product.mk;
|
||||||
sed -i 's/messaging/Silence/' target/product/*.mk; #Replace AOSP Messaging app with Silence
|
|
||||||
sed -i 's/ro.secure=0/ro.secure=1/' core/main.mk;
|
|
||||||
#sed -i 's/ro.adb.secure=0/ro.adb.secure=1/' core/main.mk;
|
|
||||||
cp "$DOS_PATCHES_COMMON/android_build/lowram.mk" target/product/lowram.mk;
|
|
||||||
|
|
||||||
enterAndClear "device/lineage/sepolicy";
|
enterAndClear "device/lineage/sepolicy";
|
||||||
git revert c9b0d95630b82cd0ad1a0fc633c6d59c2cb8aad7 37422f7df389f3ae5a34ee3d6dd9354217f9c536; #neverallow violation
|
git revert c9b0d95630b82cd0ad1a0fc633c6d59c2cb8aad7 37422f7df389f3ae5a34ee3d6dd9354217f9c536; #neverallow violation
|
||||||
@ -82,15 +77,11 @@ enterAndClear "frameworks/base";
|
|||||||
git revert 759d6831f0207f8b59445b33fd57d770c16d3750;
|
git revert 759d6831f0207f8b59445b33fd57d770c16d3750;
|
||||||
#git revert https://review.lineageos.org/#/c/202875/ #re-enable doze on devices without gms
|
#git revert https://review.lineageos.org/#/c/202875/ #re-enable doze on devices without gms
|
||||||
sed -i 's/DEFAULT_MAX_FILES = 1000;/DEFAULT_MAX_FILES = 0;/' services/core/java/com/android/server/DropBoxManagerService.java; #Disable DropBox
|
sed -i 's/DEFAULT_MAX_FILES = 1000;/DEFAULT_MAX_FILES = 0;/' services/core/java/com/android/server/DropBoxManagerService.java; #Disable DropBox
|
||||||
sed -i 's/com.android.messaging/org.smssecure.smssecure/' core/res/res/values/config.xml; #Change default SMS app to Silence
|
|
||||||
sed -i 's|config_permissionReviewRequired">false|config_permissionReviewRequired">true|' core/res/res/values/config.xml;
|
|
||||||
if [ "$DOS_MICROG_INCLUDED" = "FULL" ]; then patch -p1 < "$DOS_PATCHES/android_frameworks_base/0002-Signature_Spoofing.patch"; fi; #Allow packages to spoof their signature (microG)
|
if [ "$DOS_MICROG_INCLUDED" = "FULL" ]; then patch -p1 < "$DOS_PATCHES/android_frameworks_base/0002-Signature_Spoofing.patch"; fi; #Allow packages to spoof their signature (microG)
|
||||||
if [ "$DOS_MICROG_INCLUDED" = "FULL" ]; then patch -p1 < "$DOS_PATCHES/android_frameworks_base/0003-Harden_Sig_Spoofing.patch"; fi; #Restrict signature spoofing to system apps signed with the platform key
|
if [ "$DOS_MICROG_INCLUDED" = "FULL" ]; then patch -p1 < "$DOS_PATCHES/android_frameworks_base/0003-Harden_Sig_Spoofing.patch"; fi; #Restrict signature spoofing to system apps signed with the platform key
|
||||||
if [ "$DOS_MICROG_INCLUDED" = "NLP" ]; then sed -i '/<item>com.android.location.fused<\/item>/a \ \ \ \ \ \ \ \ <item>org.microg.nlp</item>' core/res/res/values/config.xml; fi; #Add UnifiedNLP to location providers
|
|
||||||
changeDefaultDNS;
|
changeDefaultDNS;
|
||||||
#patch -p1 < "$DOS_PATCHES/android_frameworks_base/0005-Connectivity.patch"; #Change connectivity check URLs to ours
|
#patch -p1 < "$DOS_PATCHES/android_frameworks_base/0005-Connectivity.patch"; #Change connectivity check URLs to ours
|
||||||
patch -p1 < "$DOS_PATCHES/android_frameworks_base/0006-Disable_Analytics.patch"; #Disable/reduce functionality of various ad/analytics libraries
|
patch -p1 < "$DOS_PATCHES/android_frameworks_base/0006-Disable_Analytics.patch"; #Disable/reduce functionality of various ad/analytics libraries
|
||||||
if [ "$DOS_NON_COMMERCIAL_USE_PATCHES" = true ]; then patch -p1 < "$DOS_PATCHES/android_frameworks_base/Copperhead/0005-Deny_USB.patch"; fi; #Deny USB support (Copperhead CC BY-NC-SA)
|
|
||||||
rm -rf packages/PrintRecommendationService; #App that just creates popups to install proprietary print apps
|
rm -rf packages/PrintRecommendationService; #App that just creates popups to install proprietary print apps
|
||||||
rm core/res/res/values/config.xml.orig core/res/res/values/strings.xml.orig;
|
rm core/res/res/values/config.xml.orig core/res/res/values/strings.xml.orig;
|
||||||
|
|
||||||
@ -110,17 +101,8 @@ awk -i inplace '!/com.android.internal.R.bool.config_permissionReviewRequired/'
|
|||||||
enterAndClear "lineage-sdk";
|
enterAndClear "lineage-sdk";
|
||||||
awk -i inplace '!/WeatherManagerServiceBroker/' lineage/res/res/values/config.xml; #Disable Weather
|
awk -i inplace '!/WeatherManagerServiceBroker/' lineage/res/res/values/config.xml; #Disable Weather
|
||||||
if [ "$DOS_DEBLOBBER_REMOVE_AUDIOFX" = true ]; then awk -i inplace '!/LineageAudioService/' lineage/res/res/values/config.xml; fi;
|
if [ "$DOS_DEBLOBBER_REMOVE_AUDIOFX" = true ]; then awk -i inplace '!/LineageAudioService/' lineage/res/res/values/config.xml; fi;
|
||||||
cp "$DOS_PATCHES_COMMON/android_lineage-sdk/profile_default.xml" lineage/res/res/xml/profile_default.xml; #Replace default profiles with *way* better ones
|
|
||||||
|
|
||||||
if [ "$DOS_MICROG_INCLUDED" = "FULL" ]; then
|
|
||||||
enterAndClear "packages/apps/FakeStore";
|
|
||||||
sed -i 's|$(OUT_DIR)/target/|$(PWD)/$(OUT_DIR)/target/|' Android.mk;
|
|
||||||
sed -i 's/ln -s /ln -sf /' Android.mk;
|
|
||||||
sed -i 's/ext.androidBuildVersionTools = "24.0.3"/ext.androidBuildVersionTools = "25.0.3"/' build.gradle;
|
|
||||||
fi;
|
|
||||||
|
|
||||||
enterAndClear "packages/apps/FDroid";
|
enterAndClear "packages/apps/FDroid";
|
||||||
cp "$DOS_PATCHES_COMMON/android_packages_apps_FDroid/default_repos.xml" app/src/main/res/values/default_repos.xml; #Add extra repos
|
|
||||||
sed -i 's|outputs/apk/|outputs/apk/full/release/|' Android.mk;
|
sed -i 's|outputs/apk/|outputs/apk/full/release/|' Android.mk;
|
||||||
sed -i 's|-release-unsigned|-full-release-unsigned|' Android.mk;
|
sed -i 's|-release-unsigned|-full-release-unsigned|' Android.mk;
|
||||||
sed -i 's|gradle|./gradlew|' Android.mk; #Gradle 4.0 fix
|
sed -i 's|gradle|./gradlew|' Android.mk; #Gradle 4.0 fix
|
||||||
@ -133,25 +115,14 @@ sed -i 's/\"org\.fdroid\.fdroid/\"org.fdroid.fdroid_dos/' app/src/main/java/org/
|
|||||||
#release-key: CB:1E:E2:EC:40:D0:5E:D6:78:F4:2A:E7:01:CD:FA:29:EE:A7:9D:0E:6D:63:32:76:DE:23:0B:F3:49:40:67:C3
|
#release-key: CB:1E:E2:EC:40:D0:5E:D6:78:F4:2A:E7:01:CD:FA:29:EE:A7:9D:0E:6D:63:32:76:DE:23:0B:F3:49:40:67:C3
|
||||||
#test-key: C8:A2:E9:BC:CF:59:7C:2F:B6:DC:66:BE:E2:93:FC:13:F2:FC:47:EC:77:BC:6B:2B:0D:52:C1:1F:51:19:2A:B8
|
#test-key: C8:A2:E9:BC:CF:59:7C:2F:B6:DC:66:BE:E2:93:FC:13:F2:FC:47:EC:77:BC:6B:2B:0D:52:C1:1F:51:19:2A:B8
|
||||||
|
|
||||||
if [ "$DOS_MICROG_INCLUDED" = "FULL" ]; then
|
|
||||||
enterAndClear "packages/apps/GmsCore";
|
|
||||||
git submodule update --init --recursive;
|
|
||||||
fi;
|
|
||||||
|
|
||||||
if [ "$DOS_MICROG_INCLUDED" = "FULL" ]; then
|
|
||||||
enterAndClear "packages/apps/GsfProxy";
|
|
||||||
sed -i 's/ext.androidBuildVersionTools = "24.0.3"/ext.androidBuildVersionTools = "25.0.3"/' build.gradle;
|
|
||||||
fi;
|
|
||||||
|
|
||||||
enterAndClear "packages/apps/LineageParts";
|
enterAndClear "packages/apps/LineageParts";
|
||||||
rm -rf src/org/lineageos/lineageparts/lineagestats/ res/xml/anonymous_stats.xml res/xml/preview_data.xml #Nuke part of the analytics
|
rm -rf src/org/lineageos/lineageparts/lineagestats/ res/xml/anonymous_stats.xml res/xml/preview_data.xml #Nuke part of the analytics
|
||||||
sed -i 's|config_showWeatherMenu">true|config_showWeatherMenu">false|' res/values/config.xml; #Disable Weather
|
sed -i 's|config_showWeatherMenu">true|config_showWeatherMenu">false|' res/values/config.xml; #Disable Weather #TODO OVERLAY
|
||||||
patch -p1 < "$DOS_PATCHES/android_packages_apps_LineageParts/0001-Remove_Analytics.patch"; #Remove analytics
|
patch -p1 < "$DOS_PATCHES/android_packages_apps_LineageParts/0001-Remove_Analytics.patch"; #Remove analytics
|
||||||
rm AndroidManifest.xml.orig res/values/*.xml.orig;
|
rm AndroidManifest.xml.orig res/values/*.xml.orig;
|
||||||
|
|
||||||
enterAndClear "packages/apps/Settings";
|
enterAndClear "packages/apps/Settings";
|
||||||
git revert a96df110e84123fe1273bff54feca3b4ca484dcd; #don't hide oem unlock
|
git revert a96df110e84123fe1273bff54feca3b4ca484dcd; #don't hide oem unlock
|
||||||
if [ "$DOS_NON_COMMERCIAL_USE_PATCHES" = true ]; then patch -p1 < "$DOS_PATCHES/android_packages_apps_Settings/Copperhead/0003-Deny_USB.patch"; fi; #Deny USB support (Copperhead CC BY-NC-SA)
|
|
||||||
patch -p1 < "$DOS_PATCHES/android_packages_apps_Settings/0004-PDB_Fixes.patch"; #Fix crashes when the PersistentDataBlockManager service isn't available
|
patch -p1 < "$DOS_PATCHES/android_packages_apps_Settings/0004-PDB_Fixes.patch"; #Fix crashes when the PersistentDataBlockManager service isn't available
|
||||||
sed -i 's/private int mPasswordMaxLength = 16;/private int mPasswordMaxLength = 48;/' src/com/android/settings/password/ChooseLockPassword.java; #Increase max password length
|
sed -i 's/private int mPasswordMaxLength = 16;/private int mPasswordMaxLength = 48;/' src/com/android/settings/password/ChooseLockPassword.java; #Increase max password length
|
||||||
if [ "$DOS_MICROG_INCLUDED" = "FULL" ]; then sed -i 's/GSETTINGS_PROVIDER = "com.google.settings";/GSETTINGS_PROVIDER = "com.google.oQuae4av";/' src/com/android/settings/PrivacySettings.java; fi; #microG doesn't support Backup, hide the options
|
if [ "$DOS_MICROG_INCLUDED" = "FULL" ]; then sed -i 's/GSETTINGS_PROVIDER = "com.google.settings";/GSETTINGS_PROVIDER = "com.google.oQuae4av";/' src/com/android/settings/PrivacySettings.java; fi; #microG doesn't support Backup, hide the options
|
||||||
@ -160,9 +131,6 @@ rm res/values/strings.xml.orig;
|
|||||||
enterAndClear "packages/apps/SetupWizard";
|
enterAndClear "packages/apps/SetupWizard";
|
||||||
patch -p1 < "$DOS_PATCHES/android_packages_apps_SetupWizard/0001-Remove_Analytics.patch"; #Remove analytics
|
patch -p1 < "$DOS_PATCHES/android_packages_apps_SetupWizard/0001-Remove_Analytics.patch"; #Remove analytics
|
||||||
|
|
||||||
enterAndClear "packages/apps/Trebuchet";
|
|
||||||
cp -r "$DOS_PATCHES_COMMON/android_packages_apps_Trebuchet/default_workspace/." "res/xml/";
|
|
||||||
|
|
||||||
enterAndClear "packages/apps/Updater";
|
enterAndClear "packages/apps/Updater";
|
||||||
patch -p1 < "$DOS_PATCHES_COMMON/android_packages_apps_Updater/0001-Server.patch"; #Switch to our server
|
patch -p1 < "$DOS_PATCHES_COMMON/android_packages_apps_Updater/0001-Server.patch"; #Switch to our server
|
||||||
#TODO: Remove changelog
|
#TODO: Remove changelog
|
||||||
@ -176,19 +144,13 @@ sed -i 's/WallpaperUtils.EXTRA_WALLPAPER_OFFSET, 0);/WallpaperUtils.EXTRA_WALLPA
|
|||||||
enterAndClear "packages/inputmethods/LatinIME";
|
enterAndClear "packages/inputmethods/LatinIME";
|
||||||
patch -p1 < "$DOS_PATCHES_COMMON/android_packages_inputmethods_LatinIME/0001-Voice.patch"; #Remove voice input key
|
patch -p1 < "$DOS_PATCHES_COMMON/android_packages_inputmethods_LatinIME/0001-Voice.patch"; #Remove voice input key
|
||||||
|
|
||||||
enterAndClear "packages/services/Telephony";
|
|
||||||
if [ "$DOS_NON_COMMERCIAL_USE_PATCHES" = true ]; then patch -p1 < "$DOS_PATCHES/android_packages_services_Telephony/Copperhead/0001-LTE_Only.patch"; fi; #LTE only preferred network mode choice (Copperhead CC BY-NC-SA)
|
|
||||||
|
|
||||||
enterAndClear "system/core";
|
enterAndClear "system/core";
|
||||||
if [ "$DOS_HOSTS_BLOCKING" = true ]; then cat "$DOS_HOSTS_FILE" >> rootdir/etc/hosts; fi; #Merge in our HOSTS file
|
if [ "$DOS_HOSTS_BLOCKING" = true ]; then cat "$DOS_HOSTS_FILE" >> rootdir/etc/hosts; fi; #Merge in our HOSTS file
|
||||||
git revert a6a4ce8e9a6d63014047a447c6bb3ac1fa90b3f4; #Always update recovery
|
git revert a6a4ce8e9a6d63014047a447c6bb3ac1fa90b3f4; #Always update recovery
|
||||||
patch -p1 < "$DOS_PATCHES/android_system_core/0001-Harden_Mounts.patch"; #Harden mounts with nodev/noexec/nosuid (CopperheadOS-13.0)
|
patch -p1 < "$DOS_PATCHES/android_system_core/0001-Harden_Mounts.patch"; #Harden mounts with nodev/noexec/nosuid (CopperheadOS-13.0)
|
||||||
if [ "$DOS_NON_COMMERCIAL_USE_PATCHES" = true ]; then patch -p1 < "$DOS_PATCHES/android_system_core/Copperhead/0002-Deny_USB.patch"; fi; #Deny USB support (Copperhead CC BY-NC-SA)
|
|
||||||
#if [ "$DOS_NON_COMMERCIAL_USE_PATCHES" = true ]; then patch -p1 < "$DOS_PATCHES/android_system_core/0003-Deny_USB-Aggressive.patch"; fi; #Deny USB on boot, may break things
|
|
||||||
|
|
||||||
enterAndClear "system/sepolicy";
|
enterAndClear "system/sepolicy";
|
||||||
patch -p1 < "$DOS_PATCHES/android_system_sepolicy/0001-LGE_Fixes.patch"; #Fix -user builds for LGE devices
|
patch -p1 < "$DOS_PATCHES/android_system_sepolicy/0001-LGE_Fixes.patch"; #Fix -user builds for LGE devices
|
||||||
if [ "$DOS_NON_COMMERCIAL_USE_PATCHES" = true ]; then patch -p1 < "$DOS_PATCHES/android_system_sepolicy/Copperhead/0002-Deny_USB.patch"; fi; #Deny USB support (Copperhead CC BY-NC-SA)
|
|
||||||
|
|
||||||
enterAndClear "system/vold";
|
enterAndClear "system/vold";
|
||||||
patch -p1 < "$DOS_PATCHES/android_system_vold/0001-AES256.patch"; #Add a variable for enabling AES-256 bit encryption
|
patch -p1 < "$DOS_PATCHES/android_system_vold/0001-AES256.patch"; #Add a variable for enabling AES-256 bit encryption
|
||||||
@ -198,20 +160,14 @@ rm -rf overlay/common/vendor/lineage-sdk/packages; #Remove analytics
|
|||||||
if [ "$DOS_HOSTS_BLOCKING" = true ]; then awk -i inplace '!/50-lineage.sh/' config/common.mk; fi; #Make sure our hosts is always used
|
if [ "$DOS_HOSTS_BLOCKING" = true ]; then awk -i inplace '!/50-lineage.sh/' config/common.mk; fi; #Make sure our hosts is always used
|
||||||
awk -i inplace '!/PRODUCT_EXTRA_RECOVERY_KEYS/' config/common.mk; #Remove extra keys
|
awk -i inplace '!/PRODUCT_EXTRA_RECOVERY_KEYS/' config/common.mk; #Remove extra keys
|
||||||
awk -i inplace '!/security\/lineage/' config/common.mk; #Remove extra keys
|
awk -i inplace '!/security\/lineage/' config/common.mk; #Remove extra keys
|
||||||
sed -i '3iinclude vendor/lineage/config/sce.mk' config/common.mk; #Include extra apps
|
|
||||||
if [ "$DOS_DEBLOBBER_REMOVE_AUDIOFX" = true ]; then awk -i inplace '!/AudioFX/' config/common.mk; fi;
|
if [ "$DOS_DEBLOBBER_REMOVE_AUDIOFX" = true ]; then awk -i inplace '!/AudioFX/' config/common.mk; fi;
|
||||||
cp "$DOS_PATCHES_COMMON/android_vendor_divested/sce.mk" config/sce.mk;
|
|
||||||
if [ "$DOS_MICROG_INCLUDED" = "FULL" ]; then echo "PRODUCT_PACKAGES += GmsCore GsfProxy FakeStore" >> config/sce.mk; fi;
|
|
||||||
if [ "$DOS_MICROG_INCLUDED" = "NLP" ]; then echo "PRODUCT_PACKAGES += UnifiedNLP" >> config/sce.mk; fi;
|
|
||||||
if [ "$DOS_MICROG_INCLUDED" = "NLP" ]; then sed -i '/Google provider/!b;n;s/com.google.android.gms/org.microg.nlp/' overlay/common/frameworks/base/core/res/res/values/config.xml; fi;
|
|
||||||
if [ "$DOS_MICROG_INCLUDED" != "NONE" ]; then cp "$DOS_PATCHES_COMMON/android_vendor_divested/sce-UnifiedNLP-Backends.mk" config/sce-UnifiedNLP-Backends.mk; fi;
|
|
||||||
if [ "$DOS_MICROG_INCLUDED" != "NONE" ]; then echo "include vendor/lineage/config/sce-UnifiedNLP-Backends.mk" >> config/sce.mk; fi;
|
|
||||||
cp -r "$DOS_PATCHES_COMMON/android_vendor_divested/firmware_deblobber" .;
|
|
||||||
cp "$DOS_PATCHES/android_vendor_lineage/firmware_deblobber.mk" build/tasks/firmware_deblobber.mk;
|
|
||||||
sed -i 's/LINEAGE_BUILDTYPE := UNOFFICIAL/LINEAGE_BUILDTYPE := dos/' config/common.mk; #Change buildtype
|
sed -i 's/LINEAGE_BUILDTYPE := UNOFFICIAL/LINEAGE_BUILDTYPE := dos/' config/common.mk; #Change buildtype
|
||||||
if [ "$DOS_NON_COMMERCIAL_USE_PATCHES" = true ]; then sed -i 's/LINEAGE_BUILDTYPE := dos/LINEAGE_BUILDTYPE := dosNC/' config/common.mk; fi;
|
if [ "$DOS_NON_COMMERCIAL_USE_PATCHES" = true ]; then sed -i 's/LINEAGE_BUILDTYPE := dos/LINEAGE_BUILDTYPE := dosNC/' config/common.mk; fi;
|
||||||
sed -i 's/messaging/Silence/' config/telephony.mk; #Replace AOSP Messaging app with Silence
|
sed -i '3iinclude vendor/divested/divested.mk' config/common.mk; #Include our customizations
|
||||||
#if [ "$DOS_HOSTS_BLOCKING" = false ]; then echo "PRODUCT_PACKAGES += DNS66" >> config/sce.mk; fi; #Include DNS66 as an alternative
|
|
||||||
|
enterAndClear "vendor/divested";
|
||||||
|
if [ "$DOS_MICROG_INCLUDED" = "FULL" ]; then echo "PRODUCT_PACKAGES += microG" >> packages.mk;
|
||||||
|
if [ "$DOS_HOSTS_BLOCKING" = false ]; then echo "PRODUCT_PACKAGES += DNS66" >> packages.mk;
|
||||||
#
|
#
|
||||||
#END OF ROM CHANGES
|
#END OF ROM CHANGES
|
||||||
#
|
#
|
||||||
|
@ -33,7 +33,7 @@ export DOS_DEFAULT_DNS_PRESET="OpenNIC"; #Sets default DNS. Options: Cloudflare,
|
|||||||
export DOS_GLONASS_FORCED_ENABLE=true; #Enables GLONASS on all devices
|
export DOS_GLONASS_FORCED_ENABLE=true; #Enables GLONASS on all devices
|
||||||
export DOS_MALWARE_SCAN_ENABLED=true; #Set true to perform a fast scan on patchWorkspace() and a through scan on buildAll()
|
export DOS_MALWARE_SCAN_ENABLED=true; #Set true to perform a fast scan on patchWorkspace() and a through scan on buildAll()
|
||||||
export DOS_MALWARE_SCAN_SETTING="quick"; #buildAll() scan speed. Options: quick, extra, slow, full
|
export DOS_MALWARE_SCAN_SETTING="quick"; #buildAll() scan speed. Options: quick, extra, slow, full
|
||||||
export DOS_MICROG_INCLUDED="NLP"; #Determines inclusion of microG. Options: NONE, NLP, FULL
|
export DOS_MICROG_INCLUDED="NLP"; #Determines inclusion of microG. Options: NLP, FULL
|
||||||
export DOS_HOSTS_BLOCKING=true; #Switch to false to prevent inclusion of our HOSTS file
|
export DOS_HOSTS_BLOCKING=true; #Switch to false to prevent inclusion of our HOSTS file
|
||||||
export DOS_HOSTS_BLOCKING_LIST="https://divestos.xyz/hosts"; #Must be in the format "127.0.0.1 bad.domain.tld"
|
export DOS_HOSTS_BLOCKING_LIST="https://divestos.xyz/hosts"; #Must be in the format "127.0.0.1 bad.domain.tld"
|
||||||
export DOS_OVERCLOCKS_ENABLED=true; #Switch to false to disable overclocks
|
export DOS_OVERCLOCKS_ENABLED=true; #Switch to false to disable overclocks
|
||||||
|
Loading…
Reference in New Issue
Block a user