action.yml 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. elif [[ $BRANCH == SM-A055* ]]; then
  24. target_config="$COMMON/../kernel_device_modules-6.6/arch/arm64/configs/mediatek-bazel_defconfig"
  25. elif [[ $BRANCH == SM-A075* ]]; then
  26. target_config="$COMMON/arch/arm64/configs/a07_00_defconfig"
  27. else
  28. target_config="$GKI_DEFCONFIG"
  29. fi
  30. # 2. Apply the nuke modifications exactly once if a target file was assigned
  31. if [ -n "$target_config" ]; then
  32. echo "Nuking Samsung Knox/Root protection in: $target_config"
  33. "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_UH
  34. "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_UH_RKP
  35. "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_UH_LKMAUTH
  36. "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_UH_LKM_BLOCK
  37. "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_RKP
  38. "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_RKP_CFP_JOPP
  39. "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_RKP_CFP_ROPP
  40. "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_RKP_CFP
  41. "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_SECURITY_DEFEX
  42. "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_PROCA
  43. "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_FIVE
  44. "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_KDP
  45. "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_KDP_NS
  46. fi
  47. - name: remove check_defconfig
  48. shell: bash
  49. run: |
  50. cd "$COMMON"
  51. # Remove check_defconfig
  52. sed -i 's/check_defconfig//' ./build.config.gki