Browse Source

Add GitHub Action for device kernel configurations

This action adds configurations for mountify support, increases log buffer size, and modifies security settings based on the input branch.
jimsterino98 4 months ago
parent
commit
ab23d37797
1 changed files with 89 additions and 0 deletions
  1. 89 0
      .github/actions/configs/action.yml

+ 89 - 0
.github/actions/configs/action.yml

@@ -0,0 +1,89 @@
+name: add configs
+description: add configs and disabling securities
+inputs:
+ branch:
+   description: 'which device kernel'
+   required: true
+
+runs:
+ using: composite
+ steps:
+  - name: add mountify support
+    shell: bash
+    run: |
+     cat >> "$GKI_DEFCONFIG" << 'EOF'
+     # Mountify Support
+     CONFIG_OVERLAY_FS=y
+     CONFIG_TMPFS_XATTR=y
+     CONFIG_TMPFS_POSIX_ACL=y
+
+  - name: increase log buffer size for showing bbg on ksu manager homepage
+    shell: bash
+    run: |
+     cat >> "$GKI_DEFCONFIG" << 'EOF'
+     # increase log buffer size to show bbg version in wksu homepage
+     CONFIG_LOG_BUF_SHIFT=20
+     EOF
+
+  - name: nuke securities for root access
+    shell: bash
+    run: |
+     if [[ "${{ inputs.branch }}" == "SM-S938B-Oneui7" || "${{ inputs.branch }}" == "SM-S931B-Oneui8" ]]; then
+     echo "nothing to see here moving on"
+          
+     elif [[ "${{ inputs.branch }}" == "SM-S926B-Oneui8" ]]; then
+     cat >> "$COMMON/arch/arm64/configs/s5e9945-bazel_defconfig" << 'EOF'
+     # nuke root protection
+     CONFIG_UH=n
+     CONFIG_UH_RKP=n
+     CONFIG_UH_LKMAUTH=n
+     CONFIG_UH_LKM_BLOCK=n
+     CONFIG_RKP_CFP_JOPP=n
+     CONFIG_RKP_CFP=n
+     CONFIG_SECURITY_DEFEX=n
+     CONFIG_PROCA=n
+     CONFIG_FIVE=n
+     CONFIG_RKP=n
+     CONFIG_KDP_NS=n
+     CONFIG_KDP=n
+     EOF
+
+     elif [[ ${{ inputs.branch }} == SM-A556* ]]; then
+     cat >> "$COMMON/arch/arm64/configs/s5e8845-bazel_defconfig" << 'EOF'
+     # nuke root protection
+     CONFIG_UH=n
+     CONFIG_UH_RKP=n
+     CONFIG_UH_LKMAUTH=n
+     CONFIG_UH_LKM_BLOCK=n
+     CONFIG_RKP_CFP_JOPP=n
+     CONFIG_RKP_CFP=n
+     CONFIG_SECURITY_DEFEX=n
+     CONFIG_PROCA=n
+     CONFIG_FIVE=n
+     CONFIG_RKP=n
+     CONFIG_KDP_NS=n
+     CONFIG_KDP=n
+     EOF
+
+     else
+     cat >> "$GKI_DEFCONFIG" << 'EOF'
+     # nuke root protection
+     CONFIG_UH=n
+     CONFIG_UH_RKP=n
+     CONFIG_UH_LKMAUTH=n
+     CONFIG_UH_LKM_BLOCK=n
+     CONFIG_RKP_CFP_JOPP=n
+     CONFIG_RKP_CFP=n
+     CONFIG_SECURITY_DEFEX=n
+     CONFIG_PROCA=n
+     CONFIG_FIVE=n
+     CONFIG_RKP=n  
+     CONFIG_KDP_NS=n
+     CONFIG_KDP=n
+     EOF
+     fi
+  - name: remove check_defconfig
+    shell: bash
+    run: |
+     # Remove check_defconfig
+     sed -i 's/check_defconfig//' ./build.config.gki