2017-11-05 16:40:21 -05:00
|
|
|
#!/bin/bash
|
|
|
|
#DivestOS: A privacy oriented Android distribution
|
2018-06-03 14:13:59 -04:00
|
|
|
#Copyright (c) 2017-2018 Divested Computing, Inc.
|
2017-11-05 16:40:21 -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/>.
|
|
|
|
|
2017-11-05 16:49:52 -05:00
|
|
|
#Changes various default settings
|
2018-04-27 23:49:40 -04:00
|
|
|
#Last verified: 2018-04-27
|
2017-11-05 16:40:21 -05:00
|
|
|
|
2018-04-25 23:38:53 -04: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")
|
|
|
|
|
2018-04-23 08:59:18 -04:00
|
|
|
echo "Changing default settings...";
|
2017-11-05 16:40:21 -05:00
|
|
|
|
2018-04-23 08:59:18 -04:00
|
|
|
enter "frameworks/base";
|
2018-04-27 22:18:52 -04:00
|
|
|
#sed -i 's/CMPRIVACY_GUARD_NOTIFICATION, 1/CMPRIVACY_GUARD_NOTIFICATION, 0/' services/core/java/com/android/server/am/ActivityStack.java;
|
2018-04-28 03:16:35 -04:00
|
|
|
#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
|
2017-11-05 16:40:21 -05:00
|
|
|
|
2018-04-25 23:49:50 -04:00
|
|
|
enter "packages/apps/Dialer";
|
2018-04-27 22:18:52 -04:00
|
|
|
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
|
2017-11-05 16:40:21 -05:00
|
|
|
|
2018-04-25 23:49:50 -04:00
|
|
|
enter "packages/apps/FDroid";
|
2018-04-27 01:26:29 -04:00
|
|
|
sed -i '/string\/show_root_apps/!b;n;s/defaultValue="true"/defaultValue="false"/' app/src/main/res/xml/preferences.xml;
|
|
|
|
sed -i '/string\/show_anti_feature_apps/!b;n;s/defaultValue="true"/defaultValue="false"/' app/src/main/res/xml/preferences.xml;
|
2017-11-05 16:40:21 -05:00
|
|
|
|
2018-04-25 23:49:50 -04:00
|
|
|
enter "packages/apps/Nfc";
|
2018-04-27 22:18:52 -04: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
|
2017-11-05 16:40:21 -05:00
|
|
|
|
2018-04-25 23:49:50 -04:00
|
|
|
enter "packages/apps/Settings";
|
2018-04-27 22:18:52 -04:00
|
|
|
sed -i 's/WEB_ACTION_ENABLED, 1/WEB_ACTION_ENABLED, 0/' src/com/android/settings/applications/ManageDomainUrls.java; #Disable "Instant Apps"
|
2018-01-04 17:17:30 -05:00
|
|
|
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
|
2017-11-05 16:40:21 -05:00
|
|
|
|
2018-04-25 23:38:53 -04:00
|
|
|
enter "vendor/cm";
|
|
|
|
awk -i inplace '!/def_backup_transport/' overlay/common/frameworks/base/packages/SettingsProvider/res/values/defaults.xml;
|
2018-05-03 07:38:32 -04:00
|
|
|
#sed -i 's/config_enableRecoveryUpdater">false/config_enableRecoveryUpdater">true/' overlay/common/packages/apps/Settings/res/values/config.xml;
|
2018-04-25 23:38:53 -04:00
|
|
|
|
2018-06-29 00:55:21 -04:00
|
|
|
cd "$DOS_BUILD_BASE";
|
2018-04-23 08:59:18 -04:00
|
|
|
echo "Default settings changed!";
|