action.yml 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. name: add configs
  2. description: add configs and disabling securities
  3. inputs:
  4. kpm:
  5. description: 'kpm'
  6. required: true
  7. runs:
  8. using: composite
  9. steps:
  10. - name: add mountify support
  11. shell: bash
  12. run: |
  13. "$COMMON/scripts/config" --file "$GKI_DEFCONFIG" --enable CONFIG_OVERLAY_FS
  14. "$COMMON/scripts/config" --file "$GKI_DEFCONFIG" --enable CONFIG_TMPFS_XATTR
  15. "$COMMON/scripts/config" --file "$GKI_DEFCONFIG" --enable CONFIG_TMPFS_POSIX_ACL
  16. - name: enable KPM support
  17. if: inputs.kpm == 'true'
  18. shell: bash
  19. run: |
  20. "$COMMON/scripts/config" --file "$GKI_DEFCONFIG" --enable CONFIG_KALLSYMS
  21. "$COMMON/scripts/config" --file "$GKI_DEFCONFIG" --enable CONFIG_KALLSYMS_ALL
  22. "$COMMON/scripts/config" --file "$GKI_DEFCONFIG" --enable CONFIG_KALLSYMS_BASE_RELATIVE
  23. "$COMMON/scripts/config" --file "$GKI_DEFCONFIG" --enable CONFIG_KPM
  24. "$COMMON/scripts/config" --file "$GKI_DEFCONFIG" --enable CONFIG_RELOCATABLE
  25. "$COMMON/scripts/config" --file "$GKI_DEFCONFIG" --enable CONFIG_CFI_CLANG
  26. - name: nuke securities for root access
  27. shell: bash
  28. run: |
  29. # 1. Determine which defconfig file needs to be patched based on the branch
  30. target_config=""
  31. if [[ $BRANCH == SM-S938B* || "$BRANCH" == "SM-S931B-Oneui8" ]]; then
  32. echo "Nothing to see here, moving on..."
  33. elif [[ $BRANCH == SM-S926B* ]]; then
  34. target_config="$COMMON/arch/arm64/configs/s5e9945-bazel_defconfig"
  35. elif [[ $BRANCH == SM-A556* ]]; then
  36. target_config="$COMMON/arch/arm64/configs/s5e8845-bazel_defconfig"
  37. elif [[ $BRANCH == SM-A055* ]]; then
  38. target_config="$CONFIG/kernel/kernel_device_modules-6.6/arch/arm64/configs/mediatek-bazel_defconfig"
  39. elif [[ $BRANCH == SM-X926* ]]; then
  40. target_config="$CONFIG/kernel/kernel_device_modules-6.1/arch/arm64/configs/mediatek-bazel_defconfig"
  41. elif [[ $BRANCH == SM-A075* ]]; then
  42. target_config="$COMMON/arch/arm64/configs/a07_00_defconfig"
  43. else
  44. target_config="$GKI_DEFCONFIG"
  45. fi
  46. # 2. Apply the nuke modifications exactly once if a target file was assigned
  47. if [ -n "$target_config" ]; then
  48. echo "Nuking Samsung Knox/Root protection in: $target_config"
  49. "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_UH
  50. "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_UH_RKP
  51. "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_UH_LKMAUTH
  52. "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_UH_LKM_BLOCK
  53. "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_RKP
  54. "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_RKP_CFP_JOPP
  55. "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_RKP_CFP_ROPP
  56. "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_RKP_CFP
  57. "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_SECURITY_DEFEX
  58. "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_PROCA
  59. "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_FIVE
  60. "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_KDP
  61. "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_KDP_NS
  62. fi
  63. - name: remove check_defconfig
  64. shell: bash
  65. run: |
  66. cd "$COMMON"
  67. # Remove check_defconfig
  68. sed -i 's/check_defconfig//' ./build.config.gki