mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2025-05-02 06:26:20 -04:00
Remove n800
This commit is contained in:
parent
397ab78e21
commit
fe6e553cbb
12 changed files with 0 additions and 1135 deletions
|
@ -1,34 +0,0 @@
|
|||
#!/bin/bash
|
||||
#DivestOS: A privacy oriented Android distribution
|
||||
#Copyright (c) 2017 Spot Communications, Inc.
|
||||
#
|
||||
#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/>.
|
||||
|
||||
#Sets settings used by all other scripts
|
||||
|
||||
export androidWorkspace="/mnt/Drive-1/Development/Other/Android_ROMs/";
|
||||
export base=$androidWorkspace"Build/LineageOS-11.0/";
|
||||
|
||||
export patches=$androidWorkspace"Patches/LineageOS-11.0/";
|
||||
export cvePatches=$androidWorkspace"Patches/Linux_CVEs/";
|
||||
|
||||
export scripts=$androidWorkspace"Scripts/LineageOS-11.0/";
|
||||
export cveScripts=$scripts"CVE_Patchers/";
|
||||
|
||||
export ANDROID_HOME="/home/$USER/Android/Sdk";
|
||||
|
||||
export KBUILD_BUILD_USER=emy
|
||||
export KBUILD_BUILD_HOST=dosbm
|
||||
|
||||
export GRADLE_OPTS=-Xmx2048m
|
|
@ -1,77 +0,0 @@
|
|||
#!/bin/bash
|
||||
cd $base"kernel/zte/msm8930"
|
||||
git apply $cvePatches/CVE-2012-6657/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2012-6701/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2012-6704/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2013-2015/3.4/0.patch
|
||||
git apply $cvePatches/CVE-2014-1739/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2014-2523/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2014-4655/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2014-4656/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2014-7822/3.2-^3.16/0.patch
|
||||
git apply $cvePatches/CVE-2014-7970/3.4/2.patch
|
||||
git apply $cvePatches/CVE-2014-8173/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2014-8709/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2014-9420/3.2-^3.18/1.patch
|
||||
git apply $cvePatches/CVE-2014-9683/3.2-^3.18/1.patch
|
||||
git apply $cvePatches/CVE-2014-9715/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2014-9870/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2014-9900/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2015-1593/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2015-1805/3.4-^3.16/0.patch
|
||||
git apply $cvePatches/CVE-2015-2041/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2015-2686/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2015-3636/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2015-7515/3.2-^4.4/1.patch
|
||||
git apply $cvePatches/CVE-2015-7550/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2015-8937/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2015-8939/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2015-8944/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2016-0723/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2016-0774/ANY/1.patch
|
||||
git apply $cvePatches/CVE-2016-0821/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2016-10233/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2016-2185/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2016-2186/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2016-2384/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2016-2544/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2016-2545/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2016-2546/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2016-2547/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2016-2549/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2016-3138/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2016-3854/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2016-4569/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2016-4578/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2016-5195/3.4/0.patch
|
||||
git apply $cvePatches/CVE-2016-5829/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2016-6672/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2016-6753/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2016-6828/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2016-7915/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2016-8399/ANY/1.patch
|
||||
git apply $cvePatches/CVE-2016-8404/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2016-8406/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2016-8650/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2016-9604/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2016-9793/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2017-0403/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2017-0404/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2017-0648/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2017-0710/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2017-0751/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2017-0786/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2017-1000251/3.4/1.patch
|
||||
git apply $cvePatches/CVE-2017-13080/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2017-13080-Extra/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2017-13080-Extra/ANY/1.patch
|
||||
git apply $cvePatches/CVE-2017-15265/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2017-2671/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2017-5970/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2017-6074/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2017-6345/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2017-6348/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2017-6951/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2017-7487/ANY/0.patch
|
||||
git apply $cvePatches/CVE-2017-9242/ANY/0.patch
|
||||
cd $base
|
|
@ -1 +0,0 @@
|
|||
/home/spotcomms/Development/Other/Android_ROMs/Scripts/LineageOS-14.1/Deblob.sh
|
|
@ -1,104 +0,0 @@
|
|||
#!/bin/bash
|
||||
#DivestOS: A privacy oriented Android distribution
|
||||
#Copyright (c) 2017 Spot Communications, Inc.
|
||||
#
|
||||
#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/>.
|
||||
|
||||
#Delete Everything and Sync
|
||||
#repo forall -c 'git add -A && git reset --hard' && rm -rf out && repo sync -j20 --force-sync
|
||||
|
||||
#Apply all of our changes
|
||||
#source ../../Scripts/LineageOS-11.0/00init.sh && source $scripts/Patch.sh && source $scripts/Rebrand.sh && source $scripts/Deblob.sh && source $scripts/Patch_CVE.sh && source build/envsetup.sh
|
||||
|
||||
#Build!
|
||||
#brunch lineage_nex-userdebug
|
||||
|
||||
#
|
||||
#START OF PREPRATION
|
||||
#
|
||||
enter() {
|
||||
echo "================================================================================================"
|
||||
dir=$1;
|
||||
cd $base$dir;
|
||||
echo "[ENTERING] "$dir;
|
||||
git add -A && git reset --hard;
|
||||
}
|
||||
|
||||
enhanceLocation() {
|
||||
cd $base$1;
|
||||
#Enable GLONASS
|
||||
sed -i 's/#A_GLONASS_POS_PROTOCOL_SELECT/A_GLONASS_POS_PROTOCOL_SELECT/' gps.conf gps/gps.conf configs/gps.conf &>/dev/null || true;
|
||||
sed -i 's/A_GLONASS_POS_PROTOCOL_SELECT = 0.*/A_GLONASS_POS_PROTOCOL_SELECT = 15/' gps.conf gps/gps.conf configs/gps.conf &>/dev/null || true;
|
||||
sed -i 's|A_GLONASS_POS_PROTOCOL_SELECT=0.*</item>|A_GLONASS_POS_PROTOCOL_SELECT=15</item>|' overlay/frameworks/base/core/res/res/values-*/*.xml &>/dev/null || true;
|
||||
#Recommended reading: https://wwws.nightwatchcybersecurity.com/2016/12/05/cve-2016-5341/
|
||||
#XTRA: Only use specified URLs
|
||||
sed -i 's|XTRA_SERVER_QUERY=1|XTRA_SERVER_QUERY=0|' gps.conf gps/gps.conf configs/gps.conf &>/dev/null || true;
|
||||
sed -i 's|#XTRA_SERVER|XTRA_SERVER|' gps.conf gps/gps.conf configs/gps.conf &>/dev/null || true;
|
||||
#XTRA: Enable HTTPS
|
||||
sed -i 's|http://xtra|https://xtra|' overlay/frameworks/base/core/res/res/values-*/*.xml gps.conf gps/gps.conf configs/gps.conf &>/dev/null || true;
|
||||
#XTRA: Use format version 3 if possible
|
||||
if grep -sq "XTRA_VERSION_CHECK" gps.conf gps/gps.conf configs/gps.conf; then #Using hardware/qcom/gps OR precompiled blob OR device specific implementation
|
||||
sed -i 's|XTRA_VERSION_CHECK=0|XTRA_VERSION_CHECK=1|' gps.conf gps/gps.conf configs/gps.conf &>/dev/null || true;
|
||||
sed -i 's|xtra2.bin|xtra3grc.bin|' gps.conf gps/gps.conf configs/gps.conf &>/dev/null || true;
|
||||
elif grep -sq "BOARD_VENDOR_QCOM_LOC_PDK_FEATURE_SET := true" BoardConfig.mk boards/*gps.mk; then
|
||||
if ! grep -sq "USE_DEVICE_SPECIFIC_LOC_API := true" BoardConfig.mk boards/*gps.mk; then
|
||||
if ! grep -sq "libloc" *proprietary*.txt; then #Using hardware/qcom/gps
|
||||
sed -i 's|xtra2.bin|xtra3grc.bin|' gps.conf gps/gps.conf configs/gps.conf &>/dev/null || true;
|
||||
fi;
|
||||
fi;
|
||||
fi;
|
||||
echo "Enhanced location services for $1";
|
||||
cd $base;
|
||||
}
|
||||
export -f enhanceLocation;
|
||||
#
|
||||
#END OF PREPRATION
|
||||
#
|
||||
|
||||
#
|
||||
#START OF ROM CHANGES
|
||||
#
|
||||
enter "packages/apps/Settings"
|
||||
patch -p1 < $patches"android_packages_apps_Settings/0001-CMStats.patch"; #Remove CMStats
|
||||
|
||||
enter "vendor/cm"
|
||||
awk -i inplace '!/50-cm.sh/' config/common.mk; #Make sure our hosts is always used
|
||||
sed -i 's/CM_BUILDTYPE := UNOFFICIAL/CM_BUILDTYPE := dos/' config/common.mk; #Change buildtype
|
||||
#
|
||||
#END OF ROM CHANGES
|
||||
#
|
||||
|
||||
#
|
||||
#START OF DEVICE CHANGES
|
||||
#
|
||||
enter "device/zte/nex"
|
||||
patch -p1 < $patches"android_device_zte_nex/Fixes.patch"
|
||||
patch -p1 < $patches"android_device_zte_nex/Lower_DPI.patch"
|
||||
mv cm.mk lineage.mk
|
||||
sed -i 's/cm_/lineage_/' lineage.mk vendorsetup.sh
|
||||
#In nex-vendor-blobs.mk
|
||||
# "system/lib/libtime_genoff.so" -> "obj/lib/libtime_genoff.so"
|
||||
# Remove "WCNSS_qcom_wlan_nv2.bin"
|
||||
|
||||
enter "kernel/zte/msm8930"
|
||||
patch -p1 < $patches"android_kernel_zte_msm8930/MDP-Fix.patch"
|
||||
patch -p1 < $patches"android_kernel_zte_msm8930/Timeconst-Fix.patch"
|
||||
|
||||
#Make changes to all devices
|
||||
cd $base
|
||||
find "device" -maxdepth 2 -mindepth 2 -type d -exec bash -c 'enhanceLocation "$0"' {} \;
|
||||
cd $base
|
||||
#
|
||||
#END OF DEVICE CHANGES
|
||||
#
|
|
@ -1 +0,0 @@
|
|||
/home/spotcomms/Development/Other/Android_ROMs/Scripts/LineageOS-14.1/Patch_CVE.sh
|
|
@ -1,39 +0,0 @@
|
|||
#!/bin/bash
|
||||
#DivestOS: A privacy oriented Android distribution
|
||||
#Copyright (c) 2017 Spot Communications, Inc.
|
||||
#
|
||||
#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
|
||||
|
||||
echo "Rebranding..."
|
||||
|
||||
cd $base"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.host=`hostname`"|echo "ro.build.host=dosbm"|' tools/buildinfo.sh; #Override build host
|
||||
|
||||
cd $base"packages/apps/Settings"
|
||||
sed -i '/.*cmlicense_title/s/LineageOS/DivestOS/' res/values*/cm_strings.xml
|
||||
sed -i '/.*cmlicense_activity_title/s/LineageOS/DivestOS/' res/values*/cm_strings.xml
|
||||
sed -i '/.*cmupdate_settings_title/s/LineageOS/DivestOS/' res/values*/cm_strings.xml
|
||||
sed -i '/.*mod_version/s/LineageOS/DivestOS/' res/values*/cm_strings.xml
|
||||
sed -i '/.*privacy_settings_cyanogenmod_category/s/LineageOS/DivestOS/' res/values*/cm_strings.xml
|
||||
|
||||
cd $base"vendor/cm"
|
||||
sed -i 's|https://lineageos.org/legal|https://divestos.xyz/pages/about.html|' config/common.mk;
|
||||
#sed -i '/.*ZIPFILE=/s/lineage/divestos/' build/envsetup.sh
|
||||
rm -rf bootanimation #TODO: Create a boot animation
|
||||
|
||||
cd $base
|
||||
echo "Rebranding complete!"
|
Loading…
Add table
Add a link
Reference in a new issue