2019-03-04 02:04:36 -05:00
|
|
|
#!/bin/bash
|
2020-11-17 10:11:40 -05:00
|
|
|
#DivestOS: A privacy focused mobile distribution
|
2022-05-01 01:13:46 -04:00
|
|
|
#Copyright (c) 2017-2021 Divested Computing Group
|
2019-03-04 02:04:36 -05:00
|
|
|
#
|
|
|
|
#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/>.
|
2021-10-16 19:15:19 -04:00
|
|
|
umask 0022;
|
2021-10-16 15:28:15 -04:00
|
|
|
set -euo pipefail;
|
2021-10-16 19:15:19 -04:00
|
|
|
source "$DOS_SCRIPTS_COMMON/Shell.sh";
|
2019-03-04 02:04:36 -05:00
|
|
|
|
|
|
|
#Changes various default settings
|
2021-10-16 16:28:41 -04:00
|
|
|
#Last verified: 2021-10-16
|
2019-03-04 02:04:36 -05:00
|
|
|
|
|
|
|
#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...";
|
|
|
|
|
2021-07-08 20:41:33 -04:00
|
|
|
if enter "packages/apps/Dialer"; then
|
2019-03-04 02:04:36 -05:00
|
|
|
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
|
2021-07-08 20:41:33 -04:00
|
|
|
fi;
|
2019-03-04 02:04:36 -05:00
|
|
|
|
2021-07-08 20:41:33 -04:00
|
|
|
if enter "packages/apps/Nfc"; then
|
2019-03-04 02:04:36 -05:00
|
|
|
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
|
2021-07-08 20:41:33 -04:00
|
|
|
fi;
|
2019-03-04 02:04:36 -05:00
|
|
|
|
2021-07-08 20:41:33 -04:00
|
|
|
if enter "packages/apps/Settings"; then
|
2019-03-04 02:04:36 -05:00
|
|
|
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
|
2021-07-08 20:41:33 -04:00
|
|
|
fi;
|
2019-03-04 02:04:36 -05:00
|
|
|
|
2021-07-08 20:41:33 -04:00
|
|
|
if enter "vendor/lineage"; then
|
2021-03-22 19:59:15 -04:00
|
|
|
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;
|
2021-07-08 20:41:33 -04:00
|
|
|
fi;
|
2019-03-04 02:04:36 -05:00
|
|
|
|
|
|
|
cd "$DOS_BUILD_BASE";
|
2021-10-16 15:28:15 -04:00
|
|
|
echo -e "\e[0;32m[SCRIPT COMPLETE] Default settings changed\e[0m";
|