action.yml 2.4 KB

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