2017-10-29 05:48:53 +00:00
#!/bin/bash
2017-11-05 15:58:01 +00:00
#DivestOS: A privacy oriented Android distribution
2018-06-03 18:13:59 +00:00
#Copyright (c) 2017-2018 Divested Computing, Inc.
2017-11-05 15:58:01 +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/>.
2017-10-29 05:48:53 +00:00
#Sets settings used by all other scripts
2018-06-02 21:51:18 +00:00
#START OF USER CONFIGURABLE OPTIONS
2018-06-02 21:56:21 +00:00
export androidWorkspace = "/mnt/Drive-3/" ; #XXX: THIS MUST BE CORRECT TO BUILD!
2018-06-25 11:59:24 +00:00
export DEBLOBBER_REMOVE_AUDIOFX = true; #Set true to remove AudioFX
2018-06-13 11:07:47 +00:00
export DEBLOBBER_REMOVE_IMS = false; #Set true to remove all IMS blobs
2018-06-13 11:23:59 +00:00
export DEBLOBBER_REPLACE_TIME = false; #Set true to replace Qualcomm Time Services with the open source Sony TimeKeep reimplementation
2018-06-25 23:15:22 +00:00
export DEFAULT_DNS_PRESET = "OpenNIC" ; #Sets default DNS. Options: Cloudflare, OpenNIC, DNSWATCH, Google, OpenDNS, Quad9, Quad9U, Verisign
2018-06-05 04:35:42 +00:00
export GLONASS_FORCED_ENABLE = true; #Enables GLONASS on all devices
2018-06-02 21:51:18 +00:00
export MALWARE_SCAN_ENABLED = true; #Set true to perform a fast scan on patchWorkspace() and a through scan on buildAll()
2018-06-03 18:13:59 +00:00
export MALWARE_SCAN_SETTING = "quick" ; #buildAll() scan speed. Options: quick, extra, slow, full
2018-06-25 13:31:31 +00:00
export MICROG_INCLUDED = "NLP" ; #Determines inclusion of microG. Options: NONE, NLP, FULL
2018-06-02 21:56:21 +00:00
export HOSTS_BLOCKING = true; #Switch to false to prevent inclusion of our HOSTS file
2018-06-29 03:17:59 +00:00
export 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
2018-06-03 11:48:34 +00:00
export OVERCLOCKS_ENABLED = true; #Switch to false to disable overclocks
2018-06-02 22:28:40 +00:00
export STRONG_ENCRYPTION_ENABLED = false; #Switch to true to enable AES-256bit encryption XXX: THIS WILL **DESTROY** EXISTING INSTALLS!
2018-06-02 21:56:21 +00:00
export NON_COMMERCIAL_USE_PATCHES = false; #Switch to false to prevent inclusion of non-commercial use patches
2018-06-23 03:41:08 +00:00
export REBRAND_NAME = "DivestOS" ;
export REBRAND_ZIP_PREFIX = "divested" ;
2018-06-24 09:26:03 +00:00
export REBRAND_BOOTANIMATION_FONT = "Fira-Sans-Bold" ; #Options: $ convert -list font
2018-06-25 13:34:50 +00:00
export REBRAND_BOOTANIMATION_STYLE = "plasma" ; #Options: gradient, plasma
2018-06-25 11:59:24 +00:00
#export REBRAND_BOOTANIMATION_COLOR="#FF5722-#FF8A65"; #gradient
export REBRAND_BOOTANIMATION_COLOR = "#FF5722-#03A9F4" ; #plasma
2018-06-27 01:47:45 +00:00
export REBRAND_LINK_ABOUT = "https://divestos.xyz/index.php?page=about" ;
export REBRAND_LINK_PRIVACY = "https://divestos.xyz/index.php?page=privacy_policy" ;
2018-06-27 16:04:42 +00:00
export REBRAND_SERVER_OTA = "https://divestos.xyz/updater.php" ;
2018-06-02 21:51:18 +00:00
#END OF USER CONFIGURABLE OPTIONS
BUILD_WORKING_DIR = ${ PWD ##*/ } ;
2018-06-03 12:02:43 +00:00
if [ -d ".repo" ] ; then
echo " Detected $BUILD_WORKING_DIR " ;
else
echo "Not a valid workspace!" ;
return 1;
fi ;
2017-10-29 05:48:53 +00:00
2018-06-02 21:51:18 +00:00
export base = $androidWorkspace " Build/ $BUILD_WORKING_DIR / " ;
2018-06-23 04:21:48 +00:00
if [ ! -d " $base " ] ; then
2018-06-03 12:02:43 +00:00
echo "Path mismatch! Please update init.sh!" ;
return 1;
fi ;
2017-11-05 19:30:15 +00:00
2018-03-14 03:07:41 +00:00
export prebuiltApps = $androidWorkspace "PrebuiltApps/" ;
2018-06-25 11:59:24 +00:00
export patchesCommon = $androidWorkspace "Patches/Common/" ;
2018-06-02 21:51:18 +00:00
export patches = $androidWorkspace " Patches/ $BUILD_WORKING_DIR / " ;
2018-06-27 13:17:50 +00:00
export overclocks = $androidWorkspace "Patches/Overclocks/" ;
2017-12-08 23:59:55 +00:00
export cvePatchesLinux = $androidWorkspace "Patches/Linux/" ;
export cvePatchesAndroid = $androidWorkspace "Patches/Android/" ;
2017-11-28 17:28:55 +00:00
export dosWallpapers = $androidWorkspace "Patches/Wallpapers/" ;
2017-10-29 05:48:53 +00:00
2018-04-04 11:52:11 +00:00
export scriptsCommon = $androidWorkspace "Scripts/Common/" ;
2018-06-02 21:51:18 +00:00
export scripts = $androidWorkspace " Scripts/ $BUILD_WORKING_DIR / " ;
2018-06-23 04:21:48 +00:00
if [ ! -d " $scripts " ] ; then
2018-06-03 12:02:43 +00:00
echo " $BUILD_WORKING_DIR is not supported! " ;
return 1;
fi ;
2017-10-30 05:30:10 +00:00
export cveScripts = $scripts "CVE_Patchers/" ;
2017-10-29 05:48:53 +00:00
2018-06-03 12:24:23 +00:00
export SIGNING_KEY_DIR = $androidWorkspace "Signing_Keys" ;
export OTA_PACKAGE_SIGNING_KEY = $SIGNING_KEY_DIR "/releasekey" ;
2017-10-30 05:30:10 +00:00
export ANDROID_HOME = " /home/ $USER /Android/Sdk " ;
2017-10-29 05:48:53 +00:00
2018-04-23 12:59:18 +00:00
export KBUILD_BUILD_USER = "emy" ;
export KBUILD_BUILD_HOST = "dosbm" ;
2017-10-29 05:48:53 +00:00
2018-04-23 12:43:28 +00: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 12:59:18 +00:00
export GRADLE_OPTS = "-Xmx2048m" ;
2017-12-09 06:15:16 +00:00
2018-06-23 04:21:48 +00:00
source " $scriptsCommon /Functions.sh " ;
source " $scripts /Functions.sh " ;
2018-01-20 12:36:08 +00:00
2018-04-28 07:16:35 +00:00
export LC_ALL = C;
2018-06-25 14:16:32 +00:00
unalias cp & >/dev/null || true;
unalias mv & >/dev/null || true;
unalias rm & >/dev/null || true;
unalias ln & >/dev/null || true;