action.yml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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: nuke securities for root access
  20. shell: bash
  21. run: |
  22. # 1. Determine which defconfig file needs to be patched based on the branch
  23. target_config=""
  24. if [[ ${{ inputs.branch }} == SM-S938B* || "${{ inputs.branch }}" == "SM-S931B-Oneui8" ]]; then
  25. echo "Nothing to see here, moving on..."
  26. elif [[ "${{ inputs.branch }}" == SM-S926B* ]]; then
  27. target_config="$COMMON/arch/arm64/configs/s5e9945-bazel_defconfig"
  28. elif [[ "${{ inputs.branch }}" == SM-A556* ]]; then
  29. target_config="$COMMON/arch/arm64/configs/s5e8845-bazel_defconfig"
  30. else
  31. target_config="$GKI_DEFCONFIG"
  32. fi
  33. # 2. Apply the nuke modifications exactly once if a target file was assigned
  34. if [ -n "$target_config" ]; then
  35. echo "Nuking Samsung Knox/Root protection in: $target_config"
  36. "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_UH
  37. "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_UH_RKP
  38. "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_UH_LKMAUTH
  39. "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_UH_LKM_BLOCK
  40. "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_RKP
  41. "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_RKP_CFP_JOPP
  42. "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_RKP_CFP_ROPP
  43. "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_RKP_CFP
  44. "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_SECURITY_DEFEX
  45. "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_PROCA
  46. "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_FIVE
  47. "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_KDP
  48. "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_KDP_NS
  49. fi
  50. - name: remove check_defconfig
  51. shell: bash
  52. run: |
  53. cd "$COMMON"
  54. # Remove check_defconfig
  55. sed -i 's/check_defconfig//' ./build.config.gki