2017-10-18 07:54:56 -04:00
|
|
|
#!/bin/bash
|
2017-11-05 10:58:01 -05:00
|
|
|
#DivestOS: A privacy oriented Android distribution
|
2019-06-18 13:49:01 -04:00
|
|
|
#Copyright (c) 2017-2018 Divested Computing Group
|
2017-11-05 10:58:01 -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-10-18 07:54:56 -04:00
|
|
|
|
|
|
|
#Updates select user facing strings
|
2018-04-27 23:49:40 -04:00
|
|
|
#Last verified: 2018-04-27
|
2017-10-18 07:54:56 -04:00
|
|
|
|
2018-04-23 08:59:18 -04:00
|
|
|
echo "Rebranding...";
|
2017-10-18 10:00:05 -04:00
|
|
|
|
2018-04-23 08:59:18 -04:00
|
|
|
enter "bootable/recovery";
|
2020-04-14 16:15:33 -04:00
|
|
|
sed -i 's|Android Recovery|'"$DOS_BRANDING_NAME"' Recovery|' ./*ui.cpp;
|
2017-11-10 12:23:07 -05:00
|
|
|
|
2018-04-23 08:59:18 -04:00
|
|
|
enter "build";
|
2017-10-19 19:19:26 -04: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-29 00:55:21 -04:00
|
|
|
sed -i '/CM_TARGET_PACKAGE/s/lineage/'"$DOS_BRANDING_ZIP_PREFIX"'/' core/Makefile;
|
2017-10-19 19:19:26 -04:00
|
|
|
|
2018-06-24 04:26:59 -04:00
|
|
|
enter "frameworks/base";
|
2018-06-29 00:55:21 -04: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 04:26:59 -04:00
|
|
|
|
2020-10-31 10:49:54 -04:00
|
|
|
enter "packages/apps/CMParts";
|
|
|
|
sed -i '/.*egg_title/s/LineageOS/'"$DOS_BRANDING_NAME"'/' res/values*/strings.xml;
|
|
|
|
sed -i '/.*cmparts_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-04-23 08:59:18 -04:00
|
|
|
enter "packages/apps/Settings";
|
2018-06-29 00:55:21 -04:00
|
|
|
sed -i '/.*cmlicense_title/s/LineageOS/'"$DOS_BRANDING_NAME"'/' res/values*/cm_strings.xml;
|
|
|
|
sed -i '/.*cmupdate_settings_title/s/LineageOS/'"$DOS_BRANDING_NAME"'/' res/values*/cm_strings.xml;
|
|
|
|
sed -i '/.*mod_version/s/LineageOS/'"$DOS_BRANDING_NAME"'/' res/values*/cm_strings.xml;
|
2017-10-18 07:54:56 -04:00
|
|
|
|
2018-04-23 08:59:18 -04:00
|
|
|
enter "packages/apps/SetupWizard";
|
2018-06-29 00:55:21 -04:00
|
|
|
sed -i 's|http://lineageos.org/legal|'"$DOS_BRANDING_LINK_PRIVACY"'|' src/com/cyanogenmod/setupwizard/LineageSettingsActivity.java;
|
2020-10-31 10:49:54 -04: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 00:55:21 -04:00
|
|
|
sed -i '/.*setup_services/s/LineageOS/'"$DOS_BRANDING_NAME"'/' res/values*/strings.xml;
|
2017-10-18 07:54:56 -04:00
|
|
|
|
2018-04-23 08:59:18 -04:00
|
|
|
enter "packages/apps/Updater";
|
2018-09-20 17:41:19 -04: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 00:55:21 -04:00
|
|
|
sed -i 's|>LineageOS|>'"$DOS_BRANDING_NAME"'|' res/values*/strings.xml;
|
2017-10-18 07:54:56 -04:00
|
|
|
|
2018-04-23 08:59:18 -04:00
|
|
|
enter "vendor/cm";
|
2018-06-29 00:55:21 -04:00
|
|
|
sed -i 's|https://lineageos.org/legal|'"$DOS_BRANDING_LINK_ABOUT"'|' config/common.mk;
|
|
|
|
sed -i '/.*ZIPPATH=/s/lineage/'"$DOS_BRANDING_ZIP_PREFIX"'/' build/envsetup.sh;
|
2018-06-24 04:26:59 -04:00
|
|
|
rm -rf bootanimation;
|
2017-10-18 10:00:05 -04:00
|
|
|
|
2018-06-29 00:55:21 -04:00
|
|
|
cd "$DOS_BUILD_BASE";
|
2018-04-23 08:59:18 -04:00
|
|
|
echo "Rebranding complete!";
|