Allow rebrander to be configured from init.sh + misc changes

- Add caffeine to default quick tiles
This commit is contained in:
Tad 2018-06-22 23:41:08 -04:00
parent a0ce912d99
commit 9b156f7b66
7 changed files with 32 additions and 28 deletions

@ -1 +1 @@
Subproject commit dd837ba69a5226249c0b5b3cfc208050fba427bc Subproject commit ec413f9a73af36a99f2589f0b7d02df461ca8dfa

View File

@ -25,7 +25,7 @@
echo "Changing default settings..."; echo "Changing default settings...";
enter "frameworks/base"; 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 '0,/wifi,cell,battery/s/wifi,cell,battery,dnd,flashlight,rotation,bt,airplane/wifi,cell,bt,dnd,flashlight,rotation,battery,profiles,location,airplane,caffeine,saver,hotspot,nfc/' packages/SystemUI/res/values/config.xml; #Default quick tiles
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_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_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_networks_available_notification_on">true/def_networks_available_notification_on">false/' packages/SettingsProvider/res/values/defaults.xml;

View File

@ -21,30 +21,30 @@
echo "Rebranding..."; echo "Rebranding...";
enter "bootable/recovery"; enter "bootable/recovery";
sed -i 's|Android Recovery|DivestOS Recovery|' *_ui.cpp; sed -i 's|Android Recovery|'"$REBRAND_NAME"' Recovery|' *_ui.cpp;
enter "build"; enter "build";
sed -i 's|echo "ro.build.user=$USER"|echo "ro.build.user=emy"|' tools/buildinfo.sh; #Override build user sed -i 's|echo "ro.build.user=$USER"|echo "ro.build.user=emy"|' tools/buildinfo.sh; #Override build user
sed -i 's|echo "ro.build.host=`hostname`"|echo "ro.build.host=dosbm"|' tools/buildinfo.sh; #Override build host sed -i 's|echo "ro.build.host=`hostname`"|echo "ro.build.host=dosbm"|' tools/buildinfo.sh; #Override build host
sed -i '/CM_TARGET_PACKAGE/s/lineage/divested/' core/Makefile; sed -i '/CM_TARGET_PACKAGE/s/lineage/'"$REBRAND_ZIP_PREFIX"'/' core/Makefile;
enter "packages/apps/Settings"; enter "packages/apps/Settings";
sed -i '/.*cmlicense_title/s/LineageOS/DivestOS/' res/values*/cm_strings.xml; sed -i '/.*cmlicense_title/s/LineageOS/'"$REBRAND_NAME"'/' res/values*/cm_strings.xml;
sed -i '/.*cmupdate_settings_title/s/LineageOS/DivestOS/' res/values*/cm_strings.xml; sed -i '/.*cmupdate_settings_title/s/LineageOS/'"$REBRAND_NAME"'/' res/values*/cm_strings.xml;
sed -i '/.*mod_version/s/LineageOS/DivestOS/' res/values*/cm_strings.xml; sed -i '/.*mod_version/s/LineageOS/'"$REBRAND_NAME"'/' res/values*/cm_strings.xml;
enter "packages/apps/SetupWizard"; enter "packages/apps/SetupWizard";
sed -i 's|http://lineageos.org/legal|https://divestos.xyz/index.php?page=privacy_policy|' src/com/cyanogenmod/setupwizard/LineageSettingsActivity.java; sed -i 's|http://lineageos.org/legal|https://divestos.xyz/index.php?page=privacy_policy|' src/com/cyanogenmod/setupwizard/LineageSettingsActivity.java;
sed -i '/.*setup_services/s/LineageOS/DivestOS/' res/values*/strings.xml; sed -i '/.*setup_services/s/LineageOS/'"$REBRAND_NAME"'/' res/values*/strings.xml;
sed -i '/.*services_explanation/s/LineageOS/DivestOS/' res/values*/strings.xml; sed -i '/.*services_explanation/s/LineageOS/'"$REBRAND_NAME"'/' res/values*/strings.xml;
cp $patches"android_packages_apps_SetupWizard/logo.xml" "res/drawable/logo.xml"; #Replace Lineage logo with ours cp $patches"android_packages_apps_SetupWizard/logo.xml" "res/drawable/logo.xml"; #Replace Lineage logo with ours
enter "packages/apps/Updater"; enter "packages/apps/Updater";
sed -i 's|>LineageOS|>DivestOS|' res/values*/strings.xml; sed -i 's|>LineageOS|>'"$REBRAND_NAME"'|' res/values*/strings.xml;
enter "vendor/cm"; enter "vendor/cm";
sed -i 's|https://lineageos.org/legal|https://divestos.xyz/index.php?page=about|' config/common.mk; sed -i 's|https://lineageos.org/legal|'"$REBRAND_LEGAL"'|' config/common.mk;
sed -i '/.*ZIPPATH=/s/lineage/divested/' build/envsetup.sh; sed -i '/.*ZIPPATH=/s/lineage/'"$REBRAND_ZIP_PREFIX"'/' build/envsetup.sh;
rm -rf bootanimation #TODO: Create a boot animation rm -rf bootanimation #TODO: Create a boot animation
cd $base; cd $base;

View File

@ -32,7 +32,7 @@ sed -i 's/proximityCheckOnWakeEnabledByDefault">false/proximityCheckOnWakeEnable
#sed -i 's/VOLBTN_MUSIC_CONTROLS, 1/VOLBTN_MUSIC_CONTROLS, 0/' sdk/src/java/org/lineageos/internal/buttons/LineageButtons.java; #FIXME #sed -i 's/VOLBTN_MUSIC_CONTROLS, 1/VOLBTN_MUSIC_CONTROLS, 0/' sdk/src/java/org/lineageos/internal/buttons/LineageButtons.java; #FIXME
enter "frameworks/base"; 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 '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,caffeine,saver,hotspot,nfc/' packages/SystemUI/res/values/config.xml; #Default quick tiles
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_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_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_networks_available_notification_on">true/def_networks_available_notification_on">false/' packages/SettingsProvider/res/values/defaults.xml;

View File

@ -75,7 +75,6 @@ patchWorkspace() {
if [ "$MALWARE_SCAN_ENABLED" = true ]; then scanForMalware false "$prebuiltApps $base/build $base/device $base/vendor/lineage"; fi; if [ "$MALWARE_SCAN_ENABLED" = true ]; then scanForMalware false "$prebuiltApps $base/build $base/device $base/vendor/lineage"; fi;
source build/envsetup.sh; source build/envsetup.sh;
repopick -f 206123; #bionic: Sort and cache hosts file data for fast lookup
repopick -f 214824 209584 209585 215010 214300; #g3-common repopick -f 214824 209584 209585 215010 214300; #g3-common
repopick -f 211404 211405 211406 211407 211408 211409; #d852 repopick -f 211404 211405 211406 211407 211408 211409; #d852
repopick -f 211396 214817; #d855 repopick -f 211396 214817; #d855

View File

@ -21,40 +21,40 @@
echo "Rebranding..."; echo "Rebranding...";
enter "bootable/recovery"; enter "bootable/recovery";
git revert 6ac3bb48f9d10e604d4b2d6c4152be9d35d17ea0; git revert bc57208dfcd0958d03a00bbcf5345be6ceac9988 6ac3bb48f9d10e604d4b2d6c4152be9d35d17ea0;
patch -p1 < $patches"android_bootable_recovery/0001-Remove_Logo.patch"; #Remove logo rendering code patch -p1 < $patches"android_bootable_recovery/0001-Remove_Logo.patch"; #Remove logo rendering code
rm res*/images/logo_image.png; #Remove logo images rm res*/images/logo_image.png; #Remove logo images
sed -i 's|Android Recovery|DivestOS Recovery|' *_ui.cpp; sed -i 's|Android Recovery|'"$REBRAND_NAME"' Recovery|' *_ui.cpp;
sed -i 's|LineageOS|DivestOS|' ui.cpp; sed -i 's|LineageOS|'"$REBRAND_NAME"'|' ui.cpp;
enter "build/make"; enter "build/make";
sed -i 's|echo "ro.build.user=$USER"|echo "ro.build.user=emy"|' tools/buildinfo.sh; #Override build user sed -i 's|echo "ro.build.user=$USER"|echo "ro.build.user=emy"|' tools/buildinfo.sh; #Override build user
sed -i 's|echo "ro.build.host=`hostname`"|echo "ro.build.host=dosbm"|' tools/buildinfo.sh; #Override build host sed -i 's|echo "ro.build.host=`hostname`"|echo "ro.build.host=dosbm"|' tools/buildinfo.sh; #Override build host
enter "lineage-sdk"; enter "lineage-sdk";
sed -i '/.*lineage_version/s/LineageOS/DivestOS/' lineage/res/res/values*/strings.xml; sed -i '/.*lineage_version/s/LineageOS/'"$REBRAND_NAME"'/' lineage/res/res/values*/strings.xml;
sed -i '/.*lineage_updates/s/LineageOS/DivestOS/' lineage/res/res/values*/strings.xml; sed -i '/.*lineage_updates/s/LineageOS/'"$REBRAND_NAME"'/' lineage/res/res/values*/strings.xml;
sed -i '/.*lineageos_system_label/s/LineageOS/DivestOS/' lineage/res/res/values*/strings.xml; sed -i '/.*lineageos_system_label/s/LineageOS/'"$REBRAND_NAME"'/' lineage/res/res/values*/strings.xml;
enter "packages/apps/LineageParts"; enter "packages/apps/LineageParts";
sed -i '/.*trust_feature_security_patches_explain/s/LineageOS/DivestOS/' res/values*/strings.xml; sed -i '/.*trust_feature_security_patches_explain/s/LineageOS/'"$REBRAND_NAME"'/' res/values*/strings.xml;
enter "packages/apps/Settings"; enter "packages/apps/Settings";
sed -i '/.*lineagelicense_title/s/LineageOS/DivestOS/' res/values*/cm_strings.xml; sed -i '/.*lineagelicense_title/s/LineageOS/'"$REBRAND_NAME"'/' res/values*/cm_strings.xml;
enter "packages/apps/SetupWizard"; enter "packages/apps/SetupWizard";
sed -i 's|http://lineageos.org/legal|https://divestos.xyz/index.php?page=privacy_policy|' src/org/lineageos/setupwizard/LineageSettingsActivity.java; sed -i 's|http://lineageos.org/legal|https://divestos.xyz/index.php?page=privacy_policy|' src/org/lineageos/setupwizard/LineageSettingsActivity.java;
sed -i '/.*setup_services/s/LineageOS/DivestOS/' res/values*/strings.xml; sed -i '/.*setup_services/s/LineageOS/'"$REBRAND_NAME"'/' res/values*/strings.xml;
sed -i '/.*services_explanation/s/LineageOS/DivestOS/' res/values*/strings.xml; sed -i '/.*services_explanation/s/LineageOS/'"$REBRAND_NAME"'/' res/values*/strings.xml;
cp $patches"android_packages_apps_SetupWizard/logo.xml" "res/drawable/logo.xml"; #Replace Lineage logo with ours cp $patches"android_packages_apps_SetupWizard/logo.xml" "res/drawable/logo.xml"; #Replace Lineage logo with ours
enter "packages/apps/Updater"; enter "packages/apps/Updater";
sed -i 's|>LineageOS|>DivestOS|' res/values*/strings.xml; sed -i 's|>LineageOS|>'"$REBRAND_NAME"'|' res/values*/strings.xml;
enter "vendor/lineage"; enter "vendor/lineage";
sed -i 's|https://lineageos.org/legal|https://divestos.xyz/index.php?page=about|' build/core/main_version.mk sed -i 's|https://lineageos.org/legal|'"$REBRAND_LEGAL"'|' build/core/main_version.mk
sed -i '/.*ZIPPATH=/s/lineage/divested/' build/envsetup.sh; sed -i '/.*ZIPPATH=/s/lineage/'"$REBRAND_ZIP_PREFIX"'/' build/envsetup.sh;
sed -i '/LINEAGE_TARGET_PACKAGE/s/lineage/divested/' build/tasks/bacon.mk; sed -i '/LINEAGE_TARGET_PACKAGE/s/lineage/'"$REBRAND_ZIP_PREFIX"'/' build/tasks/bacon.mk;
rm -rf bootanimation; #TODO: Create a boot animation rm -rf bootanimation; #TODO: Create a boot animation
cd $base; cd $base;

View File

@ -31,6 +31,11 @@ export HOSTS_BLOCKING=true; #Switch to false to prevent inclusion of our HOSTS f
export OVERCLOCKS_ENABLED=true; #Switch to false to disable overclocks export OVERCLOCKS_ENABLED=true; #Switch to false to disable overclocks
export STRONG_ENCRYPTION_ENABLED=false; #Switch to true to enable AES-256bit encryption XXX: THIS WILL **DESTROY** EXISTING INSTALLS! export STRONG_ENCRYPTION_ENABLED=false; #Switch to true to enable AES-256bit encryption XXX: THIS WILL **DESTROY** EXISTING INSTALLS!
export NON_COMMERCIAL_USE_PATCHES=false; #Switch to false to prevent inclusion of non-commercial use patches export NON_COMMERCIAL_USE_PATCHES=false; #Switch to false to prevent inclusion of non-commercial use patches
#XXX: Changing the following rebranding variables only updates textual references
export REBRAND_NAME="DivestOS";
export REBRAND_ZIP_PREFIX="divested";
export REBRAND_LEGAL="https://divestos.xyz/index.php?page=privacy_policy";
#END OF USER CONFIGURABLE OPTIONS #END OF USER CONFIGURABLE OPTIONS
BUILD_WORKING_DIR=${PWD##*/}; BUILD_WORKING_DIR=${PWD##*/};