2017-10-29 01:48:53 -04:00
#!/bin/bash
2017-11-05 10:58:01 -05:00
#DivestOS: A privacy oriented Android distribution
2018-06-03 14:13:59 -04:00
#Copyright (c) 2017-2018 Divested Computing, Inc.
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-29 01:48:53 -04:00
#Sets settings used by all other scripts
2018-06-02 17:51:18 -04:00
#START OF USER CONFIGURABLE OPTIONS
2018-06-29 00:55:21 -04:00
export DOS_WORKSPACE_ROOT = "/mnt/Drive-3/" ; #XXX: THIS MUST BE CORRECT TO BUILD!
export DOS_SIGNING_KEYS = $DOS_WORKSPACE_ROOT "Signing_Keys" ;
#export DOS_PATCHER_BINARY="";
export ANDROID_HOME = " /home/ $USER /Android/Sdk " ;
2018-06-30 14:49:22 -04:00
export DOS_DEBLOBBER_REMOVE_ACCESSORIES = true; #Set false to allow use of external accessories
2018-06-29 00:55:21 -04:00
export DOS_DEBLOBBER_REMOVE_AUDIOFX = true; #Set true to remove AudioFX
2018-06-30 19:52:46 -04:00
export DOS_DEBLOBBER_REMOVE_GRAPHICS = false; #Set true to remove all graphics blobs and use SwiftShader CPU renderer
2018-06-30 14:49:22 -04:00
export DOS_DEBLOBBER_REMOVE_FP = false; #Set true to remove all fingerprint reader blobs
2018-06-29 00:55:21 -04:00
export DOS_DEBLOBBER_REMOVE_IMS = false; #Set true to remove all IMS blobs
2018-06-30 14:49:22 -04:00
export DOS_DEBLOBBER_REMOVE_IR = false; #Set true to remove all IR blobs
2018-06-29 00:55:21 -04:00
export DOS_DEBLOBBER_REPLACE_TIME = false; #Set true to replace Qualcomm Time Services with the open source Sony TimeKeep reimplementation
export DOS_DEFAULT_DNS_PRESET = "OpenNIC" ; #Sets default DNS. Options: Cloudflare, OpenNIC, DNSWATCH, Google, OpenDNS, Quad9, Quad9U, Verisign
export DOS_GLONASS_FORCED_ENABLE = true; #Enables GLONASS on all devices
export DOS_MALWARE_SCAN_ENABLED = true; #Set true to perform a fast scan on patchWorkspace() and a through scan on buildAll()
export DOS_MALWARE_SCAN_SETTING = "quick" ; #buildAll() scan speed. Options: quick, extra, slow, full
export DOS_MICROG_INCLUDED = "NLP" ; #Determines inclusion of microG. Options: NONE, NLP, FULL
export DOS_HOSTS_BLOCKING = true; #Switch to false to prevent inclusion of our HOSTS file
export DOS_HOSTS_BLOCKING_LIST = "https://spotco.us/hosts" ; #Must be in the format "127.0.0.0 bad.domain.tld". XXX: /hosts is built from non-commercial use files, switch to /hsc for release
export DOS_OVERCLOCKS_ENABLED = true; #Switch to false to disable overclocks
export DOS_STRONG_ENCRYPTION_ENABLED = false; #Switch to true to enable AES-256bit encryption XXX: THIS WILL **DESTROY** EXISTING INSTALLS!
export DOS_NON_COMMERCIAL_USE_PATCHES = false; #Switch to false to prevent inclusion of non-commercial use patches
2018-06-02 17:56:21 -04:00
2018-06-29 00:55:21 -04:00
export DOS_BRANDING_NAME = "DivestOS" ;
export DOS_BRANDING_ZIP_PREFIX = "divested" ;
export DOS_BRANDING_BOOTANIMATION_FONT = "Fira-Sans-Bold" ; #Options: $ convert -list font
export DOS_BRANDING_BOOTANIMATION_STYLE = "plasma" ; #Options: gradient, plasma
#export DOS_BRANDING_BOOTANIMATION_COLOR="#FF5722-#FF8A65"; #gradient
export DOS_BRANDING_BOOTANIMATION_COLOR = "#FF5722-#03A9F4" ; #plasma
export DOS_BRANDING_LINK_ABOUT = "https://divestos.xyz/index.php?page=about" ;
export DOS_BRANDING_LINK_PRIVACY = "https://divestos.xyz/index.php?page=privacy_policy" ;
export DOS_BRANDING_SERVER_OTA = "https://divestos.xyz/updater.php" ;
2018-06-22 23:41:08 -04:00
2018-06-29 00:55:21 -04:00
export DOS_THEME_50 = "FFCA28" ; #Amber 400
export DOS_THEME_100 = "FFC107" ; #Amber 500
export DOS_THEME_200 = "FFA726" ; #Orange 400
export DOS_THEME_300 = "FF9800" ; #Orange 500
export DOS_THEME_500 = "FF5722" ; #Deep Orange 500
export DOS_THEME_700 = "E64A19" ; #Deep Orange 700
2018-06-02 17:51:18 -04:00
#END OF USER CONFIGURABLE OPTIONS
BUILD_WORKING_DIR = ${ PWD ##*/ } ;
2018-06-03 08:02:43 -04:00
if [ -d ".repo" ] ; then
echo " Detected $BUILD_WORKING_DIR " ;
else
echo "Not a valid workspace!" ;
return 1;
fi ;
2017-10-29 01:48:53 -04:00
2018-06-29 00:55:21 -04:00
export DOS_BUILD_BASE = $DOS_WORKSPACE_ROOT " Build/ $BUILD_WORKING_DIR / " ;
if [ ! -d " $DOS_BUILD_BASE " ] ; then
2018-06-03 08:02:43 -04:00
echo "Path mismatch! Please update init.sh!" ;
return 1;
fi ;
2017-11-05 14:30:15 -05:00
2018-06-29 00:55:21 -04:00
export DOS_PREBUILT_APPS = $DOS_WORKSPACE_ROOT "PrebuiltApps/" ;
export DOS_PATCHES_COMMON = $DOS_WORKSPACE_ROOT "Patches/Common/" ;
export DOS_PATCHES = $DOS_WORKSPACE_ROOT " Patches/ $BUILD_WORKING_DIR / " ;
export DOS_PATCHES_OVERCLOCKS = $DOS_WORKSPACE_ROOT "Patches/Overclocks/" ;
export DOS_PATCHES_LINUX_CVES = $DOS_WORKSPACE_ROOT "Patches/Linux/" ;
export DOS_WALLPAPERS = $DOS_WORKSPACE_ROOT "Patches/Wallpapers/" ;
2017-10-29 01:48:53 -04:00
2018-06-29 00:55:21 -04:00
export DOS_SCRIPTS_COMMON = $DOS_WORKSPACE_ROOT "Scripts/Common/" ;
export DOS_SCRIPTS = $DOS_WORKSPACE_ROOT " Scripts/ $BUILD_WORKING_DIR / " ;
if [ ! -d " $DOS_SCRIPTS " ] ; then
2018-06-03 08:02:43 -04:00
echo " $BUILD_WORKING_DIR is not supported! " ;
return 1;
fi ;
2018-06-29 00:55:21 -04:00
export DOS_SCRIPTS_CVES = $DOS_SCRIPTS "CVE_Patchers/" ;
2017-10-29 01:48:53 -04:00
2018-06-29 00:55:21 -04:00
export SIGNING_KEY_DIR = $DOS_SIGNING_KEYS ;
2018-06-03 08:24:23 -04:00
export OTA_PACKAGE_SIGNING_KEY = $SIGNING_KEY_DIR "/releasekey" ;
2018-04-23 08:59:18 -04:00
export KBUILD_BUILD_USER = "emy" ;
export KBUILD_BUILD_HOST = "dosbm" ;
2017-10-29 01:48:53 -04:00
2018-04-23 08:43:28 -04:00
export ANDROID_JACK_VM_ARGS = "-Xmx6144m -Xms512m -Dfile.encoding=UTF-8 -XX:+TieredCompilation" ;
export JACK_SERVER_VM_ARGUMENTS = " ${ ANDROID_JACK_VM_ARGS } " ;
2018-04-23 08:59:18 -04:00
export GRADLE_OPTS = "-Xmx2048m" ;
2018-04-28 03:16:35 -04:00
export LC_ALL = C;
2018-06-29 00:55:21 -04:00
source " $DOS_SCRIPTS_COMMON /Functions.sh " ;
source " $DOS_SCRIPTS /Functions.sh " ;
2018-06-25 10:16:32 -04:00
unalias cp & >/dev/null || true;
unalias mv & >/dev/null || true;
unalias rm & >/dev/null || true;
unalias ln & >/dev/null || true;