vendorsetup.sh 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. #
  2. # This file is part of the OrangeFox Recovery Project
  3. # Copyright (C) 2020-2021 The OrangeFox Recovery Project
  4. #
  5. # OrangeFox is free software: you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation, either version 3 of the License, or
  8. # any later version.
  9. #
  10. # OrangeFox is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. #
  15. # This software is released under GPL version 3 or any later version.
  16. # See <http://www.gnu.org/licenses/>.
  17. #
  18. # Please maintain this if you use this script or any part of it
  19. #
  20. FDEVICE="klte"
  21. #set -o xtrace
  22. fox_get_target_device() {
  23. local chkdev=$(echo "$BASH_SOURCE" | grep -w $FDEVICE)
  24. if [ -n "$chkdev" ]; then
  25. FOX_BUILD_DEVICE="$FDEVICE"
  26. else
  27. chkdev=$(set | grep BASH_ARGV | grep -w $FDEVICE)
  28. [ -n "$chkdev" ] && FOX_BUILD_DEVICE="$FDEVICE"
  29. fi
  30. }
  31. if [ -z "$1" -a -z "$FOX_BUILD_DEVICE" ]; then
  32. fox_get_target_device
  33. fi
  34. if [ "$1" = "$FDEVICE" -o "$FOX_BUILD_DEVICE" = "$FDEVICE" ]; then
  35. export ALLOW_MISSING_DEPENDENCIES=true
  36. export LC_ALL="C"
  37. export OF_USE_GREEN_LED=0 # Not for us
  38. export FOX_REMOVE_BASH=1 # Size problem
  39. export FOX_REMOVE_AAPT=1 # doesn't work
  40. export FOX_REMOVE_ZIP_BINARY=1 # Reduce recovery size amap
  41. export OF_VANILLA_BUILD=1
  42. export OF_DONT_PATCH_ON_FRESH_INSTALLATION=1
  43. export OF_SKIP_ORANGEFOX_PROCESS=1
  44. export OF_DISABLE_MIUI_SPECIFIC_FEATURES=1
  45. export FOX_USE_LZMA_COMPRESSION=1
  46. export FOX_USE_TWRP_RECOVERY_IMAGE_BUILDER=1
  47. export OF_USE_MAGISKBOOT=1
  48. export OF_USE_MAGISKBOOT_FOR_ALL_PATCHES=1
  49. export OF_USE_TWRP_SAR_DETECT=1
  50. export OF_DISABLE_KEYMASTER2=1
  51. export OF_LEGACY_SHAR512=1
  52. export OF_NO_TREBLE_COMPATIBILITY_CHECK=1
  53. export OF_DISABLE_EXTRA_ABOUT_PAGE=1 # Issues with 6.0 sources
  54. export OF_CHECK_OVERWRITE_ATTEMPTS=1
  55. export OF_SUPPORT_PRE_FLASH_SCRIPT=1
  56. export FOX_R11=1
  57. export FOX_ADVANCED_SECURITY=1
  58. export OF_QUICK_BACKUP_LIST="/boot;/data;/system;"
  59. # maximum permissible splash image size (in kilobytes); do *NOT* increase!
  60. export OF_SPLASH_MAX_SIZE=104
  61. # run a process after formatting data to work-around MTP issues
  62. export OF_RUN_POST_FORMAT_PROCESS=1
  63. # Naming stuff
  64. export FOX_VERSION="R11.1"
  65. export FOX_BUILD_TYPE="Beta"
  66. export TARGET_ARCH="arm"
  67. export OF_MAINTAINER="Yillié"
  68. # let's see what are our build VARs
  69. if [ -n "$FOX_BUILD_LOG_FILE" -a -f "$FOX_BUILD_LOG_FILE" ]; then
  70. export | grep "FOX" >> $FOX_BUILD_LOG_FILE
  71. export | grep "OF_" >> $FOX_BUILD_LOG_FILE
  72. export | grep "TARGET_" >> $FOX_BUILD_LOG_FILE
  73. export | grep "TW_" >> $FOX_BUILD_LOG_FILE
  74. fi
  75. fi
  76. add_lunch_combo omni_klte-eng
  77. add_lunch_combo omni_klte-userdebug