mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2025-03-12 17:06:33 -04:00
Compare commits
5 Commits
1511176a07
...
20c4e75fe1
Author | SHA1 | Date | |
---|---|---|---|
![]() |
20c4e75fe1 | ||
![]() |
4155cec7e3 | ||
![]() |
baa0252c6b | ||
![]() |
4f6e21d7f9 | ||
![]() |
af3fe9776b |
@ -57,6 +57,10 @@
|
||||
<project path="hardware/sony/SonyOpenTelephony" name="LineageOS/android_hardware_sony_SonyOpenTelephony" remote="github" revision="lineage-20" />
|
||||
<project path="packages/apps/ElmyraService" name="LineageOS/android_packages_apps_ElmyraService" remote="github" />
|
||||
|
||||
<!-- Essential PH-1 (mata) -->
|
||||
<project path="device/essential/mata" name="LineageOS/android_device_essential_mata" remote="github" revision="lineage-20" />
|
||||
<project path="kernel/essential/msm8998" name="LineageOS/android_kernel_essential_msm8998" remote="github" revision="lineage-20" />
|
||||
|
||||
<!-- F(x)tec Pro¹ (pro1) -->
|
||||
<project path="device/fxtec/pro1" name="LineageOS/android_device_fxtec_pro1" remote="github" revision="lineage-20" />
|
||||
<project path="kernel/fxtec/msm8998" name="LineageOS/android_kernel_fxtec_msm8998" remote="github" revision="lineage-20" />
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 04a67b12b3b6df5335840c0e1f1ac4312ce9eb6f
|
||||
Subproject commit cb422d197e5c972b945d44fe167f08cd0edc39b5
|
104
Scripts/Common/Defaults.sh
Normal file
104
Scripts/Common/Defaults.sh
Normal file
@ -0,0 +1,104 @@
|
||||
#!/bin/bash
|
||||
#DivestOS: A privacy focused mobile distribution
|
||||
#Copyright (c) 2017-2023 Divested Computing Group
|
||||
#
|
||||
#This program is free software: you can redistribute it and/or modify
|
||||
#it under the terms of the GNU General Public License as published by
|
||||
#the Free Software Foundation, either version 3 of the License, or
|
||||
#(at your option) any later version.
|
||||
#
|
||||
#This program is distributed in the hope that it will be useful,
|
||||
#but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
#GNU General Public License for more details.
|
||||
#
|
||||
#You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
umask 0022;
|
||||
set -euo pipefail;
|
||||
source "$DOS_SCRIPTS_COMMON/Shell.sh";
|
||||
|
||||
#Changes various default settings
|
||||
#Last verified: 2022-10-15
|
||||
|
||||
#Useful commands
|
||||
#nano $(find . -name "config.xml" | grep "values/" | grep -v "device" | grep -v "tests")
|
||||
#nano $(find . -name "defaults.xml" | grep "values/" | grep -v "device")
|
||||
|
||||
echo "Changing default settings...";
|
||||
|
||||
if enter "frameworks/base"; then
|
||||
sed -i 's/KEY_SHOW_APN_SETTING_CDMA_BOOL, false);/KEY_SHOW_APN_SETTING_CDMA_BOOL, true);/' telephony/java/android/telephony/CarrierConfigManager.java &>/dev/null || true; #Always show APN settings on CDMA carriers (GrapheneOS)
|
||||
sed -i 's/KEY_READ_ONLY_APN_TYPES_STRING_ARRAY, new String\[\] {"dun"})/KEY_READ_ONLY_APN_TYPES_STRING_ARRAY, new String\[\] {""});/' telephony/java/android/telephony/CarrierConfigManager.java &>/dev/null || true; #Do not mark dun APN types as read only (GrapheneOS)
|
||||
sed -i 's/KEY_SHOW_ICCID_IN_SIM_STATUS_BOOL, false);/KEY_SHOW_ICCID_IN_SIM_STATUS_BOOL, true);/' telephony/java/android/telephony/CarrierConfigManager.java &>/dev/null || true; #Always show ICCID (GrapheneOS)
|
||||
#14.1
|
||||
#sed -i 's/CMPRIVACY_GUARD_NOTIFICATION, 1/CMPRIVACY_GUARD_NOTIFICATION, 0/' services/core/java/com/android/server/am/ActivityStack.java &>/dev/null || true;
|
||||
#sed -i 's/VOLBTN_MUSIC_CONTROLS, 1/VOLBTN_MUSIC_CONTROLS, 0/' services/core/java/com/android/server/policy/PhoneWindowManager.java &>/dev/null || true; #FIXME
|
||||
#sed -i 's/VOLUME_KEYS_CONTROL_RING_STREAM, 1/VOLUME_KEYS_CONTROL_RING_STREAM, 0/' services/core/java/com/android/server/audio/AudioService.java &>/dev/null || true; #FIXME
|
||||
#sed -i 's/TORCH_LONG_PRESS_POWER_GESTURE, 0/TORCH_LONG_PRESS_POWER_GESTURE, 1/' services/core/java/com/android/server/policy/PhoneWindowManager.java &>/dev/null || true; #FIXME
|
||||
#sed -i 's/TORCH_LONG_PRESS_POWER_TIMEOUT, 0/TORCH_LONG_PRESS_POWER_TIMEOUT, 120/' services/core/java/com/android/server/policy/PhoneWindowManager.java &>/dev/null || true; #FIXME
|
||||
#sed -i 's/CAMERA_DOUBLE_TAP_POWER_GESTURE_DISABLED, 0/CAMERA_DOUBLE_TAP_POWER_GESTURE_DISABLED, 1/' services/core/java/com/android/server/GestureLauncherService.java &>/dev/null || true; #FIXME
|
||||
#sed -i 's/NAVIGATION_BAR_MENU_ARROW_KEYS, 0/NAVIGATION_BAR_MENU_ARROW_KEYS, 1/' packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java &>/dev/null || true; #FIXME
|
||||
fi;
|
||||
|
||||
if enter "packages/apps/Dialer"; then
|
||||
#14.1
|
||||
sed -i 's/ENABLE_FORWARD_LOOKUP, 1)/ENABLE_FORWARD_LOOKUP, 0)/' src/com/android/dialer//LookupSettings*.java &>/dev/null || true; #Disable FLP
|
||||
sed -i 's/ENABLE_PEOPLE_LOOKUP, 1)/ENABLE_PEOPLE_LOOKUP, 0)/' src/com/android/dialer/*/LookupSettings*.java &>/dev/null || true; #Disable PLP
|
||||
sed -i 's/ENABLE_REVERSE_LOOKUP, 1)/ENABLE_REVERSE_LOOKUP, 0)/' src/com/android/dialer/*/LookupSettings*.java &>/dev/null || true; #Disable RLP
|
||||
#15.1+16.0+17.1
|
||||
sed -i 's/ENABLE_FORWARD_LOOKUP, 1)/ENABLE_FORWARD_LOOKUP, 0)/' java/com/android/dialer/lookup/LookupSettings*.java &>/dev/null || true; #Disable FLP
|
||||
sed -i 's/ENABLE_PEOPLE_LOOKUP, 1)/ENABLE_PEOPLE_LOOKUP, 0)/' java/com/android/dialer/lookup/LookupSettings*.java &>/dev/null || true; #Disable PLP
|
||||
sed -i 's/ENABLE_REVERSE_LOOKUP, 1)/ENABLE_REVERSE_LOOKUP, 0)/' java/com/android/dialer/lookup/LookupSettings*.java &>/dev/null || true; #Disable RLP
|
||||
#18.1+
|
||||
sed -i 's/ENABLE_FORWARD_LOOKUP, true)/ENABLE_FORWARD_LOOKUP, false)/' java/com/android/dialer/lookup/LookupSettings*.java &>/dev/null || true; #Disable FLP
|
||||
sed -i 's/ENABLE_PEOPLE_LOOKUP, true)/ENABLE_PEOPLE_LOOKUP, false)/' java/com/android/dialer/lookup/LookupSettings*.java &>/dev/null || true; #Disable PLP
|
||||
sed -i 's/ENABLE_REVERSE_LOOKUP, true)/ENABLE_REVERSE_LOOKUP, false)/' java/com/android/dialer/lookup/LookupSettings*.java &>/dev/null || true; #Disable RLP
|
||||
fi;
|
||||
|
||||
if enter "packages/apps/Nfc"; then
|
||||
sed -i 's/boolean NFC_ON_DEFAULT = true;/boolean NFC_ON_DEFAULT = false;/' src/com/android/nfc/NfcService.java &>/dev/null || true; #Disable NFC
|
||||
sed -i 's/boolean NDEF_PUSH_ON_DEFAULT = true;/boolean NDEF_PUSH_ON_DEFAULT = false;/' src/com/android/nfc/NfcService.java &>/dev/null || true; #Disable NDEF Push
|
||||
fi;
|
||||
|
||||
if enter "packages/apps/Settings"; then
|
||||
#Disable "Instant Apps"
|
||||
sed -i 's/WEB_ACTION_ENABLED, 1/WEB_ACTION_ENABLED, 0/' src/com/android/settings/applications/ManageDomainUrls.java &>/dev/null || true; #14.1
|
||||
sed -i 's/INSTANT_APPS_ENABLED, 1/INSTANT_APPS_ENABLED, 0/' src/com/android/settings/applications/ManageDomainUrls.java &>/dev/null || true; #15.1+16.0
|
||||
sed -i 's/INSTANT_APPS_ENABLED, 1/INSTANT_APPS_ENABLED, 0/' src/com/android/settings/applications/managedomainurls/InstantAppWebActionPreferenceController.java &>/dev/null || true; #17.1+
|
||||
#Always reset animation scales to 0.5
|
||||
sed -i 's/Float.parseFloat(newValue.toString()) : 1;/Float.parseFloat(newValue.toString()) : 0.5f;/' src/com/android/settings/DevelopmentSettings.java &>/dev/null || true; #14.1
|
||||
sed -i 's/Float.parseFloat(newValue.toString()) : 1;/Float.parseFloat(newValue.toString()) : 0.5f;/' src/com/android/settings/development/DevelopmentSettings.java &>/dev/null || true; #15.1
|
||||
sed -i 's/DEFAULT_VALUE = 1;/DEFAULT_VALUE = 0.5f;/' src/com/android/settings/development/*ScalePreferenceController.java &>/dev/null || true; #16.0+
|
||||
fi;
|
||||
|
||||
if enter "packages/apps/SetupWizard"; then
|
||||
sed -i 's/UPDATE_RECOVERY_PROP, false)/UPDATE_RECOVERY_PROP, true)/' src/org/lineageos/setupwizard/UpdateRecoveryActivity.java &>/dev/null || true; #Always update recovery by default 18.1+
|
||||
fi;
|
||||
|
||||
if enter "packages/apps/Trebuchet"; then
|
||||
sed -i 's/"pref_predictive_apps", true/"pref_predictive_apps", false/' src/com/android/launcher3/Launcher.java &>/dev/null || true; #15.1
|
||||
fi;
|
||||
|
||||
if enter "packages/apps/Updater"; then
|
||||
sed -i 's/Constants.UPDATE_RECOVERY_PROPERTY, false)/Constants.UPDATE_RECOVERY_PROPERTY, true)/' src/org/lineageos/updater/UpdatesActivity.java &>/dev/null || true; #Always update recovery by default 18.1+
|
||||
fi;
|
||||
|
||||
if [[ "$DOS_VERSION" == "LineageOS-14.1" ]]; then
|
||||
|
||||
if enter "vendor/cm"; then #14.1
|
||||
sed -i 's/ro.config.notification_sound=Argon.ogg/ro.config.notification_sound=Pong.ogg/' config/common*.mk &>/dev/null || true;
|
||||
sed -i 's/ro.config.alarm_alert=Hassium.ogg/ro.config.alarm_alert=Alarm_Buzzer.ogg/' config/common*.mk &>/dev/null || true;
|
||||
fi;
|
||||
|
||||
else
|
||||
|
||||
if enter "vendor/lineage"; then #15.1+
|
||||
sed -i 's/ro.config.notification_sound=Argon.ogg/ro.config.notification_sound=Pong.ogg/' config/common*.mk &>/dev/null || true;
|
||||
sed -i 's/ro.config.alarm_alert=Hassium.ogg/ro.config.alarm_alert=Alarm_Buzzer.ogg/' config/common*.mk &>/dev/null || true;
|
||||
fi;
|
||||
|
||||
fi;
|
||||
|
||||
cd "$DOS_BUILD_BASE";
|
||||
echo -e "\e[0;32m[SCRIPT COMPLETE] Default settings changed\e[0m";
|
@ -120,7 +120,7 @@ done
|
||||
declare -a threeDotTen=("${threeDotFour[@]}" "android_kernel_htc_msm8994.sh" "android_kernel_lge_msm8992.sh" "android_kernel_motorola_msm8992.sh" "android_kernel_asus_fugu.sh" "android_kernel_asus_msm8916.sh" "android_kernel_htc_flounder.sh" "android_kernel_htc_msm8994.sh" "android_kernel_huawei_angler.sh" "android_kernel_lge_bullhead.sh" "android_kernel_moto_shamu.sh" "android_kernel_nextbit_msm8992.sh" "android_kernel_oneplus_msm8994.sh" "android_kernel_cyanogen_msm8916.sh" "android_kernel_google_yellowstone.sh" "android_kernel_samsung_apq8084.sh" "android_kernel_motorola_msm8916.sh");
|
||||
for script in "${threeDotTen[@]}"
|
||||
do
|
||||
commentPatches $script "CVE-2016-1583/3.18" "CVE-2018-17972/3.18" "CVE-2018-20169/3.18" "CVE-2019-2214/3.18" "CVE-2020-0427/3.18" "CVE-2021-21781/3.18";
|
||||
commentPatches $script "CVE-2016-1583/3.18" "CVE-2018-17972/3.18" "CVE-2018-20169/3.18" "CVE-2019-2214/3.18" "CVE-2020-0427/3.18" "CVE-2021-21781/3.18" "CVE-2022-40768/4.4";
|
||||
done
|
||||
#3.18
|
||||
declare -a threeDotEighteen=("${threeDotTen[@]}" "android_kernel_samsung_universal8890.sh" "android_kernel_google_dragon.sh" "android_kernel_lge_msm8996.sh" "android_kernel_zte_msm8996.sh" "android_kernel_asus_msm8953.sh" "android_kernel_xiaomi_msm8937.sh" "android_kernel_google_marlin.sh" "android_kernel_motorola_msm8996.sh" "android_kernel_oneplus_msm8996.sh");
|
||||
|
@ -769,13 +769,13 @@ changeDefaultDNS() {
|
||||
echo "You must first set a preset via the DOS_DEFAULT_DNS_PRESET variable in init.sh!";
|
||||
fi;
|
||||
|
||||
local files="$DOS_BUILD_BASE/bionic/libc/dns/net/getaddrinfo.c $DOS_BUILD_BASE/packages/apps/Dialer/java/com/android/voicemail/impl/sync/VvmNetworkRequestCallback.java $DOS_BUILD_BASE/packages/modules/Connectivity/framework/src/android/net/util/DnsUtils.java $DOS_BUILD_BASE/packages/modules/Connectivity/service/src/com/android/server/connectivity/NetworkDiagnostics.java $DOS_BUILD_BASE/packages/modules/Connectivity/Tethering/src/com/android/networkstack/tethering/TetheringConfiguration.java $DOS_BUILD_BASE/packages/modules/DnsResolver/DnsResolver/doh.rs $DOS_BUILD_BASE/packages/modules/DnsResolver/DnsResolver/getaddrinfo.cpp $DOS_BUILD_BASE/packages/modules/DnsResolver/getaddrinfo.cpp core/java/android/net/util/DnsUtils.java core/java/com/android/internal/net/VpnProfile.java core/res/res/values/config.xml packages/SettingsLib/res/values/strings.xml packages/Tethering/src/com/android/networkstack/tethering/TetheringConfiguration.java services/core/java/com/android/server/connectivity/NetworkDiagnostics.java services/core/java/com/android/server/connectivity/Tethering.java services/core/java/com/android/server/connectivity/tethering/TetheringConfiguration.java services/java/com/android/server/connectivity/Tethering.java tests/BandwidthTests/src/com/android/tests/bandwidthenforcement/BandwidthEnforcementTestService.java";
|
||||
sed -i "s/8\.8\.8\.8/$dnsPrimary/" $files &>/dev/null || true;
|
||||
sed -i "s/2001:4860:4860::8888/$dnsPrimaryV6/" $files &>/dev/null || true;
|
||||
sed -i "s/8\.8\.4\.4/$dnsSecondary/" $files &>/dev/null || true;
|
||||
sed -i "s/4\.4\.4\.4/$dnsSecondary/" $files &>/dev/null || true;
|
||||
sed -i "s/2001:4860:4860::8844/$dnsSecondaryV6/" $files &>/dev/null || true;
|
||||
sed -i "s/0x08080808L/$dnsHex/" $files &>/dev/null || true;
|
||||
local files="bionic/libc/dns/net/getaddrinfo.c frameworks/base/core/java/android/net/util/DnsUtils.java frameworks/base/core/java/com/android/internal/net/VpnProfile.java frameworks/base/core/res/res/values/config.xml frameworks/base/packages/SettingsLib/res/values/strings.xml frameworks/base/packages/Tethering/src/com/android/networkstack/tethering/TetheringConfiguration.java frameworks/base/services/core/java/com/android/server/connectivity/NetworkDiagnostics.java frameworks/base/services/core/java/com/android/server/connectivity/Tethering.java frameworks/base/services/core/java/com/android/server/connectivity/tethering/TetheringConfiguration.java frameworks/base/services/java/com/android/server/connectivity/Tethering.java packages/apps/Dialer/java/com/android/voicemail/impl/sync/VvmNetworkRequestCallback.java packages/modules/Connectivity/framework/src/android/net/util/DnsUtils.java packages/modules/Connectivity/service/native/libs/libclat/clatutils_test.cpp packages/modules/Connectivity/service/ServiceConnectivityResources/res/values/config.xml packages/modules/Connectivity/service/src/com/android/server/connectivity/ClatCoordinator.java packages/modules/Connectivity/service/src/com/android/server/connectivity/NetworkDiagnostics.java packages/modules/Connectivity/Tethering/src/com/android/networkstack/tethering/TetheringConfiguration.java packages/modules/DnsResolver/DnsResolver/doh.rs packages/modules/DnsResolver/DnsResolver/getaddrinfo.cpp packages/modules/DnsResolver/getaddrinfo.cpp packages/modules/DnsResolver/PrivateDnsConfiguration.h";
|
||||
sed -i "s/8\.8\.8\.8/$dnsPrimary/g" $files &>/dev/null || true;
|
||||
sed -i "s/2001:4860:4860::8888/$dnsPrimaryV6/g" $files &>/dev/null || true;
|
||||
sed -i "s/8\.8\.4\.4/$dnsSecondary/g" $files &>/dev/null || true;
|
||||
sed -i "s/4\.4\.4\.4/$dnsSecondary/g" $files &>/dev/null || true;
|
||||
sed -i "s/2001:4860:4860::8844/$dnsSecondaryV6/g" $files &>/dev/null || true;
|
||||
sed -i "s/0x08080808L/$dnsHex/g" $files &>/dev/null || true;
|
||||
}
|
||||
export -f changeDefaultDNS;
|
||||
|
||||
|
@ -775,7 +775,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-25258/3.4/0009.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-25375/3.4/0009.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-28390/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36280/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41850/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41858/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-Misc2/3.4/0001.patch
|
||||
|
@ -437,7 +437,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-25258/3.4/0009.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-25375/3.4/0009.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-28390/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36280/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41850/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41858/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-Misc2/3.4/0002.patch
|
||||
|
@ -473,7 +473,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-25258/3.4/0009.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-25375/3.4/0009.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-28390/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36280/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41850/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41858/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-Misc2/3.4/0002.patch
|
||||
|
@ -537,7 +537,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-33744/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36123/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36280/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-39188/4.4/0010.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41850/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41858/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-42895/4.4/0008.patch
|
||||
|
@ -625,7 +625,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-33744/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36123/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36280/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-39188/4.4/0010.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41850/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41858/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-43750/4.4/0008.patch
|
||||
|
@ -668,7 +668,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-33744/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36123/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36280/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-39188/4.4/0010.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41850/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41858/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-42895/4.4/0008.patch
|
||||
|
@ -548,7 +548,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-25258/3.4/0009.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-25375/3.4/0009.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-28390/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36280/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41850/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41858/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-Misc2/3.4/0002.patch
|
||||
|
@ -230,7 +230,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-24958/3.4/0017.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-25258/3.4/0009.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-28390/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36280/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41850/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41858/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-Misc2/3.4/0002.patch
|
||||
|
@ -351,7 +351,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-25258/3.4/0009.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-25375/3.4/0009.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-28390/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36280/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41850/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41858/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-Misc2/3.4/0002.patch
|
||||
|
@ -406,7 +406,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-25258/3.4/0009.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-25375/3.4/0009.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-28390/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36280/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41850/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-Misc2/3.4/0002.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-Misc2/3.4/0008.patch
|
||||
|
@ -399,7 +399,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-24958/3.4/0017.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-25258/3.4/0009.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-25375/3.4/0009.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-28390/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41850/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-Misc2/3.4/0002.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-Misc2/3.4/0008.patch
|
||||
|
@ -1,62 +0,0 @@
|
||||
#!/bin/bash
|
||||
#DivestOS: A privacy focused mobile distribution
|
||||
#Copyright (c) 2017-2021 Divested Computing Group
|
||||
#
|
||||
#This program is free software: you can redistribute it and/or modify
|
||||
#it under the terms of the GNU General Public License as published by
|
||||
#the Free Software Foundation, either version 3 of the License, or
|
||||
#(at your option) any later version.
|
||||
#
|
||||
#This program is distributed in the hope that it will be useful,
|
||||
#but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
#GNU General Public License for more details.
|
||||
#
|
||||
#You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
umask 0022;
|
||||
set -euo pipefail;
|
||||
source "$DOS_SCRIPTS_COMMON/Shell.sh";
|
||||
|
||||
#Changes various default settings
|
||||
#Last verified: 2021-10-16
|
||||
|
||||
#Useful commands
|
||||
#nano $(find . -name "config.xml" | grep "values/" | grep -v "device" | grep -v "tests")
|
||||
#nano $(find . -name "defaults.xml" | grep "values/" | grep -v "device")
|
||||
|
||||
echo "Changing default settings...";
|
||||
|
||||
#if enter "frameworks/base"; then
|
||||
#sed -i 's/CMPRIVACY_GUARD_NOTIFICATION, 1/CMPRIVACY_GUARD_NOTIFICATION, 0/' services/core/java/com/android/server/am/ActivityStack.java;
|
||||
#sed -i 's/VOLBTN_MUSIC_CONTROLS, 1/VOLBTN_MUSIC_CONTROLS, 0/' services/core/java/com/android/server/policy/PhoneWindowManager.java; #FIXME
|
||||
#sed -i 's/VOLUME_KEYS_CONTROL_RING_STREAM, 1/VOLUME_KEYS_CONTROL_RING_STREAM, 0/' services/core/java/com/android/server/audio/AudioService.java; #FIXME
|
||||
#sed -i 's/TORCH_LONG_PRESS_POWER_GESTURE, 0/TORCH_LONG_PRESS_POWER_GESTURE, 1/' services/core/java/com/android/server/policy/PhoneWindowManager.java; #FIXME
|
||||
#sed -i 's/TORCH_LONG_PRESS_POWER_TIMEOUT, 0/TORCH_LONG_PRESS_POWER_TIMEOUT, 120/' services/core/java/com/android/server/policy/PhoneWindowManager.java; #FIXME
|
||||
#sed -i 's/CAMERA_DOUBLE_TAP_POWER_GESTURE_DISABLED, 0/CAMERA_DOUBLE_TAP_POWER_GESTURE_DISABLED, 1/' services/core/java/com/android/server/GestureLauncherService.java; #FIXME
|
||||
#sed -i 's/NAVIGATION_BAR_MENU_ARROW_KEYS, 0/NAVIGATION_BAR_MENU_ARROW_KEYS, 1/' packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java; #FIXME
|
||||
#fi;
|
||||
|
||||
if enter "packages/apps/Dialer"; then
|
||||
sed -i 's/ENABLE_FORWARD_LOOKUP, 1)/ENABLE_FORWARD_LOOKUP, 0)/' src/com/android/dialer/*/LookupSettings*.java; #Disable FLP
|
||||
sed -i 's/ENABLE_PEOPLE_LOOKUP, 1)/ENABLE_PEOPLE_LOOKUP, 0)/' src/com/android/dialer/*/LookupSettings*.java; #Disable PLP
|
||||
sed -i 's/ENABLE_REVERSE_LOOKUP, 1)/ENABLE_REVERSE_LOOKUP, 0)/' src/com/android/dialer/*/LookupSettings*.java; #Disable RLP
|
||||
fi;
|
||||
|
||||
if enter "packages/apps/Nfc"; then
|
||||
sed -i 's/boolean NFC_ON_DEFAULT = true;/boolean NFC_ON_DEFAULT = false;/' src/com/android/nfc/NfcService.java; #Disable NFC
|
||||
sed -i 's/boolean NDEF_PUSH_ON_DEFAULT = true;/boolean NDEF_PUSH_ON_DEFAULT = false;/' src/com/android/nfc/NfcService.java; #Disable NDEF Push
|
||||
fi;
|
||||
|
||||
if enter "packages/apps/Settings"; then
|
||||
sed -i 's/WEB_ACTION_ENABLED, 1/WEB_ACTION_ENABLED, 0/' src/com/android/settings/applications/ManageDomainUrls.java; #Disable "Instant Apps"
|
||||
sed -i 's/Float.parseFloat(newValue.toString()) : 1;/Float.parseFloat(newValue.toString()) : 0.5f;/' src/com/android/settings/DevelopmentSettings.java; #Always reset animation scales to 0.5
|
||||
fi;
|
||||
|
||||
if enter "vendor/cm"; then
|
||||
sed -i 's/ro.config.notification_sound=Argon.ogg/ro.config.notification_sound=Pong.ogg/' config/common.mk;
|
||||
sed -i 's/ro.config.alarm_alert=Hassium.ogg/ro.config.alarm_alert=Alarm_Buzzer.ogg/' config/common.mk;
|
||||
fi;
|
||||
|
||||
cd "$DOS_BUILD_BASE";
|
||||
echo -e "\e[0;32m[SCRIPT COMPLETE] Default settings changed\e[0m";
|
@ -109,7 +109,7 @@ patchWorkspace() {
|
||||
sh "$DOS_SCRIPTS/Patch.sh";
|
||||
sh "$DOS_SCRIPTS_COMMON/Enable_Verity.sh";
|
||||
sh "$DOS_SCRIPTS_COMMON/Copy_Keys.sh";
|
||||
sh "$DOS_SCRIPTS/Defaults.sh";
|
||||
sh "$DOS_SCRIPTS_COMMON/Defaults.sh";
|
||||
sh "$DOS_SCRIPTS/Rebrand.sh";
|
||||
sh "$DOS_SCRIPTS/Theme.sh";
|
||||
sh "$DOS_SCRIPTS_COMMON/Optimize.sh";
|
||||
|
@ -182,7 +182,6 @@ applyPatch "$DOS_PATCHES_COMMON/android_frameworks_base/0001-Browser_No_Location
|
||||
applyPatch "$DOS_PATCHES_COMMON/android_frameworks_base/0003-SUPL_No_IMSI.patch"; #Don't send IMSI to SUPL (MSe1969)
|
||||
if [ "$DOS_SENSORS_PERM" = true ]; then applyPatch "$DOS_PATCHES/android_frameworks_base/0009-Sensors-P1.patch"; fi; #Permission for sensors access (MSe1969)
|
||||
hardenLocationFWB "$DOS_BUILD_BASE"; #Harden the default GPS config
|
||||
changeDefaultDNS; #Change the default DNS servers
|
||||
sed -i 's/DEFAULT_MAX_FILES = 1000;/DEFAULT_MAX_FILES = 0;/' services/core/java/com/android/server/DropBoxManagerService.java; #Disable DropBox internal logging service
|
||||
sed -i 's/(notif.needNotify)/(true)/' location/java/com/android/internal/location/GpsNetInitiatedHandler.java; #Notify the user if their location is requested via SUPL
|
||||
sed -i 's/return 16;/return 64;/' core/java/android/app/admin/DevicePolicyManager.java; #Increase default max password length to 64 (GrapheneOS)
|
||||
@ -570,6 +569,7 @@ find "kernel" -maxdepth 2 -mindepth 2 -type d -print0 | xargs -0 -n 1 -P 8 -I {}
|
||||
cd "$DOS_BUILD_BASE";
|
||||
deblobAudio || true;
|
||||
removeBuildFingerprints || true;
|
||||
changeDefaultDNS || true; #Change the default DNS servers
|
||||
|
||||
#Tweaks for <2GB RAM devices
|
||||
enableLowRam "device/asus/grouper";
|
||||
|
@ -628,7 +628,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-28390/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36123/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36280/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-39188/4.4/0010.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41850/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41858/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-42895/4.4/0008.patch
|
||||
|
@ -432,7 +432,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-33744/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36123/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36280/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-39188/4.4/0010.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41850/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41858/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-42895/4.4/0008.patch
|
||||
|
@ -428,7 +428,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-25258/3.4/0009.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-25375/3.4/0009.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-28390/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36280/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41850/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41858/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-Misc2/3.4/0002.patch
|
||||
|
@ -425,7 +425,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-28390/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36123/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36280/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-39188/4.4/0010.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41850/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41858/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-42895/4.4/0008.patch
|
||||
|
@ -554,7 +554,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-33744/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36123/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36280/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-39188/4.4/0010.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41850/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41858/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-42895/4.4/0008.patch
|
||||
|
@ -565,7 +565,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-33744/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36123/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36280/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-39188/4.4/0010.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41850/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41858/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-42895/4.4/0008.patch
|
||||
|
@ -626,7 +626,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-25258/3.4/0009.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-25375/3.4/0009.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-28390/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36280/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41850/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41858/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-Misc2/3.4/0002.patch
|
||||
|
@ -332,7 +332,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-28390/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36123/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36280/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-39188/4.4/0010.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41850/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41858/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-42895/4.4/0008.patch
|
||||
|
@ -455,7 +455,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-33744/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36123/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36280/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-39188/4.4/0010.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41850/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41858/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-42895/4.4/0008.patch
|
||||
|
@ -1,56 +0,0 @@
|
||||
#!/bin/bash
|
||||
#DivestOS: A privacy focused mobile distribution
|
||||
#Copyright (c) 2017-2021 Divested Computing Group
|
||||
#
|
||||
#This program is free software: you can redistribute it and/or modify
|
||||
#it under the terms of the GNU General Public License as published by
|
||||
#the Free Software Foundation, either version 3 of the License, or
|
||||
#(at your option) any later version.
|
||||
#
|
||||
#This program is distributed in the hope that it will be useful,
|
||||
#but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
#GNU General Public License for more details.
|
||||
#
|
||||
#You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
umask 0022;
|
||||
set -euo pipefail;
|
||||
source "$DOS_SCRIPTS_COMMON/Shell.sh";
|
||||
|
||||
#Changes various default settings
|
||||
#Last verified: 2021-10-16
|
||||
|
||||
#Useful commands
|
||||
#nano $(find . -name "config.xml" | grep "values/" | grep -v "device" | grep -v "tests")
|
||||
#nano $(find . -name "defaults.xml" | grep "values/" | grep -v "device")
|
||||
|
||||
echo "Changing default settings...";
|
||||
|
||||
if enter "packages/apps/Dialer"; then
|
||||
sed -i 's/ENABLE_FORWARD_LOOKUP, 1)/ENABLE_FORWARD_LOOKUP, 0)/' java/com/android/dialer/lookup/LookupSettings*.java; #Disable FLP
|
||||
sed -i 's/ENABLE_PEOPLE_LOOKUP, 1)/ENABLE_PEOPLE_LOOKUP, 0)/' java/com/android/dialer/lookup/LookupSettings*.java; #Disable PLP
|
||||
sed -i 's/ENABLE_REVERSE_LOOKUP, 1)/ENABLE_REVERSE_LOOKUP, 0)/' java/com/android/dialer/lookup/LookupSettings*.java; #Disable RLP
|
||||
fi;
|
||||
|
||||
if enter "packages/apps/Nfc"; then
|
||||
sed -i 's/boolean NFC_ON_DEFAULT = true;/boolean NFC_ON_DEFAULT = false;/' src/com/android/nfc/NfcService.java; #Disable NFC
|
||||
sed -i 's/boolean NDEF_PUSH_ON_DEFAULT = true;/boolean NDEF_PUSH_ON_DEFAULT = false;/' src/com/android/nfc/NfcService.java; #Disable NDEF Push
|
||||
fi;
|
||||
|
||||
if enter "packages/apps/Settings"; then
|
||||
sed -i 's/INSTANT_APPS_ENABLED, 1/INSTANT_APPS_ENABLED, 0/' src/com/android/settings/applications/ManageDomainUrls.java; #Disable "Instant Apps"
|
||||
sed -i 's/Float.parseFloat(newValue.toString()) : 1;/Float.parseFloat(newValue.toString()) : 0.5f;/' src/com/android/settings/development/DevelopmentSettings.java; #Always reset animation scales to 0.5
|
||||
fi;
|
||||
|
||||
if enter "packages/apps/Trebuchet"; then
|
||||
sed -i 's/"pref_predictive_apps", true/"pref_predictive_apps", false/' src/com/android/launcher3/Launcher.java;
|
||||
fi;
|
||||
|
||||
if enter "vendor/lineage"; then
|
||||
sed -i 's/ro.config.notification_sound=Argon.ogg/ro.config.notification_sound=Pong.ogg/' config/common.mk;
|
||||
sed -i 's/ro.config.alarm_alert=Hassium.ogg/ro.config.alarm_alert=Alarm_Buzzer.ogg/' config/common.mk;
|
||||
fi;
|
||||
|
||||
cd "$DOS_BUILD_BASE";
|
||||
echo -e "\e[0;32m[SCRIPT COMPLETE] Default settings changed\e[0m";
|
@ -87,7 +87,7 @@ patchWorkspace() {
|
||||
sh "$DOS_SCRIPTS/Patch.sh";
|
||||
sh "$DOS_SCRIPTS_COMMON/Enable_Verity.sh";
|
||||
sh "$DOS_SCRIPTS_COMMON/Copy_Keys.sh";
|
||||
sh "$DOS_SCRIPTS/Defaults.sh";
|
||||
sh "$DOS_SCRIPTS_COMMON/Defaults.sh";
|
||||
sh "$DOS_SCRIPTS/Rebrand.sh";
|
||||
sh "$DOS_SCRIPTS_COMMON/Optimize.sh";
|
||||
sh "$DOS_SCRIPTS_COMMON/Deblob.sh";
|
||||
|
@ -178,7 +178,6 @@ sed -i 's/DEFAULT_STRONG_AUTH_TIMEOUT_MS = 72 \* 60 \* 60 \* 1000;/DEFAULT_STRON
|
||||
sed -i 's/entry == null/entry == null || true/' core/java/android/os/RecoverySystem.java; #Skip strict update compatibiltity checks XXX: TEMPORARY FIX
|
||||
sed -i 's/!Build.isBuildConsistent()/false/' services/core/java/com/android/server/am/ActivityManagerService.java; #Disable partition fingerprint mismatch warnings XXX: TEMPORARY FIX
|
||||
hardenLocationFWB "$DOS_BUILD_BASE"; #Harden the default GPS config
|
||||
changeDefaultDNS; #Change the default DNS servers
|
||||
rm -rf packages/CompanionDeviceManager; #Used to support Android Wear (which hard depends on GMS)
|
||||
rm -rf packages/Osu packages/Osu2; #Automatic Wi-Fi connection non-sense
|
||||
rm -rf packages/PrintRecommendationService; #Creates popups to install proprietary print apps
|
||||
@ -477,6 +476,7 @@ find "kernel" -maxdepth 2 -mindepth 2 -type d -print0 | xargs -0 -n 1 -P 8 -I {}
|
||||
cd "$DOS_BUILD_BASE";
|
||||
deblobAudio || true;
|
||||
removeBuildFingerprints || true;
|
||||
changeDefaultDNS || true; #Change the default DNS servers
|
||||
|
||||
#Tweaks for <2GB RAM devices
|
||||
enableLowRam "device/asus/fugu";
|
||||
|
@ -429,7 +429,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-33744/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36123/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36280/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-39188/4.4/0010.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41850/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41858/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-42895/4.4/0008.patch
|
||||
|
@ -398,7 +398,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-25720/3.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-25720/prima/0001.patch --directory=drivers/staging/prima
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-28390/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36280/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41850/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41858/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-Misc2/3.4/0001.patch
|
||||
|
@ -475,7 +475,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-28390/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36123/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36280/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-39188/4.4/0010.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41850/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41858/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-42895/4.4/0008.patch
|
||||
|
@ -626,7 +626,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-25258/3.4/0009.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-25375/3.4/0009.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-28390/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36280/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41850/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41858/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-Misc2/3.4/0002.patch
|
||||
|
@ -281,7 +281,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-28390/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36123/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36280/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-39188/4.4/0010.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41850/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41858/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-42895/4.4/0008.patch
|
||||
|
@ -1,52 +0,0 @@
|
||||
#!/bin/bash
|
||||
#DivestOS: A privacy focused mobile distribution
|
||||
#Copyright (c) 2017-2021 Divested Computing Group
|
||||
#
|
||||
#This program is free software: you can redistribute it and/or modify
|
||||
#it under the terms of the GNU General Public License as published by
|
||||
#the Free Software Foundation, either version 3 of the License, or
|
||||
#(at your option) any later version.
|
||||
#
|
||||
#This program is distributed in the hope that it will be useful,
|
||||
#but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
#GNU General Public License for more details.
|
||||
#
|
||||
#You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
umask 0022;
|
||||
set -euo pipefail;
|
||||
source "$DOS_SCRIPTS_COMMON/Shell.sh";
|
||||
|
||||
#Changes various default settings
|
||||
#Last verified: 2021-10-16
|
||||
|
||||
#Useful commands
|
||||
#nano $(find . -name "config.xml" | grep "values/" | grep -v "device" | grep -v "tests")
|
||||
#nano $(find . -name "defaults.xml" | grep "values/" | grep -v "device")
|
||||
|
||||
echo "Changing default settings...";
|
||||
|
||||
if enter "packages/apps/Dialer"; then
|
||||
sed -i 's/ENABLE_FORWARD_LOOKUP, 1)/ENABLE_FORWARD_LOOKUP, 0)/' java/com/android/dialer/lookup/LookupSettings*.java; #Disable FLP
|
||||
sed -i 's/ENABLE_PEOPLE_LOOKUP, 1)/ENABLE_PEOPLE_LOOKUP, 0)/' java/com/android/dialer/lookup/LookupSettings*.java; #Disable PLP
|
||||
sed -i 's/ENABLE_REVERSE_LOOKUP, 1)/ENABLE_REVERSE_LOOKUP, 0)/' java/com/android/dialer/lookup/LookupSettings*.java; #Disable RLP
|
||||
fi;
|
||||
|
||||
if enter "packages/apps/Nfc"; then
|
||||
sed -i 's/boolean NFC_ON_DEFAULT = true;/boolean NFC_ON_DEFAULT = false;/' src/com/android/nfc/NfcService.java; #Disable NFC
|
||||
sed -i 's/boolean NDEF_PUSH_ON_DEFAULT = true;/boolean NDEF_PUSH_ON_DEFAULT = false;/' src/com/android/nfc/NfcService.java; #Disable NDEF Push
|
||||
fi;
|
||||
|
||||
if enter "packages/apps/Settings"; then
|
||||
sed -i 's/INSTANT_APPS_ENABLED, 1/INSTANT_APPS_ENABLED, 0/' src/com/android/settings/applications/ManageDomainUrls.java; #Disable "Instant Apps"
|
||||
sed -i 's/DEFAULT_VALUE = 1;/DEFAULT_VALUE = 0.5f;/' src/com/android/settings/development/*ScalePreferenceController.java; #Always reset animation scales to 0.5
|
||||
fi;
|
||||
|
||||
if enter "vendor/lineage"; then
|
||||
sed -i 's/ro.config.notification_sound=Argon.ogg/ro.config.notification_sound=Pong.ogg/' config/common*.mk;
|
||||
sed -i 's/ro.config.alarm_alert=Hassium.ogg/ro.config.alarm_alert=Alarm_Buzzer.ogg/' config/common*.mk;
|
||||
fi;
|
||||
|
||||
cd "$DOS_BUILD_BASE";
|
||||
echo -e "\e[0;32m[SCRIPT COMPLETE] Default settings changed\e[0m";
|
@ -91,7 +91,7 @@ patchWorkspace() {
|
||||
sh "$DOS_SCRIPTS/Patch.sh";
|
||||
sh "$DOS_SCRIPTS_COMMON/Enable_Verity.sh";
|
||||
sh "$DOS_SCRIPTS_COMMON/Copy_Keys.sh";
|
||||
sh "$DOS_SCRIPTS/Defaults.sh";
|
||||
sh "$DOS_SCRIPTS_COMMON/Defaults.sh";
|
||||
sh "$DOS_SCRIPTS/Rebrand.sh";
|
||||
sh "$DOS_SCRIPTS_COMMON/Optimize.sh";
|
||||
sh "$DOS_SCRIPTS_COMMON/Deblob.sh";
|
||||
|
@ -184,7 +184,6 @@ sed -i 's/!Build.isBuildConsistent()/false/' services/core/java/com/android/serv
|
||||
sed -i 's/return 16;/return 64;/' core/java/android/app/admin/DevicePolicyManager.java; #Increase default max password length to 64 (GrapheneOS)
|
||||
sed -i 's/DEFAULT_STRONG_AUTH_TIMEOUT_MS = 72 \* 60 \* 60 \* 1000;/DEFAULT_STRONG_AUTH_TIMEOUT_MS = 12 * 60 * 60 * 1000;/' core/java/android/app/admin/DevicePolicyManager.java; #Decrease the strong auth prompt timeout to occur more often
|
||||
hardenLocationFWB "$DOS_BUILD_BASE"; #Harden the default GPS config
|
||||
changeDefaultDNS; #Change the default DNS servers
|
||||
sed -i '301i\ if(packageList != null && packageList.length() > 0) { packageList += ","; } packageList += "net.sourceforge.opencamera";' core/java/android/hardware/Camera.java; #Add Open Camera to aux camera allowlist
|
||||
rm -rf packages/CompanionDeviceManager; #Used to support Android Wear (which hard depends on GMS)
|
||||
rm -rf packages/PrintRecommendationService; #Creates popups to install proprietary print apps
|
||||
@ -405,6 +404,7 @@ if [ "$DOS_GRAPHENE_EXEC" = true ]; then find "device" -maxdepth 2 -mindepth 2 -
|
||||
cd "$DOS_BUILD_BASE";
|
||||
deblobAudio || true;
|
||||
removeBuildFingerprints || true;
|
||||
changeDefaultDNS || true; #Change the default DNS servers
|
||||
|
||||
#Tweaks for <2GB RAM devices
|
||||
#none yet
|
||||
|
@ -429,7 +429,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-33744/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36123/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36280/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-39188/4.4/0010.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41850/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41858/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-42895/4.4/0008.patch
|
||||
|
@ -481,7 +481,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-33744/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36123/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36280/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-39188/4.4/0010.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41850/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41858/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-42895/4.4/0008.patch
|
||||
|
@ -396,7 +396,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-33744/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36123/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36280/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-39188/4.4/0010.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41850/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41858/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-42895/4.4/0008.patch
|
||||
|
@ -398,7 +398,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-33744/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36123/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36280/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-39188/4.4/0010.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41850/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41858/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-42895/4.4/0008.patch
|
||||
|
@ -1,52 +0,0 @@
|
||||
#!/bin/bash
|
||||
#DivestOS: A privacy focused mobile distribution
|
||||
#Copyright (c) 2017-2021 Divested Computing Group
|
||||
#
|
||||
#This program is free software: you can redistribute it and/or modify
|
||||
#it under the terms of the GNU General Public License as published by
|
||||
#the Free Software Foundation, either version 3 of the License, or
|
||||
#(at your option) any later version.
|
||||
#
|
||||
#This program is distributed in the hope that it will be useful,
|
||||
#but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
#GNU General Public License for more details.
|
||||
#
|
||||
#You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
umask 0022;
|
||||
set -euo pipefail;
|
||||
source "$DOS_SCRIPTS_COMMON/Shell.sh";
|
||||
|
||||
#Changes various default settings
|
||||
#Last verified: 2021-10-16
|
||||
|
||||
#Useful commands
|
||||
#nano $(find . -name "config.xml" | grep "values/" | grep -v "device" | grep -v "tests")
|
||||
#nano $(find . -name "defaults.xml" | grep "values/" | grep -v "device")
|
||||
|
||||
echo "Changing default settings...";
|
||||
|
||||
if enter "packages/apps/Dialer"; then
|
||||
sed -i 's/ENABLE_FORWARD_LOOKUP, 1)/ENABLE_FORWARD_LOOKUP, 0)/' java/com/android/dialer/lookup/LookupSettings*.java; #Disable FLP
|
||||
sed -i 's/ENABLE_PEOPLE_LOOKUP, 1)/ENABLE_PEOPLE_LOOKUP, 0)/' java/com/android/dialer/lookup/LookupSettings*.java; #Disable PLP
|
||||
sed -i 's/ENABLE_REVERSE_LOOKUP, 1)/ENABLE_REVERSE_LOOKUP, 0)/' java/com/android/dialer/lookup/LookupSettings*.java; #Disable RLP
|
||||
fi;
|
||||
|
||||
if enter "packages/apps/Nfc"; then
|
||||
sed -i 's/boolean NFC_ON_DEFAULT = true;/boolean NFC_ON_DEFAULT = false;/' src/com/android/nfc/NfcService.java; #Disable NFC
|
||||
sed -i 's/boolean NDEF_PUSH_ON_DEFAULT = true;/boolean NDEF_PUSH_ON_DEFAULT = false;/' src/com/android/nfc/NfcService.java; #Disable NDEF Push
|
||||
fi;
|
||||
|
||||
if enter "packages/apps/Settings"; then
|
||||
sed -i 's/INSTANT_APPS_ENABLED, 1/INSTANT_APPS_ENABLED, 0/' src/com/android/settings/applications/managedomainurls/InstantAppWebActionPreferenceController.java; #Disable "Instant Apps"
|
||||
sed -i 's/DEFAULT_VALUE = 1;/DEFAULT_VALUE = 0.5f;/' src/com/android/settings/development/*ScalePreferenceController.java; #Always reset animation scales to 0.5
|
||||
fi;
|
||||
|
||||
if enter "vendor/lineage"; then
|
||||
sed -i 's/ro.config.notification_sound=Argon.ogg/ro.config.notification_sound=Pong.ogg/' config/common*.mk;
|
||||
sed -i 's/ro.config.alarm_alert=Hassium.ogg/ro.config.alarm_alert=Alarm_Buzzer.ogg/' config/common*.mk;
|
||||
fi;
|
||||
|
||||
cd "$DOS_BUILD_BASE";
|
||||
echo -e "\e[0;32m[SCRIPT COMPLETE] Default settings changed\e[0m";
|
@ -86,7 +86,7 @@ patchWorkspace() {
|
||||
sh "$DOS_SCRIPTS/Patch.sh";
|
||||
sh "$DOS_SCRIPTS_COMMON/Enable_Verity.sh";
|
||||
sh "$DOS_SCRIPTS_COMMON/Copy_Keys.sh";
|
||||
sh "$DOS_SCRIPTS/Defaults.sh";
|
||||
sh "$DOS_SCRIPTS_COMMON/Defaults.sh";
|
||||
sh "$DOS_SCRIPTS/Rebrand.sh";
|
||||
sh "$DOS_SCRIPTS_COMMON/Optimize.sh";
|
||||
sh "$DOS_SCRIPTS_COMMON/Deblob.sh";
|
||||
|
@ -182,7 +182,6 @@ sed -i 's/!Build.isBuildConsistent()/false/' services/core/java/com/android/serv
|
||||
sed -i 's/return 16;/return 64;/' core/java/android/app/admin/DevicePolicyManager.java; #Increase default max password length to 64 (GrapheneOS)
|
||||
sed -i 's/DEFAULT_STRONG_AUTH_TIMEOUT_MS = 72 \* 60 \* 60 \* 1000;/DEFAULT_STRONG_AUTH_TIMEOUT_MS = 12 * 60 * 60 * 1000;/' core/java/android/app/admin/DevicePolicyManager.java; #Decrease the strong auth prompt timeout to occur more often
|
||||
hardenLocationConf services/core/java/com/android/server/location/gps_debug.conf; #Harden the default GPS config
|
||||
changeDefaultDNS; #Change the default DNS servers
|
||||
rm -rf packages/CompanionDeviceManager; #Used to support Android Wear (which hard depends on GMS)
|
||||
#sed -i '295i\ if(packageList != null && packageList.size() > 0) { packageList.add("net.sourceforge.opencamera"); }' core/java/android/hardware/Camera.java; #Add Open Camera to aux camera allowlist XXX: needs testing, broke boot last time
|
||||
rm -rf packages/OsuLogin; #Automatic Wi-Fi connection non-sense
|
||||
@ -482,6 +481,7 @@ cd "$DOS_BUILD_BASE";
|
||||
deblobAudio || true;
|
||||
removeBuildFingerprints || true;
|
||||
enableAutoVarInit || true;
|
||||
changeDefaultDNS || true; #Change the default DNS servers
|
||||
cd "$DOS_BUILD_BASE";
|
||||
#rm -rfv device/*/*/overlay/CarrierConfigResCommon device/*/*/rro_overlays/CarrierConfigOverlay device/*/*/overlay/packages/apps/CarrierConfig/res/xml/vendor.xml;
|
||||
|
||||
|
@ -221,7 +221,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-4378/^6.1/0002.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-25720/prima/0001.patch --directory=drivers/staging/prima
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-28390/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36280/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41850/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41858/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2023-0394/^6.2/0001.patch
|
||||
|
@ -395,7 +395,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-25258/3.4/0009.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-25375/3.4/0009.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-28390/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36280/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41850/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41858/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-Misc2/3.4/0002.patch
|
||||
|
@ -500,7 +500,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-25720/3.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-25720/prima/0001.patch --directory=drivers/staging/prima
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-28390/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36280/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41850/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41858/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-Misc2/3.4/0001.patch
|
||||
|
@ -426,7 +426,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-25720/3.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-25720/prima/0001.patch --directory=drivers/staging/prima
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-28390/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36280/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41850/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41858/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-Misc2/3.4/0001.patch
|
||||
|
@ -46,7 +46,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-20132/3.4/0042.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-20132/3.4/0043.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-20423/3.4/0010.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36280/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41850/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41858/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-Misc2/3.4/0002.patch
|
||||
|
@ -411,7 +411,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-25720/3.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-25720/prima/0001.patch --directory=drivers/staging/prima
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-28390/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36280/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41850/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41858/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-Misc2/3.4/0001.patch
|
||||
|
@ -311,7 +311,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-28390/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36123/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36280/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-39188/4.4/0010.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41850/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41858/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-42895/4.4/0008.patch
|
||||
|
@ -477,7 +477,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-25720/3.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-25720/prima/0001.patch --directory=drivers/staging/prima
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-28390/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36280/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41850/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41858/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-Misc2/3.4/0001.patch
|
||||
|
@ -450,7 +450,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-33744/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36123/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36280/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-39188/4.4/0010.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41850/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41858/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-42895/4.4/0008.patch
|
||||
|
@ -355,7 +355,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-25720/3.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-25720/prima/0001.patch --directory=drivers/staging/prima
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-28390/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36280/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41850/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41858/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-Misc2/3.4/0001.patch
|
||||
|
@ -431,7 +431,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-25258/3.4/0009.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-25375/3.4/0009.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-28390/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36280/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41850/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41858/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-Misc2/3.4/0002.patch
|
||||
|
@ -512,7 +512,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-25258/3.4/0009.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-25375/3.4/0009.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-28390/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36280/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41850/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41858/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-Misc2/3.4/0002.patch
|
||||
|
@ -241,7 +241,7 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-20423/3.4/0010.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-22058/3.4/0003.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-28390/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36280/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41850/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41858/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-Misc2/3.4/0001.patch
|
||||
|
@ -1,60 +0,0 @@
|
||||
#!/bin/bash
|
||||
#DivestOS: A privacy focused mobile distribution
|
||||
#Copyright (c) 2017-2021 Divested Computing Group
|
||||
#
|
||||
#This program is free software: you can redistribute it and/or modify
|
||||
#it under the terms of the GNU General Public License as published by
|
||||
#the Free Software Foundation, either version 3 of the License, or
|
||||
#(at your option) any later version.
|
||||
#
|
||||
#This program is distributed in the hope that it will be useful,
|
||||
#but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
#GNU General Public License for more details.
|
||||
#
|
||||
#You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
umask 0022;
|
||||
set -euo pipefail;
|
||||
source "$DOS_SCRIPTS_COMMON/Shell.sh";
|
||||
|
||||
#Changes various default settings
|
||||
#Last verified: 2021-10-16
|
||||
|
||||
#Useful commands
|
||||
#nano $(find . -name "config.xml" | grep "values/" | grep -v "device" | grep -v "tests")
|
||||
#nano $(find . -name "defaults.xml" | grep "values/" | grep -v "device")
|
||||
|
||||
echo "Changing default settings...";
|
||||
|
||||
if enter "packages/apps/Dialer"; then
|
||||
sed -i 's/ENABLE_FORWARD_LOOKUP, true)/ENABLE_FORWARD_LOOKUP, false)/' java/com/android/dialer/lookup/LookupSettings*.java; #Disable FLP
|
||||
sed -i 's/ENABLE_PEOPLE_LOOKUP, true)/ENABLE_PEOPLE_LOOKUP, false)/' java/com/android/dialer/lookup/LookupSettings*.java; #Disable PLP
|
||||
sed -i 's/ENABLE_REVERSE_LOOKUP, true)/ENABLE_REVERSE_LOOKUP, false)/' java/com/android/dialer/lookup/LookupSettings*.java; #Disable RLP
|
||||
fi;
|
||||
|
||||
if enter "packages/apps/Nfc"; then
|
||||
sed -i 's/boolean NFC_ON_DEFAULT = true;/boolean NFC_ON_DEFAULT = false;/' src/com/android/nfc/NfcService.java; #Disable NFC
|
||||
sed -i 's/boolean NDEF_PUSH_ON_DEFAULT = true;/boolean NDEF_PUSH_ON_DEFAULT = false;/' src/com/android/nfc/NfcService.java; #Disable NDEF Push
|
||||
fi;
|
||||
|
||||
if enter "packages/apps/Settings"; then
|
||||
sed -i 's/INSTANT_APPS_ENABLED, 1/INSTANT_APPS_ENABLED, 0/' src/com/android/settings/applications/managedomainurls/InstantAppWebActionPreferenceController.java; #Disable "Instant Apps"
|
||||
sed -i 's/DEFAULT_VALUE = 1;/DEFAULT_VALUE = 0.5f;/' src/com/android/settings/development/*ScalePreferenceController.java; #Always reset animation scales to 0.5
|
||||
fi;
|
||||
|
||||
if enter "packages/apps/SetupWizard"; then
|
||||
sed -i 's/UPDATE_RECOVERY_PROP, false)/UPDATE_RECOVERY_PROP, true)/' src/org/lineageos/setupwizard/UpdateRecoveryActivity.java; #Always update recovery by default
|
||||
fi;
|
||||
|
||||
if enter "packages/apps/Updater"; then
|
||||
sed -i 's/Constants.UPDATE_RECOVERY_PROPERTY, false)/Constants.UPDATE_RECOVERY_PROPERTY, true)/' src/org/lineageos/updater/UpdatesActivity.java; #Always update recovery by default
|
||||
fi;
|
||||
|
||||
if enter "vendor/lineage"; then
|
||||
sed -i 's/ro.config.notification_sound=Argon.ogg/ro.config.notification_sound=Pong.ogg/' config/common*.mk;
|
||||
sed -i 's/ro.config.alarm_alert=Hassium.ogg/ro.config.alarm_alert=Alarm_Buzzer.ogg/' config/common*.mk;
|
||||
fi;
|
||||
|
||||
cd "$DOS_BUILD_BASE";
|
||||
echo -e "\e[0;32m[SCRIPT COMPLETE] Default settings changed\e[0m";
|
@ -117,7 +117,7 @@ patchWorkspace() {
|
||||
sh "$DOS_SCRIPTS/Patch.sh";
|
||||
sh "$DOS_SCRIPTS_COMMON/Enable_Verity.sh";
|
||||
sh "$DOS_SCRIPTS_COMMON/Copy_Keys.sh";
|
||||
sh "$DOS_SCRIPTS/Defaults.sh";
|
||||
sh "$DOS_SCRIPTS_COMMON/Defaults.sh";
|
||||
sh "$DOS_SCRIPTS/Rebrand.sh";
|
||||
sh "$DOS_SCRIPTS_COMMON/Optimize.sh";
|
||||
sh "$DOS_SCRIPTS_COMMON/Deblob.sh";
|
||||
|
@ -164,7 +164,6 @@ applyPatch "$DOS_PATCHES/android_frameworks_base/0020-Burnin_Protection.patch";
|
||||
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
|
||||
changeDefaultDNS; #Change the default DNS servers
|
||||
sed -i 's/DEFAULT_USE_COMPACTION = false;/DEFAULT_USE_COMPACTION = true;/' services/core/java/com/android/server/am/CachedAppOptimizer.java; #Enable app compaction by default (GrapheneOS)
|
||||
sed -i 's/DEFAULT_USE_FREEZER = false;/DEFAULT_USE_FREEZER = true;/' services/core/java/com/android/server/am/CachedAppOptimizer.java; #Enable app freezer by default (GrapheneOS)
|
||||
sed -i 's/DEFAULT_MAX_FILES = 1000;/DEFAULT_MAX_FILES = 0;/' services/core/java/com/android/server/DropBoxManagerService.java; #Disable DropBox internal logging service
|
||||
@ -556,6 +555,7 @@ cd "$DOS_BUILD_BASE";
|
||||
deblobAudio || true;
|
||||
removeBuildFingerprints || true;
|
||||
enableAutoVarInit || true;
|
||||
changeDefaultDNS || true; #Change the default DNS servers
|
||||
cd "$DOS_BUILD_BASE";
|
||||
#rm -rfv device/*/*/overlay/CarrierConfigResCommon device/*/*/rro_overlays/CarrierConfigOverlay device/*/*/overlay/packages/apps/CarrierConfig/res/xml/vendor.xml;
|
||||
|
||||
|
@ -1,60 +0,0 @@
|
||||
#!/bin/bash
|
||||
#DivestOS: A privacy focused mobile distribution
|
||||
#Copyright (c) 2017-2022 Divested Computing Group
|
||||
#
|
||||
#This program is free software: you can redistribute it and/or modify
|
||||
#it under the terms of the GNU General Public License as published by
|
||||
#the Free Software Foundation, either version 3 of the License, or
|
||||
#(at your option) any later version.
|
||||
#
|
||||
#This program is distributed in the hope that it will be useful,
|
||||
#but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
#GNU General Public License for more details.
|
||||
#
|
||||
#You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
umask 0022;
|
||||
set -euo pipefail;
|
||||
source "$DOS_SCRIPTS_COMMON/Shell.sh";
|
||||
|
||||
#Changes various default settings
|
||||
#Last verified: 2022-04-04
|
||||
|
||||
#Useful commands
|
||||
#nano $(find . -name "config.xml" | grep "values/" | grep -v "device" | grep -v "tests")
|
||||
#nano $(find . -name "defaults.xml" | grep "values/" | grep -v "device")
|
||||
|
||||
echo "Changing default settings...";
|
||||
|
||||
if enter "packages/apps/Dialer"; then
|
||||
sed -i 's/ENABLE_FORWARD_LOOKUP, true)/ENABLE_FORWARD_LOOKUP, false)/' java/com/android/dialer/lookup/LookupSettings*.java; #Disable FLP
|
||||
sed -i 's/ENABLE_PEOPLE_LOOKUP, true)/ENABLE_PEOPLE_LOOKUP, false)/' java/com/android/dialer/lookup/LookupSettings*.java; #Disable PLP
|
||||
sed -i 's/ENABLE_REVERSE_LOOKUP, true)/ENABLE_REVERSE_LOOKUP, false)/' java/com/android/dialer/lookup/LookupSettings*.java; #Disable RLP
|
||||
fi;
|
||||
|
||||
if enter "packages/apps/Nfc"; then
|
||||
sed -i 's/boolean NFC_ON_DEFAULT = true;/boolean NFC_ON_DEFAULT = false;/' src/com/android/nfc/NfcService.java; #Disable NFC
|
||||
sed -i 's/boolean NDEF_PUSH_ON_DEFAULT = true;/boolean NDEF_PUSH_ON_DEFAULT = false;/' src/com/android/nfc/NfcService.java; #Disable NDEF Push
|
||||
fi;
|
||||
|
||||
if enter "packages/apps/Settings"; then
|
||||
sed -i 's/INSTANT_APPS_ENABLED, 1/INSTANT_APPS_ENABLED, 0/' src/com/android/settings/applications/managedomainurls/InstantAppWebActionPreferenceController.java; #Disable "Instant Apps"
|
||||
sed -i 's/DEFAULT_VALUE = 1;/DEFAULT_VALUE = 0.5f;/' src/com/android/settings/development/*ScalePreferenceController.java; #Always reset animation scales to 0.5
|
||||
fi;
|
||||
|
||||
if enter "packages/apps/SetupWizard"; then
|
||||
sed -i 's/UPDATE_RECOVERY_PROP, false)/UPDATE_RECOVERY_PROP, true)/' src/org/lineageos/setupwizard/UpdateRecoveryActivity.java; #Always update recovery by default
|
||||
fi;
|
||||
|
||||
if enter "packages/apps/Updater"; then
|
||||
sed -i 's/Constants.UPDATE_RECOVERY_PROPERTY, false)/Constants.UPDATE_RECOVERY_PROPERTY, true)/' src/org/lineageos/updater/UpdatesActivity.java; #Always update recovery by default
|
||||
fi;
|
||||
|
||||
if enter "vendor/lineage"; then
|
||||
sed -i 's/ro.config.notification_sound=Argon.ogg/ro.config.notification_sound=Pong.ogg/' config/common*.mk;
|
||||
sed -i 's/ro.config.alarm_alert=Hassium.ogg/ro.config.alarm_alert=Alarm_Buzzer.ogg/' config/common*.mk;
|
||||
fi;
|
||||
|
||||
cd "$DOS_BUILD_BASE";
|
||||
echo -e "\e[0;32m[SCRIPT COMPLETE] Default settings changed\e[0m";
|
@ -81,7 +81,7 @@ patchWorkspace() {
|
||||
sh "$DOS_SCRIPTS/Patch.sh";
|
||||
sh "$DOS_SCRIPTS_COMMON/Enable_Verity.sh";
|
||||
sh "$DOS_SCRIPTS_COMMON/Copy_Keys.sh";
|
||||
sh "$DOS_SCRIPTS/Defaults.sh";
|
||||
sh "$DOS_SCRIPTS_COMMON/Defaults.sh";
|
||||
sh "$DOS_SCRIPTS/Rebrand.sh";
|
||||
sh "$DOS_SCRIPTS_COMMON/Optimize.sh";
|
||||
sh "$DOS_SCRIPTS_COMMON/Deblob.sh";
|
||||
|
@ -173,7 +173,6 @@ applyPatch "$DOS_PATCHES/android_frameworks_base/0027-appops_reset_fix-1.patch";
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0027-appops_reset_fix-2.patch"; #appops: skip ops for invalid null package during state serialization (GrapheneOS)
|
||||
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/gnss/gps_debug.conf; #Harden the default GPS config
|
||||
changeDefaultDNS; #Change the default DNS servers
|
||||
sed -i 's/DEFAULT_USE_COMPACTION = false;/DEFAULT_USE_COMPACTION = true;/' services/core/java/com/android/server/am/CachedAppOptimizer.java; #Enable app compaction by default (GrapheneOS)
|
||||
sed -i 's/DEFAULT_MAX_FILES = 1000;/DEFAULT_MAX_FILES = 0;/' services/core/java/com/android/server/DropBoxManagerService.java; #Disable DropBox internal logging service
|
||||
sed -i 's/DEFAULT_MAX_FILES_LOWRAM = 300;/DEFAULT_MAX_FILES_LOWRAM = 0;/' services/core/java/com/android/server/DropBoxManagerService.java;
|
||||
@ -453,6 +452,7 @@ cd "$DOS_BUILD_BASE";
|
||||
deblobAudio || true;
|
||||
removeBuildFingerprints || true;
|
||||
enableAutoVarInit || true;
|
||||
changeDefaultDNS || true; #Change the default DNS servers
|
||||
cd "$DOS_BUILD_BASE";
|
||||
#rm -rfv device/*/*/overlay/CarrierConfigResCommon device/*/*/rro_overlays/CarrierConfigOverlay device/*/*/overlay/packages/apps/CarrierConfig/res/xml/vendor.xml;
|
||||
|
||||
|
@ -0,0 +1,192 @@
|
||||
#!/bin/bash
|
||||
cd "$DOS_BUILD_BASE""kernel/essential/msm8998"
|
||||
git apply $DOS_PATCHES_LINUX_CVES/0008-Graphene-Kernel_Hardening-allocsize/4.9/0015.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/0008-Graphene-Kernel_Hardening-allocsize/4.9/0020.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/0008-Graphene-Kernel_Hardening-bugon/4.4/0003.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/0008-Graphene-Kernel_Hardening-bugon/4.4/0008.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/0008-Graphene-Kernel_Hardening-canaries/4.4/0002.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/0008-Graphene-Kernel_Hardening-fortify/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/0008-Graphene-Kernel_Hardening-fortify/4.4/0002.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/0008-Graphene-Kernel_Hardening-misc/4.4/0014.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/0008-Graphene-Kernel_Hardening-misc/4.4/0016.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/0008-Graphene-Kernel_Hardening-random/4.9/0006.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/0008-Graphene-Kernel_Hardening-ro/4.9/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/0008-Graphene-Kernel_Hardening-ro/4.9/0027.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/0008-Graphene-Kernel_Hardening-ro/4.9/0031.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/0008-Graphene-Kernel_Hardening-slab/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/0008-Graphene-Kernel_Hardening-slab/4.4/0003.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/0008-Graphene-Kernel_Hardening-slab/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/0008-Graphene-Kernel_Hardening-slab/4.4/0012.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/0008-Graphene-Kernel_Hardening-slab/4.4/0016.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/0008-Graphene-Kernel_Hardening-slub/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/0008-Graphene-Kernel_Hardening-slub/4.4/0002.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/0008-Graphene-Kernel_Hardening-slub/4.4/0003.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/0008-Graphene-Kernel_Hardening-slub/4.4/0005.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/0008-Graphene-Kernel_Hardening-slub/4.4/0007.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2015-7837/ANY/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2016-1583/^4.6/0003.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2016-6187/^4.7/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2016-8394/ANY/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2016-10153/4.9/0002.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2017-16USB/ANY/0006.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2017-16USB/ANY/0009.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2017-0610/ANY/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2017-9059/4.9/0004.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2017-9711/4.4/0003.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2017-13218/4.4/0019.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2017-13218/4.4/0025.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2017-13693/^4.12.9/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2017-13694/^4.12.9/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2017-17052/4.9/0002.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2017-18174/^4.10/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2017-18204/4.4/0004.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2017-18306/4.4/0003.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2017-1000252/^4.13/0002.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-5896/ANY/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-5897/ANY/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-5897/ANY/0002.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-5905/ANY/0002.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-5906/ANY/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-5908/4.4/0003.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-5909/ANY/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-5910/4.4/0003.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-9415/ANY/0005.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-11273/ANY/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-11818/ANY/0002.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-11919/4.4/0002.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-11984/ANY/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-11986/ANY/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-11987/ANY/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-11988/ANY/0002.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-11988/ANY/0003.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-12010/ANY/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-13912/ANY/0002.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-13913/ANY/0002.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-13914/ANY/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-13917/ANY/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-13920/ANY/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2018-16597/4.4/0002.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2019-2054/ANY/0013.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2019-2054/ANY/0014.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2019-2264/ANY/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2019-2333/ANY/0003.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2019-2341/ANY/0002.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2019-8912/^5.0/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2019-10494/ANY/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2019-10503/ANY/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2019-10503/ANY/0002.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2019-10515/ANY/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2019-10524/ANY/0003.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2019-10527/ANY/0004.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2019-10555/ANY/0002.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2019-10584/ANY/0002.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2019-10614/ANY/0002.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2019-10622/ANY/0002.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2019-12378/^5.1.5/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2019-12456/^5.1.5/0002.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2019-14040/ANY/0002.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2019-14041/ANY/0002.patch
|
||||
#git apply $DOS_PATCHES_LINUX_CVES/CVE-2019-14047/ANY/0002.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2019-15291/4.4/0006.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2019-16994/4.9/0004.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2019-19051/4.4/0012.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2019-19068/4.4/0004.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2020-11160/4.4/0003.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2020-14386/3.10-^4.4/0002.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2020-16119/^5.10/0002.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2021-0935/4.9/0006.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2021-0936/ANY/0005.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2021-0936/ANY/0011.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2021-1963/ANY/0003.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2021-4034/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2021-4149/4.4/0007.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2021-20292/4.9/0004.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2021-33656/4.4/0007.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2021-42739/4.9/0004.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-0435/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-0487/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-0492/4.9/0007.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-0494/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-1011/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-1016/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-1184/4.9/0007.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-1198/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-1199/4.9/0010.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-1199/4.9/0011.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-1353/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-1516/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-1652/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-1679/^5.19/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-1729/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-1734/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-1836/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-1974/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-1975/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-2153/^5.17/0002.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-2318/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-2380/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-2503/4.9/0004.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-2588/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-2639/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-2663/4.4/0011.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-2663/4.4/0012.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-2964/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-2978/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-3028/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-3061/^5.18/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-3111/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-3202/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-3424/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-3524/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-3542/3.8-^6.0/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-3565/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-3594/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-3621/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-3628/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-3629/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-3635/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-3646/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-3649/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-4378/4.9/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-4662/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-20368/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-23037/4.9/0003.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-23039/4.9/0003.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-23040/4.9/0003.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-23042/4.9/0003.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-26490/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-26966/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-27223/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-27950/^5.16/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-28356/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-28390/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-30594/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-32981/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-33740/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-33744/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36123/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36280/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36879/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-36946/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-39188/4.4/0010.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-39842/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-40768/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41849/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41850/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-41858/4.4/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-42328/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-42703/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-42895/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-42896/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-42896/4.4/0009.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-42896-extra/4.4/0002.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-43750/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2022-45934/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2023-0047/4.4/0008.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2023-0394/^6.2/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/CVE-2023-23559/^6.2/0001.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/0008-Graphene-Kernel_Hardening-ro/4.9/0016.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/0008-Graphene-Kernel_Hardening-ro/4.9/0029.patch
|
||||
git apply $DOS_PATCHES_LINUX_CVES/0008-Graphene-Kernel_Hardening-slab/4.4/0004.patch
|
||||
editKernelLocalversion "-dos.p188"
|
||||
cd "$DOS_BUILD_BASE"
|
@ -1,60 +0,0 @@
|
||||
#!/bin/bash
|
||||
#DivestOS: A privacy focused mobile distribution
|
||||
#Copyright (c) 2017-2022 Divested Computing Group
|
||||
#
|
||||
#This program is free software: you can redistribute it and/or modify
|
||||
#it under the terms of the GNU General Public License as published by
|
||||
#the Free Software Foundation, either version 3 of the License, or
|
||||
#(at your option) any later version.
|
||||
#
|
||||
#This program is distributed in the hope that it will be useful,
|
||||
#but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
#GNU General Public License for more details.
|
||||
#
|
||||
#You should have received a copy of the GNU General Public License
|
||||
#along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
umask 0022;
|
||||
set -euo pipefail;
|
||||
source "$DOS_SCRIPTS_COMMON/Shell.sh";
|
||||
|
||||
#Changes various default settings
|
||||
#Last verified: 2022-10-15
|
||||
|
||||
#Useful commands
|
||||
#nano $(find . -name "config.xml" | grep "values/" | grep -v "device" | grep -v "tests")
|
||||
#nano $(find . -name "defaults.xml" | grep "values/" | grep -v "device")
|
||||
|
||||
echo "Changing default settings...";
|
||||
|
||||
if enter "packages/apps/Dialer"; then
|
||||
sed -i 's/ENABLE_FORWARD_LOOKUP, true)/ENABLE_FORWARD_LOOKUP, false)/' java/com/android/dialer/lookup/LookupSettings*.java; #Disable FLP
|
||||
sed -i 's/ENABLE_PEOPLE_LOOKUP, true)/ENABLE_PEOPLE_LOOKUP, false)/' java/com/android/dialer/lookup/LookupSettings*.java; #Disable PLP
|
||||
sed -i 's/ENABLE_REVERSE_LOOKUP, true)/ENABLE_REVERSE_LOOKUP, false)/' java/com/android/dialer/lookup/LookupSettings*.java; #Disable RLP
|
||||
fi;
|
||||
|
||||
if enter "packages/apps/Nfc"; then
|
||||
sed -i 's/boolean NFC_ON_DEFAULT = true;/boolean NFC_ON_DEFAULT = false;/' src/com/android/nfc/NfcService.java; #Disable NFC
|
||||
sed -i 's/boolean NDEF_PUSH_ON_DEFAULT = true;/boolean NDEF_PUSH_ON_DEFAULT = false;/' src/com/android/nfc/NfcService.java; #Disable NDEF Push
|
||||
fi;
|
||||
|
||||
if enter "packages/apps/Settings"; then
|
||||
sed -i 's/INSTANT_APPS_ENABLED, 1/INSTANT_APPS_ENABLED, 0/' src/com/android/settings/applications/managedomainurls/InstantAppWebActionPreferenceController.java; #Disable "Instant Apps"
|
||||
sed -i 's/DEFAULT_VALUE = 1;/DEFAULT_VALUE = 0.5f;/' src/com/android/settings/development/*ScalePreferenceController.java; #Always reset animation scales to 0.5
|
||||
fi;
|
||||
|
||||
if enter "packages/apps/SetupWizard"; then
|
||||
sed -i 's/UPDATE_RECOVERY_PROP, false)/UPDATE_RECOVERY_PROP, true)/' src/org/lineageos/setupwizard/UpdateRecoveryActivity.java; #Always update recovery by default
|
||||
fi;
|
||||
|
||||
if enter "packages/apps/Updater"; then
|
||||
sed -i 's/Constants.UPDATE_RECOVERY_PROPERTY, false)/Constants.UPDATE_RECOVERY_PROPERTY, true)/' src/org/lineageos/updater/UpdatesActivity.java; #Always update recovery by default
|
||||
fi;
|
||||
|
||||
if enter "vendor/lineage"; then
|
||||
sed -i 's/ro.config.notification_sound=Argon.ogg/ro.config.notification_sound=Pong.ogg/' config/common*.mk;
|
||||
sed -i 's/ro.config.alarm_alert=Hassium.ogg/ro.config.alarm_alert=Alarm_Buzzer.ogg/' config/common*.mk;
|
||||
fi;
|
||||
|
||||
cd "$DOS_BUILD_BASE";
|
||||
echo -e "\e[0;32m[SCRIPT COMPLETE] Default settings changed\e[0m";
|
@ -19,7 +19,7 @@ umask 0022;
|
||||
#Last verified: 2022-10-15
|
||||
|
||||
patchAllKernels() {
|
||||
startPatcher "kernel_fairphone_sm7225 kernel_fxtec_msm8998 kernel_google_gs101_private_gs-google kernel_google_gs201_private_gs-google kernel_google_msm-4.9 kernel_google_msm-4.14 kernel_google_redbull kernel_google_wahoo kernel_oneplus_msm8998 kernel_oneplus_sdm845 kernel_oneplus_sm8150 kernel_oneplus_sm8250 kernel_oneplus_sm8350 kernel_razer_sdm845 kernel_sony_sdm845 kernel_xiaomi_sdm845";
|
||||
startPatcher "kernel_essential_msm8998 kernel_fairphone_sm7225 kernel_fxtec_msm8998 kernel_google_gs101_private_gs-google kernel_google_gs201_private_gs-google kernel_google_msm-4.9 kernel_google_msm-4.14 kernel_google_redbull kernel_google_wahoo kernel_oneplus_msm8998 kernel_oneplus_sdm845 kernel_oneplus_sm8150 kernel_oneplus_sm8250 kernel_oneplus_sm8350 kernel_razer_sdm845 kernel_sony_sdm845 kernel_xiaomi_sdm845";
|
||||
}
|
||||
export -f patchAllKernels;
|
||||
|
||||
@ -55,6 +55,7 @@ buildAll() {
|
||||
buildDevice walleye avb; #unb
|
||||
buildDevice cheeseburger verity;
|
||||
buildDevice dumpling verity;
|
||||
buildDevice mata verity; #unb
|
||||
#SD845
|
||||
buildDevice fajita avb;
|
||||
buildDevice enchilada avb;
|
||||
@ -112,7 +113,7 @@ patchWorkspace() {
|
||||
sh "$DOS_SCRIPTS/Patch.sh";
|
||||
sh "$DOS_SCRIPTS_COMMON/Enable_Verity.sh";
|
||||
sh "$DOS_SCRIPTS_COMMON/Copy_Keys.sh";
|
||||
sh "$DOS_SCRIPTS/Defaults.sh";
|
||||
sh "$DOS_SCRIPTS_COMMON/Defaults.sh";
|
||||
sh "$DOS_SCRIPTS/Rebrand.sh";
|
||||
sh "$DOS_SCRIPTS_COMMON/Optimize.sh";
|
||||
sh "$DOS_SCRIPTS_COMMON/Deblob.sh";
|
||||
|
@ -180,7 +180,6 @@ applyPatch "$DOS_PATCHES/android_frameworks_base/0030-agnss.goog_override.patch"
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0031-appops_reset_fix-1.patch"; #Revert "Null safe package name in AppOps writeState" (GrapheneOS)
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0031-appops_reset_fix-2.patch"; #appops: skip ops for invalid null package during state serialization (GrapheneOS)
|
||||
hardenLocationConf services/core/java/com/android/server/location/gnss/gps_debug.conf; #Harden the default GPS config
|
||||
changeDefaultDNS; #Change the default DNS servers
|
||||
sed -i 's/DEFAULT_USE_COMPACTION = false;/DEFAULT_USE_COMPACTION = true;/' services/core/java/com/android/server/am/CachedAppOptimizer.java; #Enable app compaction by default (GrapheneOS)
|
||||
sed -i 's/DEFAULT_MAX_FILES = 1000;/DEFAULT_MAX_FILES = 0;/' services/core/java/com/android/server/DropBoxManagerService.java; #Disable DropBox internal logging service
|
||||
sed -i 's/DEFAULT_MAX_FILES_LOWRAM = 300;/DEFAULT_MAX_FILES_LOWRAM = 0;/' services/core/java/com/android/server/DropBoxManagerService.java;
|
||||
@ -415,6 +414,10 @@ fi;
|
||||
#
|
||||
#START OF DEVICE CHANGES
|
||||
#
|
||||
if enterAndClear "device/essential/mata"; then
|
||||
echo "allow permissioncontroller_app tethering_service:service_manager find;" > sepolicy/private/permissioncontroller_app.te;
|
||||
fi;
|
||||
|
||||
if enterAndClear "device/google/gs101"; then
|
||||
if [ "$DOS_DEBLOBBER_REMOVE_CNE" = true ]; then sed -i '/google iwlan/,+8d' device.mk; fi; #fix stray
|
||||
fi;
|
||||
@ -475,6 +478,7 @@ cd "$DOS_BUILD_BASE";
|
||||
deblobAudio || true;
|
||||
removeBuildFingerprints || true;
|
||||
enableAutoVarInit || true;
|
||||
changeDefaultDNS || true; #Change the default DNS servers
|
||||
cd "$DOS_BUILD_BASE";
|
||||
#rm -rfv device/*/*/overlay/CarrierConfigResCommon device/*/*/rro_overlays/CarrierConfigOverlay device/*/*/overlay/packages/apps/CarrierConfig/res/xml/vendor.xml;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user