Skip to content

Commit

Permalink
cas: Add vendorsetup.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
XayahSuSuSu committed Oct 24, 2022
1 parent 7192fb8 commit 2cc8ad2
Showing 1 changed file with 91 additions and 0 deletions.
91 changes: 91 additions & 0 deletions vendorsetup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
#
# This file is part of the OrangeFox Recovery Project
# Copyright (C) 2021 The OrangeFox Recovery Project
#
# OrangeFox 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
# any later version.
#
# OrangeFox 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.
#
# This software is released under GPL version 3 or any later version.
# See <http://www.gnu.org/licenses/>.
#
# Please maintain this if you use this script or any part of it
#
FDEVICE="cas"
#set -o xtrace

fox_get_target_device() {
local chkdev=$(echo "$BASH_SOURCE" | grep -w $FDEVICE)
if [ -n "$chkdev" ]; then
FOX_BUILD_DEVICE="$FDEVICE"
else
chkdev=$(set | grep BASH_ARGV | grep -w $FDEVICE)
[ -n "$chkdev" ] && FOX_BUILD_DEVICE="$FDEVICE"
fi
}

if [ -z "$1" -a -z "$FOX_BUILD_DEVICE" ]; then
fox_get_target_device
fi

if [ "$1" = "$FDEVICE" -o "$FOX_BUILD_DEVICE" = "$FDEVICE" ]; then
export TW_DEFAULT_LANGUAGE="en"
export LC_ALL="C"
export ALLOW_MISSING_DEPENDENCIES=true
export OF_USE_GREEN_LED=0
export OF_FBE_METADATA_MOUNT_IGNORE=1
export FOX_USE_TWRP_RECOVERY_IMAGE_BUILDER=1

export OF_USE_MAGISKBOOT=1
export OF_USE_NEW_MAGISKBOOT=1
export OF_USE_MAGISKBOOT_FOR_ALL_PATCHES=1
export FOX_USE_TWRP_RECOVERY_IMAGE_BUILDER=1
export OF_NO_TREBLE_COMPATIBILITY_CHECK=1
export OF_NO_MIUI_PATCH_WARNING=1
export FOX_USE_BASH_SHELL=1
export FOX_ASH_IS_BASH=1
export FOX_USE_TAR_BINARY=1
export FOX_USE_SED_BINARY=1
export FOX_USE_XZ_UTILS=1
export OF_SKIP_MULTIUSER_FOLDERS_BACKUP=1
export OF_QUICK_BACKUP_LIST="/boot;/dtbo;"
export OF_PATCH_AVB20=1

# OTA
export OF_KEEP_DM_VERITY=1
export OF_SUPPORT_ALL_BLOCK_OTA_UPDATES=1
export OF_FIX_OTA_UPDATE_MANUAL_FLASH_ERROR=1
export OF_DISABLE_MIUI_OTA_BY_DEFAULT=1

# Screen Settings
export OF_SCREEN_H=2340
export OF_STATUS_H=110
export OF_STATUS_INDENT_LEFT=48
export OF_STATUS_INDENT_RIGHT=48
export OF_CLOCK_POS=0
export OF_HIDE_NOTCH=1
export OF_ALLOW_DISABLE_NAVBAR=0

# R11.1 Settings
export FOX_VERSION="R12.1"
export OF_MAINTAINER="Xayah"
export FOX_BUILD_TYPE="Beta"

# Run a Process after Formatting Data to Work-Around MTP Issues
export OF_RUN_POST_FORMAT_PROCESS=1

# let's see what are our build VARs
if [ -n "$FOX_BUILD_LOG_FILE" -a -f "$FOX_BUILD_LOG_FILE" ]; then
export | grep "FOX" >> $FOX_BUILD_LOG_FILE
export | grep "OF_" >> $FOX_BUILD_LOG_FILE
export | grep "TARGET_" >> $FOX_BUILD_LOG_FILE
export | grep "TW_" >> $FOX_BUILD_LOG_FILE
fi
fi
#

0 comments on commit 2cc8ad2

Please sign in to comment.