vendorsetup.sh 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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_AAPT=1 # doesn't work
  39. export OF_VANILLA_BUILD=1
  40. export OF_DONT_PATCH_ON_FRESH_INSTALLATION=1
  41. export OF_SKIP_ORANGEFOX_PROCESS=1
  42. export OF_DISABLE_MIUI_SPECIFIC_FEATURES=1
  43. export FOX_USE_LZMA_COMPRESSION=1
  44. export FOX_USE_TWRP_RECOVERY_IMAGE_BUILDER=1
  45. export OF_USE_MAGISKBOOT=1
  46. export OF_USE_MAGISKBOOT_FOR_ALL_PATCHES=1
  47. export OF_FL_PATH1="/system/flashlight"
  48. export OF_FL_PATH2=""
  49. export OF_FLASHLIGHT_ENABLE=1
  50. export OF_USE_TWRP_SAR_DETECT=1
  51. export OF_DISABLE_KEYMASTER2=1
  52. export OF_LEGACY_SHAR512=1
  53. export OF_NO_TREBLE_COMPATIBILITY_CHECK=1
  54. export OF_DISABLE_EXTRA_ABOUT_PAGE=1 # Issues with 6.0 sources
  55. export OF_CHECK_OVERWRITE_ATTEMPTS=1
  56. export OF_SUPPORT_PRE_FLASH_SCRIPT=1
  57. export FOX_R11=1
  58. export FOX_ADVANCED_SECURITY=1
  59. export OF_QUICK_BACKUP_LIST="/boot;/data;/system;"
  60. # maximum permissible splash image size (in kilobytes); do *NOT* increase!
  61. export OF_SPLASH_MAX_SIZE=104
  62. # run a process after formatting data to work-around MTP issues
  63. export OF_RUN_POST_FORMAT_PROCESS=1
  64. # Naming stuff
  65. export FOX_VERSION="R11.1"
  66. export FOX_BUILD_TYPE="Beta"
  67. export TARGET_ARCH="arm"
  68. export OF_MAINTAINER="Yillié"
  69. # let's see what are our build VARs
  70. if [ -n "$FOX_BUILD_LOG_FILE" -a -f "$FOX_BUILD_LOG_FILE" ]; then
  71. export | grep "FOX" >> $FOX_BUILD_LOG_FILE
  72. export | grep "OF_" >> $FOX_BUILD_LOG_FILE
  73. export | grep "TARGET_" >> $FOX_BUILD_LOG_FILE
  74. export | grep "TW_" >> $FOX_BUILD_LOG_FILE
  75. fi
  76. fi
  77. add_lunch_combo omni_klte-eng
  78. add_lunch_combo omni_klte-userdebug