name: add configs description: add configs and disabling securities runs: using: composite steps: - name: add mountify support shell: bash run: | "$COMMON/scripts/config" --file "$GKI_DEFCONFIG" --enable CONFIG_OVERLAY_FS "$COMMON/scripts/config" --file "$GKI_DEFCONFIG" --enable CONFIG_TMPFS_XATTR "$COMMON/scripts/config" --file "$GKI_DEFCONFIG" --enable CONFIG_TMPFS_POSIX_ACL - name: enable KPM support shell: bash run: | "$COMMON/scripts/config" --file "$GKI_DEFCONFIG" --enable CONFIG_KALLSYMS "$COMMON/scripts/config" --file "$GKI_DEFCONFIG" --enable CONFIG_KALLSYMS_ALL "$COMMON/scripts/config" --file "$GKI_DEFCONFIG" --enable CONFIG_KPM - 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 [[ $BRANCH == SM-S938B* || "$BRANCH" == "SM-S931B-Oneui8" ]]; then echo "Nothing to see here, moving on..." elif [[ $BRANCH == SM-S926B* ]]; then target_config="$COMMON/arch/arm64/configs/s5e9945-bazel_defconfig" elif [[ $BRANCH == SM-A556* ]]; then target_config="$COMMON/arch/arm64/configs/s5e8845-bazel_defconfig" elif [[ $BRANCH == SM-A055* ]]; then target_config="$CONFIG/kernel/kernel_device_modules-6.6/arch/arm64/configs/mediatek-bazel_defconfig" elif [[ $BRANCH == SM-A075* ]]; then target_config="$COMMON/arch/arm64/configs/a07_00_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" "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_UH "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_UH_RKP "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_UH_LKMAUTH "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_UH_LKM_BLOCK "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_RKP "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_RKP_CFP_JOPP "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_RKP_CFP_ROPP "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_RKP_CFP "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_SECURITY_DEFEX "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_PROCA "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_FIVE "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_KDP "$COMMON/scripts/config" --file "$target_config" --disable CONFIG_KDP_NS #"$COMMON/scripts/config" --file "$target_config" --disable CONFIG_KNOX #"$COMMON/scripts/config" --file "$target_config" --disable CONFIG_KNOX_NCM #"$COMMON/scripts/config" --file "$target_config" --disable CONFIG_KNOX_KAP fi - name: remove check_defconfig shell: bash run: | cd "$COMMON" # Remove check_defconfig sed -i 's/check_defconfig//' ./build.config.gki