| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308 |
- name: Build Kernels
- permissions:
- contents: write
- actions: write
- on:
- # push:
- # branches:
- # - main
- # paths:
- # - '.github/workflows/**'
- # pull_request:
- # branches:
- # - main
- # paths:
- # - '.github/workflows/**'
- workflow_dispatch:
- inputs:
- release_type:
- description: "Choose Release Type"
- required: true
- type: choice
- options:
- - Actions
- - Pre-Release
- - Release
- - Release (No Artifacts)
- default: Actions
- build_selection:
- description: "Choose which kernels to build"
- required: true
- type: choice
- options:
- - All
- - Android12-5.10
- - Android13-5.10
- - Android13-5.15
- - Android14-5.15
- - Android14-6.1
- - Android15-6.6
- - Build Test
- default: All
- susfs_version:
- description: "Choose SUSFS version to build"
- required: true
- type: choice
- options:
- - v1.5.12
- - v1.5.9
- default: v1.5.12
- jobs:
- build-a12-5-10:
- if: (inputs.build_selection == 'All' || inputs.build_selection == 'Android12-5.10') && inputs.release_type != 'Release (No Artifacts)'
- uses: ./.github/workflows/kernel-a12-5-10.yml
- secrets: inherit
- with:
- susfs_version: ${{ inputs.susfs_version }}
- build-a13-5-10:
- if: (inputs.build_selection == 'All' || inputs.build_selection == 'Android13-5.10') && inputs.release_type != 'Release (No Artifacts)'
- uses: ./.github/workflows/kernel-a13-5-10.yml
- secrets: inherit
- with:
- susfs_version: ${{ inputs.susfs_version }}
- build-a13-5-15:
- if: (inputs.build_selection == 'All' || inputs.build_selection == 'Android13-5.15') && inputs.release_type != 'Release (No Artifacts)'
- uses: ./.github/workflows/kernel-a13-5-15.yml
- secrets: inherit
- with:
- susfs_version: ${{ inputs.susfs_version }}
- build-a14-5-15:
- if: (inputs.build_selection == 'All' || inputs.build_selection == 'Android14-5.15') && inputs.release_type != 'Release (No Artifacts)'
- uses: ./.github/workflows/kernel-a14-5-15.yml
- secrets: inherit
- with:
- susfs_version: ${{ inputs.susfs_version }}
- build-a14-6-1:
- if: (inputs.build_selection == 'All' || inputs.build_selection == 'Android14-6.1') && inputs.release_type != 'Release (No Artifacts)'
- uses: ./.github/workflows/kernel-a14-6-1.yml
- secrets: inherit
- with:
- susfs_version: ${{ inputs.susfs_version }}
- build-a15-6-6:
- if: (inputs.build_selection == 'All' || inputs.build_selection == 'Android15-6.6') && inputs.release_type != 'Release (No Artifacts)'
- uses: ./.github/workflows/kernel-a15-6-6.yml
- secrets: inherit
- with:
- susfs_version: ${{ inputs.susfs_version }}
- build-test:
- if: inputs.build_selection == 'Build Test'
- uses: ./.github/workflows/kernel-build-check.yml
- secrets: inherit
- with:
- susfs_version: ${{ inputs.susfs_version }}
- release:
- runs-on: ubuntu-latest
- if: inputs.build_selection == 'All' && inputs.release_type != 'Actions' && (inputs.release_type == 'Release (No Artifacts)' || success())
- needs:
- - build-a12-5-10
- - build-a13-5-10
- - build-a13-5-15
- - build-a14-5-15
- - build-a14-6-1
- - build-a15-6-6
- env:
- GH_TOKEN: ${{ github.token }}
- RELEASE_NAME: "GKI Kernels With WKSU & SUSFS v1.5.12"
- RELEASE_BODY: ""
- steps:
- # # - name: Maximize Build Space
- # uses: AdityaGarg8/remove-unwanted-software@v5
- # with:
- # remove-dotnet: 'true' # Frees ~2 GB
- # remove-android: 'true' # Frees ~9 GB
- # remove-haskell: 'true' # Frees ~5.2 GB
- # remove-codeql: 'true' # Frees ~5.4 GB
- # remove-docker-images: 'true' # Frees ~3.2 GB
- # remove-large-packages: 'true' # Frees ~3.1 GB
- # remove-swapfile: 'true' # Frees ~4 GB
- # remove-cached-tools: 'false' # Avoid unless confirmed safe
- # verbose: 'true' # Enable detailed logging
- - name: Checkout code
- uses: actions/checkout@v4
- - name: Get commit hashes and generate commit URLs
- run: |
- GITLAB_OWNER="simonpunk"
- GITLAB_REPO="susfs4ksu"
-
- declare -A BRANCH_MAP=(
- ["gki_android12_5_10"]="gki-android12-5.10"
- ["gki_android13_5_10"]="gki-android13-5.10"
- ["gki_android13_5_15"]="gki-android13-5.15"
- ["gki_android14_5_15"]="gki-android14-5.15"
- ["gki_android14_6_1"]="gki-android14-6.1"
- ["gki_android15_6_6"]="gki-android15-6.6"
- )
-
- for var_name in "${!BRANCH_MAP[@]}"; do
- branch_name="${BRANCH_MAP[$var_name]}"
- COMMIT_HASH=$(git ls-remote https://gitlab.com/$GITLAB_OWNER/$GITLAB_REPO.git refs/heads/$branch_name | awk '{ print $1 }')
-
- if [[ -n "$COMMIT_HASH" ]]; then
- COMMIT_URL="https://gitlab.com/$GITLAB_OWNER/$GITLAB_REPO/-/commit/$COMMIT_HASH"
- echo "$branch_name Commit: $COMMIT_HASH"
- echo "$branch_name Commit URL: $COMMIT_URL"
-
- echo "COMMIT_HASH_${var_name}=$COMMIT_HASH" >> "$GITHUB_ENV"
- echo "COMMIT_URL_${var_name}=$COMMIT_URL" >> "$GITHUB_ENV"
- fi
- done
- - name: Get KernelSU variant refs and links
- run: |
- # Get WKSU latest commit from wild branch
- WKSU_REF=$(git ls-remote "https://github.com/WildKernels/Wild_KSU.git" refs/heads/wild | awk '{print $1}')
- WKSU_URL="https://github.com/WildKernels/Wild_KSU/commit/$WKSU_REF"
- echo "WKSU_REF=$WKSU_REF" >> $GITHUB_ENV
- echo "WKSU_URL=$WKSU_URL" >> $GITHUB_ENV
-
- # Get Baseband-guard latest commit from main branch
- BBG_REF=$(git ls-remote "https://github.com/vc-teahouse/Baseband-guard.git" refs/heads/main | awk '{print $1}')
- BBG_URL="https://github.com/vc-teahouse/Baseband-guard/commit/$BBG_REF"
- echo "BBG_REF=$BBG_REF" >> $GITHUB_ENV
- echo "BBG_URL=$BBG_URL" >> $GITHUB_ENV
- - name: Generate New Tag
- if: inputs.release_type != 'Actions'
- run: |
- LATEST_TAG=$(gh api repos/${{ github.repository }}/tags --jq '.[0].name' 2>/dev/null || echo "")
- if [ -z "$LATEST_TAG" ]; then
- LATEST_TAG="v1.5.12-r0"
- fi
-
- NEW_TAG=$(echo "$LATEST_TAG" | awk -F'-r' '{suffix=$2; if (!suffix) suffix=0; suffix++; printf "%s-r%d", $1, suffix}')
-
- echo "New tag: $NEW_TAG"
- echo "NEW_TAG=${NEW_TAG}" >> $GITHUB_ENV
- - name: Set tag for Actions only
- if: inputs.release_type == 'Actions'
- run: |
- echo "NEW_TAG=actions-$(date +%Y%m%d-%H%M%S)" >> $GITHUB_ENV
- - name: Download Artifacts
- if: inputs.release_type != 'Release (No Artifacts)'
- uses: actions/download-artifact@v5
- with:
- path: ./downloaded-artifacts
- pattern: 'WKSU-*-AnyKernel3'
- - name: Set release body
- run: |
- cat << 'EOF' > release_body.md
-
- **IMPORTANT DISCLAIMER**
- This software is provided for testing and educational purposes only. Use at your own risk.
- The developers are not responsible for any damage, data loss, or issues that may occur.
- Please ensure you have proper backups before installation.
- 🔹 Normal
- - Default kernel configuration
- - Standard kernel module loading behavior
- - Recommended for most users
- 🔹 Bypass
- - Includes module check bypass modifications
- - What are kernel modules? Kernel modules are pieces of code that can be loaded into the kernel at runtime to extend functionality (like device drivers, filesystem support, etc.). These are different from KernelSU/Magisk modules.
- - The Problem: Sometimes when installing a custom kernel, the device tries to load a kernel module that fails due to version mismatches, missing dependencies, or signature verification issues. This can cause boot failures or device instability.
- - The Solution: This version changes one line from false to true to force load the kernel module, bypassing the failure check that would normally prevent loading.
- 🔹 BBG (Baseband-guard)
- - A lightweight LSM (Linux Security Module) for Android kernel
- - Blocks unauthorized writes to critical partitions/device nodes
- - Prevents malicious tampering with baseband and boot chain
- - Kernel-level protection via LSM hooks
- - Reduces risk of soft-brick/hard-brick issues
- Features:
- -> Wild KSU
- -> Multi Manager Support for WKSU, KernelSU-Next! Needs Testing: KSU, MKSU RKSU, xxKSU, KowSU and SukiSU (Best compatibility with WKSU, no support will be provided for other managers)
- -> SUSFS ඞ v1.5.12
- -> Scope-Minimized Manual hooks v1.4
- -> Ptrace Patch Support for Older Kernels (<5.16)
- -> IPSet Support for Advanced Network Filtering
- -> Wireguard Support
- -> BBR v1 Support
- -> Added BBG support to prevent unauthorised writes to certain partitions: https://github.com/vc-teahouse/Baseband-guard
- Notes:
- -> SUS SU Mode 2 will show as disabled or not compatble due to non-kprobe hooks and is not needed anymore!
- -> Official Kernel Flasher is broken with latest susfs, try https://github.com/fatalcoder524/KernelFlasher/
- -> **boot.img files**: Available as CI artifacts only (not included in releases) - download from the Actions tab
- -> **Warning**: boot.img files may not boot on some devices
- -> **Note:** For detailed commit information and component versions, please check the [build summary](${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}) in the GitHub Actions workflow that generated this release.
- Module:
- -> https://github.com/sidex15/ksu_module_susfs
-
- Managers:
- -> WKSU: https://github.com/WildKernels/Wild_KSU
- -> Next: https://github.com/KernelSU-Next/KernelSU-Next
- EOF
- - name: Create GitHub Release
- if: inputs.release_type != 'Actions'
- uses: softprops/action-gh-release@v2
- with:
- tag_name: ${{ env.NEW_TAG }}
- prerelease: ${{ inputs.release_type == 'Pre-Release' }}
- files: ""
- name: ${{ env.RELEASE_NAME }}
- body_path: release_body.md
- - name: Upload Release Assets
- if: inputs.release_type != 'Actions' && inputs.release_type != 'Release (No Artifacts)'
- run: |
- for dir in ./downloaded-artifacts/*/; do
- # Create ZIP files from AnyKernel3 directories
- if [ -d "$dir/AnyKernel3" ]; then
- artifact_name=$(basename "$dir")
- echo "Creating ZIP for $artifact_name..."
- cd "$dir"
- zip -r -9 "${artifact_name}-AnyKernel3.zip" AnyKernel3/
- echo "Uploading ${artifact_name}.zip..."
- gh release upload ${{ env.NEW_TAG }} "${artifact_name}-AnyKernel3.zip"
- cd - > /dev/null
- fi
- done
- - name: Display Files Uploaded
- if: inputs.release_type != 'Actions' && inputs.release_type != 'Release (No Artifacts)'
- run: |
- echo "GitHub release created with the following files:"
- ls ./downloaded-artifacts/**/*
-
- - name: Send Telegram Notification
- if: inputs.release_type != 'Actions'
- run: |
- RELEASE_TYPE_TEXT=""
- if [ "${{ inputs.release_type }}" == "Pre-Release" ]; then
- RELEASE_TYPE_TEXT="🧪 *Pre-Release*"
- elif [ "${{ inputs.release_type }}" == "Release (No Artifacts)" ]; then
- RELEASE_TYPE_TEXT="🚀 *Release*"
- else
- RELEASE_TYPE_TEXT="🚀 *Release*"
- fi
-
- curl -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \
- -F chat_id="${{ secrets.TELEGRAM_CHAT_ID }}" \
- -F message_thread_id="${{ secrets.TELEGRAM_TOPIC_ID_GKI }}" \
- -F text="
- 🌽 *New Kernel $RELEASE_TYPE_TEXT Uploaded*
- 📦 *Repository:* [${{ github.repository }}](https://github.com/${{ github.repository }})
- ✏️ *Commit:* [${{ github.sha }}](https://github.com/${{ github.repository }}/commit/${{ github.sha }})
- [🔗 View GitHub Release](https://github.com/${{ github.repository }}/releases/tag/${{ env.NEW_TAG }})" \
- -F parse_mode="Markdown"
|