2018-02-12 04:50:18 +00:00
|
|
|
#!/bin/bash
|
|
|
|
#DivestOS: A privacy oriented Android distribution
|
2019-10-08 03:47:11 +00:00
|
|
|
#Copyright (c) 2017-2019 Divested Computing Group
|
2018-02-12 04:50:18 +00: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/>.
|
|
|
|
|
|
|
|
#Updates select user facing strings
|
2018-04-28 03:09:52 +00:00
|
|
|
#Last verified: 2018-04-27
|
2018-02-12 04:50:18 +00:00
|
|
|
|
2018-04-23 12:59:18 +00:00
|
|
|
echo "Rebranding...";
|
2018-02-12 04:50:18 +00:00
|
|
|
|
2018-04-23 12:59:18 +00:00
|
|
|
enter "bootable/recovery";
|
2020-01-09 02:22:35 +00:00
|
|
|
git revert --no-edit bc57208dfcd0958d03a00bbcf5345be6ceac9988 6ac3bb48f9d10e604d4b2d6c4152be9d35d17ea0;
|
2019-04-05 03:33:10 +00:00
|
|
|
patch -p1 < "$DOS_PATCHES_COMMON/android_bootable_recovery/0001-Remove_Logo.patch"; #Remove logo rendering code
|
2018-04-24 16:16:46 +00:00
|
|
|
rm res*/images/logo_image.png; #Remove logo images
|
2018-06-24 12:18:14 +00:00
|
|
|
mogrify -format png -fill "#FF5722" -opaque "#167C80" -fuzz 10% res-*/images/*sel.png; #Recolor icons
|
|
|
|
sed -i 's|grid_h \* 2 / 3|grid_h * 0.25|' screen_ui.cpp; #Center icons
|
2019-02-09 19:20:19 +00:00
|
|
|
sed -i 's|0x16, 0x7c, 0x80|0x03, 0xa9, 0xf4|' screen_ui.cpp; #Recolor text
|
2020-04-14 20:15:33 +00:00
|
|
|
sed -i 's|Android Recovery|'"$DOS_BRANDING_NAME"' Recovery|' ./*ui.cpp;
|
2018-06-29 04:55:21 +00:00
|
|
|
sed -i 's|LineageOS|'"$DOS_BRANDING_NAME"'|' ui.cpp;
|
2018-02-12 04:50:18 +00:00
|
|
|
|
2018-04-23 12:59:18 +00:00
|
|
|
enter "build/make";
|
2018-02-12 04:50:18 +00:00
|
|
|
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
|
|
|
|
|
2018-06-24 08:26:59 +00:00
|
|
|
enter "frameworks/base";
|
2018-06-29 04:55:21 +00:00
|
|
|
generateBootAnimationMask "$DOS_BRANDING_NAME" "$DOS_BRANDING_BOOTANIMATION_FONT" core/res/assets/images/android-logo-mask.png;
|
|
|
|
generateBootAnimationShine "$DOS_BRANDING_BOOTANIMATION_COLOR" "$DOS_BRANDING_BOOTANIMATION_STYLE" core/res/assets/images/android-logo-shine.png;
|
2018-06-24 08:26:59 +00:00
|
|
|
|
2018-04-23 12:59:18 +00:00
|
|
|
enter "lineage-sdk";
|
2018-06-29 04:55:21 +00:00
|
|
|
sed -i '/.*lineage_version/s/LineageOS/'"$DOS_BRANDING_NAME"'/' lineage/res/res/values*/strings.xml;
|
|
|
|
sed -i '/.*lineage_updates/s/LineageOS/'"$DOS_BRANDING_NAME"'/' lineage/res/res/values*/strings.xml;
|
|
|
|
sed -i '/.*lineageos_system_label/s/LineageOS/'"$DOS_BRANDING_NAME"'/' lineage/res/res/values*/strings.xml;
|
2018-04-03 13:10:49 +00:00
|
|
|
|
2018-04-23 12:59:18 +00:00
|
|
|
enter "packages/apps/LineageParts";
|
2020-10-31 14:49:54 +00:00
|
|
|
sed -i '/.*egg_title/s/LineageOS/'"$DOS_BRANDING_NAME"'/' res/values*/strings.xml;
|
|
|
|
sed -i '/.*lineageparts_title/s/LineageOS/'"$DOS_BRANDING_NAME"'/' res/values*/strings.xml;
|
|
|
|
sed -i '/.*privacy_settings_category/s/LineageOS/'"$DOS_BRANDING_NAME"'/' res/values*/strings.xml;
|
2018-06-29 04:55:21 +00:00
|
|
|
sed -i '/.*trust_feature_security_patches_explain/s/LineageOS/'"$DOS_BRANDING_NAME"'/' res/values*/strings.xml;
|
2018-04-22 06:41:18 +00:00
|
|
|
|
2018-04-23 12:59:18 +00:00
|
|
|
enter "packages/apps/Settings";
|
2018-06-29 04:55:21 +00:00
|
|
|
sed -i '/.*lineagelicense_title/s/LineageOS/'"$DOS_BRANDING_NAME"'/' res/values*/cm_strings.xml;
|
2018-02-12 04:50:18 +00:00
|
|
|
|
2018-04-23 12:59:18 +00:00
|
|
|
enter "packages/apps/SetupWizard";
|
2018-06-29 04:55:21 +00:00
|
|
|
sed -i 's|http://lineageos.org/legal|'"$DOS_BRANDING_LINK_PRIVACY"'|' src/org/lineageos/setupwizard/LineageSettingsActivity.java;
|
2020-10-31 14:49:54 +00:00
|
|
|
sed -i '/.*os_name/s/LineageOS/'"$DOS_BRANDING_NAME"'/' res/values*/strings.xml;
|
|
|
|
sed -i '/.*services/s/LineageOS/'"$DOS_BRANDING_NAME"'/' res/values*/strings.xml;
|
2018-06-29 04:55:21 +00:00
|
|
|
sed -i '/.*setup_services/s/LineageOS/'"$DOS_BRANDING_NAME"'/' res/values*/strings.xml;
|
2018-02-12 04:50:18 +00:00
|
|
|
|
2018-04-23 12:59:18 +00:00
|
|
|
enter "packages/apps/Updater";
|
2018-09-20 21:41:19 +00:00
|
|
|
sed -i 's|0OTA_SERVER_CLEARNET0|'"$DOS_BRANDING_SERVER_OTA"'|' src/org/lineageos/updater/misc/Utils.java;
|
|
|
|
sed -i 's|0OTA_SERVER_ONION0|'"$DOS_BRANDING_SERVER_OTA_ONION"'|' src/org/lineageos/updater/misc/Utils.java;
|
2018-06-29 04:55:21 +00:00
|
|
|
sed -i 's|>LineageOS|>'"$DOS_BRANDING_NAME"'|' res/values*/strings.xml;
|
2018-02-12 04:50:18 +00:00
|
|
|
|
2018-04-23 12:59:18 +00:00
|
|
|
enter "vendor/lineage";
|
2018-06-29 04:55:21 +00:00
|
|
|
sed -i 's|https://lineageos.org/legal|'"$DOS_BRANDING_LINK_ABOUT"'|' build/core/main_version.mk
|
|
|
|
sed -i '/.*ZIPPATH=/s/lineage/'"$DOS_BRANDING_ZIP_PREFIX"'/' build/envsetup.sh;
|
|
|
|
sed -i '/LINEAGE_TARGET_PACKAGE/s/lineage/'"$DOS_BRANDING_ZIP_PREFIX"'/' build/tasks/bacon.mk;
|
2018-06-24 08:26:59 +00:00
|
|
|
rm -rf bootanimation;
|
2018-02-12 04:50:18 +00:00
|
|
|
|
2018-06-29 04:55:21 +00:00
|
|
|
cd "$DOS_BUILD_BASE";
|
2018-04-23 12:59:18 +00:00
|
|
|
echo "Rebranding complete!";
|