vendorsetup.sh 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. # This file is part of the OrangeFox Recovery Project
  2. # Copyright (C) 2021-2024 The OrangeFox Recovery Project
  3. # Copyright (C) 2024 The Android Open Source 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. # SPDX-License-Identifier: Apache-2.0
  10. #
  11. # OrangeFox is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU General Public License for more details.
  15. #
  16. # This software is released under GPL version 3 or any later version.
  17. # See <http://www.gnu.org/licenses/>.
  18. #
  19. # Please maintain this if you use this script or any part of it
  20. #
  21. FDEVICE="cap_sprout"
  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. # Fox-specific flags
  36. export OF_QUICK_BACKUP_LIST="/boot;/data;/super;"
  37. ##export FOX_RECOVERY_INSTALL_PARTITION="/dev/block/bootdevice/by-name/recovery_a"
  38. # OrangeFox Addons
  39. export FOX_ENABLE_APP_MANAGER=1
  40. export OF_NO_TREBLE_COMPATIBILITY_CHECK=1
  41. # Binaries & Tools
  42. export FOX_USE_BASH_SHELL=1
  43. export FOX_ASH_IS_BASH=1
  44. export FOX_USE_NANO_EDITOR=1
  45. export FOX_USE_TAR_BINARY=1
  46. export FOX_USE_SED_BINARY=1
  47. export FOX_USE_XZ_UTILS=1
  48. export OF_ENABLE_LPTOOLS=1
  49. ##export FOX_REPLACE_BUSYBOX_PS=1
  50. # Version & Variant
  51. export FOX_VERSION="R11.1"
  52. export FOX_VARIANT="A14"
  53. export FOX_BUILD_TYPE="Stable"
  54. # A/B partitioning
  55. export FOX_AB_DEVICE=1
  56. ##export FOX_VIRTUAL_AB_DEVICE=1
  57. export OF_AB_DEVICE_WITH_RECOVERY_PARTITION=1
  58. # Flashlight & LEDs
  59. export OF_USE_GREEN_LED=1
  60. export OF_CLASSIC_LEDS_FUNCTION=1
  61. # Store settings at /data/recovery instead of internal storage
  62. ##export FOX_USE_DATA_RECOVERY_FOR_SETTINGS=1
  63. # Security (Disables MTP&ADB during password prompt)
  64. export OF_ADVANCED_SECURITY=1
  65. export OF_DONT_PATCH_ENCRYPTED_DEVICE=1
  66. export OF_NO_RELOAD_AFTER_DECRYPTION=1
  67. # Screen settings
  68. export OF_SCREEN_H="2400"
  69. ##export OF_STATUS_H="80"
  70. export OF_STATUS_INDENT_LEFT=40
  71. export OF_STATUS_INDENT_RIGHT=40
  72. ##export OF_HIDE_NOTCH=1
  73. ##export OF_CLOCK_POS=1 # Left & Right
  74. export OF_ALLOW_DISABLE_NAVBAR=0
  75. # Maximum permissible splash image size (in kilobytes); do *NOT* increase!
  76. export OF_SPLASH_MAX_SIZE=130
  77. # use system (ROM) fingerprint where available
  78. ##export OF_USE_SYSTEM_FINGERPRINT="1"
  79. # Debugging
  80. ##export FOX_RESET_SETTINGS=0
  81. ##export FOX_INSTALLER_DEBUG_MODE=1
  82. # Other..
  83. export TW_DEFAULT_LANGUAGE="en"
  84. export LC_ALL="C"
  85. # run a process after formatting data to work-around MTP issues
  86. ##export OF_RUN_POST_FORMAT_PROCESS=1
  87. # Custom pic for maintainers about section info
  88. # Image should be 32 bit PNG 192 x 192 px - Size of image should be as small as possible 50kb
  89. export OF_MAINTAINER_AVATAR="/device/nokia/cap_sprout/author.png"
  90. export OF_MAINTAINER="Samuel Kendall"
  91. # Let's see our build VARs ZZZ
  92. if [ -n "$FOX_BUILD_LOG_FILE" -a -f "$FOX_BUILD_LOG_FILE" ]; then
  93. export | grep "FOX" >> $FOX_BUILD_LOG_FILE
  94. export | grep "OF_" >> $FOX_BUILD_LOG_FILE
  95. export | grep "TARGET_" >> $FOX_BUILD_LOG_FILE
  96. export | grep "TW_" >> $FOX_BUILD_LOG_FILE
  97. fi
  98. fi
  99. # Reserved