action.yml 3.1 KB

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