action.yml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. name: add configs
  2. description: add configs and disabling securities
  3. inputs:
  4. branch:
  5. description: 'which device kernel'
  6. required: true
  7. runs:
  8. using: composite
  9. steps:
  10. - name: add mountify support
  11. shell: bash
  12. run: |
  13. cat >> "$GKI_DEFCONFIG" << 'EOF'
  14. # Mountify Support
  15. CONFIG_OVERLAY_FS=y
  16. CONFIG_TMPFS_XATTR=y
  17. CONFIG_TMPFS_POSIX_ACL=y
  18. EOF
  19. - name: increase log buffer size for showing bbg on ksu manager homepage
  20. shell: bash
  21. run: |
  22. cat >> "$GKI_DEFCONFIG" << 'EOF'
  23. # increase log buffer size to show bbg version in wksu homepage
  24. CONFIG_LOG_BUF_SHIFT=20
  25. EOF
  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 [[ ${{ inputs.branch }} == SM-S938B* || "${{ inputs.branch }}" == "SM-S931B-Oneui8" ]]; then
  32. echo "Nothing to see here, moving on..."
  33. elif [[ "${{ inputs.branch }}" == SM-S926B* ]]; then
  34. target_config="$COMMON/arch/arm64/configs/s5e9945-bazel_defconfig"
  35. elif [[ "${{ inputs.branch }}" == SM-A556* ]]; then
  36. target_config="$COMMON/arch/arm64/configs/s5e8845-bazel_defconfig"
  37. else
  38. target_config="$GKI_DEFCONFIG"
  39. fi
  40. # 2. Apply the nuke modifications exactly once if a target file was assigned
  41. if [ -n "$target_config" ]; then
  42. echo "Nuking Samsung Knox/Root protection in: $target_config"
  43. cat >> "$GKI_DEFCONFIG << EOF
  44. CONFIG_UH=n
  45. CONFIG_UH_RKP=n
  46. CONFIG_UH_LKMAUTH=n
  47. CONFIG_UH_LKM_BLOCK=n
  48. CONFIG_RKP_CFP_JOPP=n
  49. CONFIG_RKP_CFP_ROPP=n
  50. CONFIG_RKP_CFP=n
  51. CONFIG_SECURITY_DEFEX=n
  52. CONFIG_PROCA=n
  53. CONFIG_FIVE=n
  54. CONFIG_RKP=n
  55. CONFIG_KDP_NS=n
  56. CONFIG_KDP=n
  57. EOF
  58. fi
  59. - name: remove check_defconfig
  60. shell: bash
  61. run: |
  62. cd "$COMMON"
  63. # Remove check_defconfig
  64. sed -i 's/check_defconfig//' ./build.config.gki