| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- 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
- EOF
- - 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: |
- # 1. Determine which defconfig file needs to be patched based on the branch
- target_config=""
-
- if [[ ${{ inputs.branch }} == SM-S938B* || "${{ inputs.branch }}" == "SM-S931B-Oneui8" ]]; then
- echo "Nothing to see here, moving on..."
- elif [[ "${{ inputs.branch }}" == SM-S926B* ]]; then
- target_config="$COMMON/arch/arm64/configs/s5e9945-bazel_defconfig"
- elif [[ "${{ inputs.branch }}" == SM-A556* ]]; then
- target_config="$COMMON/arch/arm64/configs/s5e8845-bazel_defconfig"
- else
- target_config="$GKI_DEFCONFIG"
- fi
-
- # 2. Apply the nuke modifications exactly once if a target file was assigned
- if [ -n "$target_config" ]; then
- echo "Nuking Samsung Knox/Root protection in: $target_config"
-
- configs=(
- "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"
- )
- for config in "${configs[@]}"; do
- key="${config%%=*}"
- if grep -qE "^(${key}=|# ${key} is not set$)" "$target_config"; then
- sed -i -E \
- -e "s/^${key}=.*/${config}/" \
- -e "s/^# ${key} is not set\$/${config}/" \
- "$target_config"
- else
- echo "$config" >> "$target_config"
- fi
- done
- fi
- - name: remove check_defconfig
- shell: bash
- run: |
- cd "$COMMON"
- # Remove check_defconfig
- sed -i 's/check_defconfig//' ./build.config.gki
|