From 6f7c21f024bd1970f565874e03ec44d434f71856 Mon Sep 17 00:00:00 2001 From: Tad Date: Wed, 25 Apr 2018 23:38:53 -0400 Subject: [PATCH] Change many more default settings --- Misc/Defaults_to_Change.txt | 30 +++++------------------------- Scripts/LineageOS-14.1/Defaults.sh | 24 +++++++++++++++++++++++- Scripts/LineageOS-15.1/Defaults.sh | 29 +++++++++++++++++++++++++---- 3 files changed, 53 insertions(+), 30 deletions(-) diff --git a/Misc/Defaults_to_Change.txt b/Misc/Defaults_to_Change.txt index 6dae0bd4..d61b1659 100644 --- a/Misc/Defaults_to_Change.txt +++ b/Misc/Defaults_to_Change.txt @@ -1,42 +1,22 @@ secure camera_double_tap_power_gesture_disabled=1 - lock_screen_allow_private_notifications=0 - lock_screen_lock_after_timeout=30000 - lock_screen_show_notifications=1 - screensaver_enabled=0 + lock_screen_lock_after_timeout=30000 #packages/apps/Settings/src/com/android/settings/SecuritySettings.java secure --lineage - power_menu_actions=power|restart|screenshot|users|lockdown - privacy_guard_default=1 - privacy_guard_notification=0 - stats_collection=1 - -global - network_recommendations_enabled=0 - package_verifier_enable=1 - power_sounds_enabled=0 - require_password_to_decrypt=1 + privacy_guard_notification=0 #packages/apps/LineageParts/src/org/lineageos/lineageparts/privacyguard/PrivacyGuardManager.java system accelerometer_rotation=0 - lockscreen_sounds_enabled=0 - screen_off_timeout=30000 show_password=0 - sound_effects_enabled=0 - transition_animation_scale=1.0 user_rotation=0 vibrate_when_ringing=1 - window_animation_scale=1.0 - notification_sound=content://media/internal/audio/media/82 - alarm_alert=content://media/internal/audio/media/8 - ringtone=content://media/internal/audio/media/133 + notification_sound=content://media/internal/audio/media/82 #Pong + alarm_alert=content://media/internal/audio/media/8 #Beep + ringtone=content://media/internal/audio/media/133 #Centarus system --lineage camera_launch=0 double_tap_sleep_gesture=0 - enable_forward_lookup=0 - enable_people_lookup=0 - enable_reverse_lookup=0 key_home_double_tap_action=8 key_home_long_press_action=3 torch_long_press_power_gesture=1 diff --git a/Scripts/LineageOS-14.1/Defaults.sh b/Scripts/LineageOS-14.1/Defaults.sh index 80caa05f..f1a77e19 100644 --- a/Scripts/LineageOS-14.1/Defaults.sh +++ b/Scripts/LineageOS-14.1/Defaults.sh @@ -17,12 +17,22 @@ #Changes various default settings +#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..."; enter "frameworks/base"; sed -i '0,/wifi,cell,battery/s/wifi,cell,battery,dnd,flashlight,rotation,bt,airplane/wifi,cell,bt,dnd,flashlight,rotation,battery,profiles,location,airplane,saver,hotspot,nfc/' packages/SystemUI/res/values/config.xml; #Default quick tiles -#sed -i 's|config_longPressOnHomeBehavior">2|config_longPressOnHomeBehavior">0|' core/res/res/values/config.xml; #Set long press home to do nothing +#sed -i 's/config_longPressOnHomeBehavior">2/config_longPressOnHomeBehavior">3/' core/res/res/values/config.xml; #Set long press home to open search assistant #sed -i 's|config_doubleTapOnHomeBehavior">0|config_doubleTapOnHomeBehavior">8|' core/res/res/values/config.xml; #Set double tap home to switch to last app +sed -i 's/def_lock_screen_allow_private_notifications">true/def_lock_screen_allow_private_notifications">false/' packages/SettingsProvider/res/values/defaults.xml; +sed -i 's/def_lockscreen_sounds_enabled">1/def_lockscreen_sounds_enabled">0/' packages/SettingsProvider/res/values/defaults.xml; +sed -i 's/def_networks_available_notification_on">true/def_networks_available_notification_on">false' packages/SettingsProvider/res/values/defaults.xml; +sed -i 's/def_sound_effects_enabled">true/def_sound_effects_enabled">false/' packages/SettingsProvider/res/values/defaults.xml; +sed -i 's/def_window_animation_scale">100%/def_window_animation_scale">50%/' packages/SettingsProvider/res/values/defaults.xml; +sed -i 's/def_window_transition_scale">100%/def_window_transition_scale">50%/' packages/SettingsProvider/res/values/defaults.xml; enter "packages/apps/Dialer" sed -i 's/CMSettings.System.ENABLE_FORWARD_LOOKUP, 1)/CMSettings.System.ENABLE_FORWARD_LOOKUP, 0)/' src/com/android/dialer/*/LookupSettings*.java; #Disable FLP @@ -49,5 +59,17 @@ sed -i 's|drawer_compact_default">false|drawer_compact_default">true|' res/value sed -i 's|use_scroller_default">true|use_scroller_default">false|' res/values/preferences_defaults.xml; #Hide scroller sed -i 's|drawer_search_default">true|drawer_search_default">false|' res/values/preferences_defaults.xml; #Disable search +enter "vendor/cm"; +awk -i inplace '!/def_backup_transport/' overlay/common/frameworks/base/packages/SettingsProvider/res/values/defaults.xml; +sed -i 's/config_mms_user_agent">LineageOS/config_mms_user_agent">Android/' overlay/common/frameworks/base/core/res/res/values/config.xml; +sed -i 's/config_storage_manager_settings_enabled">true/config_storage_manager_settings_enabled">false/' overlay/common/packages/apps/Settings/res/values/config.xml; +sed -i 's/config_enableRecoveryUpdater">false/config_enableRecoveryUpdater">true/' overlay/common/packages/apps/Settings/res/values/config.xml; + +enter "vendor/cmsdk"; +sed -i 's/config_enableAppSuggestOverlay" translatable="false">true/config_enableAppSuggestOverlay" translatable="false">false/' cm/res/res/values/config.xml; +sed -i 's/def_forward_lookup">1/def_forward_lookup">0/' packages/CMSettingsProvider/res/values/defaults.xml; +sed -i 's/def_people_lookup">1/def_people_lookup">0/' packages/CMSettingsProvider/res/values/defaults.xml; +sed -i 's/def_reverse_lookup">1/def_reverse_lookup">0/' packages/CMSettingsProvider/res/values/defaults.xml; + cd $base; echo "Default settings changed!"; diff --git a/Scripts/LineageOS-15.1/Defaults.sh b/Scripts/LineageOS-15.1/Defaults.sh index 0055efe8..95451e69 100644 --- a/Scripts/LineageOS-15.1/Defaults.sh +++ b/Scripts/LineageOS-15.1/Defaults.sh @@ -17,12 +17,26 @@ #Changes various default settings +#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..."; +enter "lineage-sdk"; +sed -i 's/config_doubleTapOnHomeBehavior">0/config_doubleTapOnHomeBehavior">8/' lineage/res/res/values/config.xml; +sed -i 's/def_forward_lookup">1/def_forward_lookup">0/' packages/LineageSettingsProvider/res/values/defaults.xml; +sed -i 's/def_people_lookup">1/def_people_lookup">0/' packages/LineageSettingsProvider/res/values/defaults.xml; +sed -i 's/def_reverse_lookup">1/def_reverse_lookup">0/' packages/LineageSettingsProvider/res/values/defaults.xml; + enter "frameworks/base"; sed -i '0,/wifi,bt,dnd,flashlight/s/wifi,bt,dnd,flashlight,rotation,battery,cell,airplane,cast/wifi,cell,bt,dnd,flashlight,rotation,battery,sync,location,airplane,saver,hotspot,nfc/' packages/SystemUI/res/values/config.xml; #Default quick tiles -sed -i 's|config_longPressOnHomeBehavior">2|config_longPressOnHomeBehavior">3|' core/res/res/values/config.xml; #Set long press home to open search assistant -sed -i 's|config_doubleTapOnHomeBehavior">0|config_doubleTapOnHomeBehavior">8|' core/res/res/values/config.xml; #Set double tap home to switch to last app +sed -i 's/def_lock_screen_allow_private_notifications">true/def_lock_screen_allow_private_notifications">false/' packages/SettingsProvider/res/values/defaults.xml; +sed -i 's/def_lockscreen_sounds_enabled">1/def_lockscreen_sounds_enabled">0/' packages/SettingsProvider/res/values/defaults.xml; +sed -i 's/def_networks_available_notification_on">true/def_networks_available_notification_on">false' packages/SettingsProvider/res/values/defaults.xml; +sed -i 's/def_sound_effects_enabled">true/def_sound_effects_enabled">false/' packages/SettingsProvider/res/values/defaults.xml; +sed -i 's/def_window_animation_scale">100%/def_window_animation_scale">50%/' packages/SettingsProvider/res/values/defaults.xml; +sed -i 's/def_window_transition_scale">100%/def_window_transition_scale">50%/' packages/SettingsProvider/res/values/defaults.xml; enter "packages/apps/Dialer"; sed -i 's/LineageSettings.System.ENABLE_FORWARD_LOOKUP, 1)/LineageSettings.System.ENABLE_FORWARD_LOOKUP, 0)/' java/com/android/dialer/lookup/LookupSettings*.java; #Disable FLP @@ -30,9 +44,9 @@ sed -i 's/LineageSettings.System.ENABLE_PEOPLE_LOOKUP, 1)/LineageSettings.System sed -i 's/LineageSettings.System.ENABLE_REVERSE_LOOKUP, 1)/LineageSettings.System.ENABLE_REVERSE_LOOKUP, 0)/' java/com/android/dialer/lookup/LookupSettings*.java; #Disable RLP enter "packages/apps/FDroid"; -sed -i 's|DEFAULT_ROOTED = true;|DEFAULT_ROOTED = false;|' app/src/main/java/org/fdroid/fdroid/Preferences.java; #Hide root apps +sed -i 's/DEFAULT_ROOTED = true;/DEFAULT_ROOTED = false;/' app/src/main/java/org/fdroid/fdroid/Preferences.java; #Hide root apps sed -i '/string\/rooted/!b;n;s/defaultValue="true"/defaultValue="false"/' app/src/main/res/xml/preferences.xml; -sed -i 's|DEFAULT_HIDE_ANTI_FEATURE_APPS = false;|DEFAULT_HIDE_ANTI_FEATURE_APPS = true;|' app/src/main/java/org/fdroid/fdroid/Preferences.java; #Hide anti-feature apps +sed -i 's/DEFAULT_HIDE_ANTI_FEATURE_APPS = false;/DEFAULT_HIDE_ANTI_FEATURE_APPS = true;/' app/src/main/java/org/fdroid/fdroid/Preferences.java; #Hide anti-feature apps sed -i '/string\/hide_anti_feature_apps/!b;n;s/defaultValue="false"/defaultValue="true"/' app/src/main/res/xml/preferences.xml; enter "packages/apps/Nfc"; @@ -43,5 +57,12 @@ enter "packages/apps/Settings"; sed -i 's/Settings.Secure.INSTANT_APPS_ENABLED, 1/Settings.Secure.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 +enter "vendor/lineage"; +awk -i inplace '!/def_backup_transport/' overlay/common/frameworks/base/packages/SettingsProvider/res/values/defaults.xml; +sed -i 's/config_mms_user_agent">LineageOS/config_mms_user_agent">Android/' overlay/common/frameworks/base/core/res/res/values/config.xml; +sed -i 's/def_stats_collection">true/def_stats_collection">false/' overlay/common/lineage-sdk/packages/LineageSettingsProvider/res/values/defaults.xml; +sed -i 's/config_storage_manager_settings_enabled">true/config_storage_manager_settings_enabled">false/' overlay/common/packages/apps/Settings/res/values/config.xml; +sed -i 's/config_enableRecoveryUpdater">false/config_enableRecoveryUpdater">true/' overlay/common/packages/apps/Settings/res/values/config.xml; + cd $base; echo "Default settings changed!";