Explorar o código

ci: Continue workflow overhaul

TheWildJames hai 6 meses
pai
achega
0387117081

+ 35 - 0
.github/actions/apply-device-patches/action.yml

@@ -0,0 +1,35 @@
+name: 'Apply Device-Specific Patches'
+description: 'Apply WiFi/Bluetooth fixes for Samsung and Xiaomi 6.6 GKI devices'
+inputs:
+  kernel_version:
+    description: 'Kernel version (e.g., 6.6)'
+    required: true
+
+runs:
+  using: "composite"
+  steps:
+    - name: Fix WiFi and Bluetooth on Samsung 6.6 GKI Devices
+      if: ${{ inputs.kernel_version == '6.6' }}
+      shell: bash
+      working-directory: ${{ github.workspace }}/kernel/common
+      run: |
+        SYMBOL_LIST=android/abi_gki_aarch64_galaxy
+        echo "kdp_set_cred_non_rcu" >> $SYMBOL_LIST
+        echo "kdp_usecount_dec_and_test" >> $SYMBOL_LIST
+        echo "kdp_usecount_inc" >> $SYMBOL_LIST
+
+        PATCH="${{ github.workspace }}/kernel_patches/samsung/min_kdp/add-min_kdp-symbols.patch"
+        if patch -p1 --dry-run < "$PATCH"; then
+          patch -p1 --no-backup-if-mismatch < $PATCH
+        fi
+
+        cp "${{ github.workspace }}/kernel_patches/samsung/min_kdp/min_kdp.c" drivers/min_kdp.c
+        echo "obj-y += min_kdp.o" >> drivers/Makefile
+
+    - name: Fix WiFi and Bluetooth on Xiaomi 6.6 GKI Devices
+      if: ${{ inputs.kernel_version == '6.6' }}
+      shell: bash
+      working-directory: ${{ github.workspace }}/kernel/common
+      run: |
+        SYMBOL_LIST=android/abi_gki_aarch64_xiaomi
+        echo "device_find_any_child" >> $SYMBOL_LIST

+ 48 - 0
.github/actions/apply-kernel-branding/action.yml

@@ -0,0 +1,48 @@
+name: 'Apply Kernel Branding'
+description: 'Apply Wild kernel branding to kernel version string'
+inputs:
+  build_type:
+    description: 'Build type (Normal, Bypass, MarionKernel, Hakan, etc.)'
+    required: true
+  kernel_version:
+    description: 'Kernel version (e.g., 5.10, 6.1, 6.6)'
+    required: true
+
+runs:
+  using: "composite"
+  steps:
+    - name: Apply Kernel Name Branding
+      shell: bash
+      working-directory: ${{ github.workspace }}/kernel
+      run: |
+        # Apply kernel branding based on version and variant
+        if [[ "${{ inputs.kernel_version }}" == "5."* ]] || [[ "${{ inputs.kernel_version }}" == "6.1" ]]; then
+          # Older kernels: append to end of version string
+          case ${{ inputs.build_type }} in
+            MarionKernel)
+              perl -i -0777 -pe 's/(.*)echo "\$res"/$1echo "\$res-Wild-MarionKernel"/s' ./common/scripts/setlocalversion
+              ;;
+            Hakan)
+              perl -i -0777 -pe 's/(.*)echo "\$res"/$1echo "\$res-Wild-Hakan"/s' ./common/scripts/setlocalversion
+              ;;
+            TheWildJames)
+              perl -i -0777 -pe 's/(.*)echo "\$res"/$1echo "\$res-Wild-TheWildJames"/s' ./common/scripts/setlocalversion
+              ;;
+            vTomsonek)
+              perl -i -0777 -pe 's/(.*)echo "\$res"/$1echo "\$res-Wild-vTomsonek"/s' ./common/scripts/setlocalversion
+              ;;
+            *)
+              perl -i -0777 -pe 's/(.*)echo "\$res"/$1echo "\$res-Wild"/s' ./common/scripts/setlocalversion
+              ;;
+          esac
+        else
+          # Newer kernels (6.6+): insert before scm_version
+          case ${{ inputs.build_type }} in
+            *)
+              perl -i -0777 -pe 's/(.*)echo "\$\{KERNELVERSION\}\$\{file_localversion\}\$\{config_localversion\}\$\{LOCALVERSION\}\$\{scm_version\}"/$1echo "\${KERNELVERSION}\${file_localversion}\${config_localversion}\${LOCALVERSION}-Wild\${scm_version}"/s' ./common/scripts/setlocalversion
+              ;;
+          esac
+        fi
+
+        # Set build timestamp
+        export KBUILD_BUILD_TIMESTAMP="$(date -u '+%a %b %e %H:%M:%S UTC %Y')"

+ 42 - 0
.github/actions/bbg/action.yml

@@ -0,0 +1,42 @@
+name: Setup Baseband Guard (BBG)
+description: Download and configure Baseband Guard security module
+
+runs:
+  using: composite
+  steps:
+    - name: Download Baseband Guard
+      shell: bash
+      working-directory: ${{ github.workspace }}/kernel
+      run: |
+        cp -R "$GITHUB_WORKSPACE/Baseband-guard" ./
+        ./setup.sh
+    
+    - name: Configure Baseband Guard
+      shell: bash
+      working-directory: ${{ github.workspace }}/kernel
+      run: |
+        # Add BBG to defconfig
+        echo "CONFIG_BBG=y" >> "${{ github.workspace }}/wild_gki.fragment"
+        
+        # Modify security Kconfig to include baseband_guard in LSM
+        sed -i '/^config LSM$/,/^help$/{ /^[[:space:]]*default/ { /baseband_guard/! s/selinux/selinux,baseband_guard/ } }' common/security/Kconfig
+    
+    - name: Verify BBG Installation
+      shell: bash
+      working-directory: ${{ github.workspace }}/kernel
+      run: |
+        if grep -q "baseband_guard" common/security/Kconfig; then
+          echo "✓ SUCCESS: baseband_guard found in common/security/Kconfig"
+          grep -n "baseband_guard" common/security/Kconfig || true
+        else
+          echo "✗ FAILED: baseband_guard not found in common/security/Kconfig"
+          exit 1
+        fi
+    
+    - name: Extract BBG Version
+      shell: bash
+      working-directory: ${{ github.workspace }}/kernel/Baseband-guard
+      run: |
+        # Extract and export BBG version info
+        BBG_COMMIT=$(git rev-parse --short HEAD 2>/dev/null)
+        echo "BBG_COMMIT=$BBG_COMMIT" >> $GITHUB_ENV

+ 29 - 0
.github/actions/clean-kernel-flags/action.yml

@@ -0,0 +1,29 @@
+name: 'Clean Kernel Flags'
+description: 'Clean dirty flags and ABI exports to prevent build errors'
+
+runs:
+  using: "composite"
+  steps:
+    - name: Clean Dirty Flags and ABI Exports
+      shell: bash
+      working-directory: ${{ github.workspace }}/kernel
+      run: |
+        # Clean dirty flags and ABI exports based on build system
+        if [ -f "build/build.sh" ]; then
+          # Old build system (5.10, 5.15, early 6.1)
+          sed -i 's/-dirty//' ./common/scripts/setlocalversion
+        else
+          # Bazel build system (newer kernels)
+          sed -i "/stable_scmversion_cmd/s/-maybe-dirty//g" ./build/kernel/kleaf/impl/stamp.bzl
+          sed -i 's/-dirty//' ./common/scripts/setlocalversion
+          # Remove ABI protected exports to prevent build errors
+          rm -rf ./common/android/abi_gki_protected_exports_*
+          perl -pi -e 's/^\s*"protected_exports_list"\s*:\s*"android\/abi_gki_protected_exports_aarch64",\s*$//;' ./common/BUILD.bazel
+        fi
+
+        # Commit changes to avoid dirty state during build
+        cd ${{ github.workspace }}/kernel/common
+        git config --global user.name "github-actions[bot]"
+        git config --global user.email "github-actions[bot]@users.noreply.github.com"
+        git add .
+        git commit -m "Wild: Clean Dirty Flag"

+ 45 - 0
.github/actions/configure-kernel/action.yml

@@ -0,0 +1,45 @@
+name: 'Configure Kernel Options'
+description: 'Set up kernel configuration fragment with required options'
+
+runs:
+  using: "composite"
+  steps:
+    - name: Apply Kernel Configuration
+      shell: bash
+      working-directory: ${{ github.workspace }}/kernel
+      run: |
+        cat >> "${{ github.workspace }}/wild_gki.fragment" << 'EOF'
+        # Optional kernel config placeholders
+        # Networking Configuration
+        #CONFIG_IP_NF_TARGET_TTL=y
+        #CONFIG_IP6_NF_TARGET_HL=y
+        #CONFIG_IP6_NF_MATCH_HL=y
+
+        # BBR TCP Congestion Control
+        #CONFIG_TCP_CONG_ADVANCED=y
+        #CONFIG_TCP_CONG_BBR=y
+        #CONFIG_NET_SCH_FQ=y
+        ## CONFIG_TCP_CONG_BIC is not set
+        ## CONFIG_TCP_CONG_WESTWOOD is not set
+        ## CONFIG_TCP_CONG_HTCP is not set
+
+        # IPSet Support
+        #CONFIG_IP_SET=y
+        #CONFIG_IP_SET_MAX=65534
+        #CONFIG_IP_SET_BITMAP_IP=y
+        #CONFIG_IP_SET_BITMAP_IPMAC=y
+        #CONFIG_IP_SET_BITMAP_PORT=y
+        #CONFIG_IP_SET_HASH_IP=y
+        #CONFIG_IP_SET_HASH_IPMARK=y
+        #CONFIG_IP_SET_HASH_IPPORT=y
+        #CONFIG_IP_SET_HASH_IPPORTIP=y
+        #CONFIG_IP_SET_HASH_IPPORTNET=y
+        #CONFIG_IP_SET_HASH_IPMAC=y
+        #CONFIG_IP_SET_HASH_MAC=y
+        #CONFIG_IP_SET_HASH_NETPORTNET=y
+        #CONFIG_IP_SET_HASH_NET=y
+        #CONFIG_IP_SET_HASH_NETNET=y
+        #CONFIG_IP_SET_HASH_NETPORT=y
+        #CONFIG_IP_SET_HASH_NETIFACE=y
+        #CONFIG_IP_SET_LIST_SET=y
+        EOF

+ 4 - 34
.github/actions/download-kernel/action.yml

@@ -8,20 +8,11 @@ inputs:
   kernel_version:
   kernel_version:
     description: 'Kernel version (e.g., 5.15, 6.1)'
     description: 'Kernel version (e.g., 5.15, 6.1)'
     required: true
     required: true
-  sub_level:
-    description: 'Kernel sublevel'
-    required: true
   os_patch_level:
   os_patch_level:
     description: 'OS patch level (e.g., 2024-01)'
     description: 'OS patch level (e.g., 2024-01)'
     required: true
     required: true
-  kernel_root:
-    description: 'Path to kernel root directory'
-    required: true
 
 
 outputs:
 outputs:
-  kernel_root:
-    description: 'Path to the synced kernel root'
-    value: ${{ steps.setup.outputs.kernel_root }}
   deprecated_branch:
   deprecated_branch:
     description: 'Whether the branch is deprecated'
     description: 'Whether the branch is deprecated'
     value: ${{ steps.sync.outputs.deprecated }}
     value: ${{ steps.sync.outputs.deprecated }}
@@ -29,28 +20,14 @@ outputs:
 runs:
 runs:
   using: composite
   using: composite
   steps:
   steps:
-    - name: Setup Kernel Root Directory
-      id: setup
-      shell: bash
-      run: |
-        KERNEL_ROOT="${{ inputs.kernel_root }}"
-        mkdir -p "$KERNEL_ROOT"
-        echo "kernel_root=$KERNEL_ROOT" >> $GITHUB_OUTPUT
-        echo "✓ Created kernel root directory: $KERNEL_ROOT"
-
     - name: Initialize and Sync Kernel Repository
     - name: Initialize and Sync Kernel Repository
       id: sync
       id: sync
       shell: bash
       shell: bash
-      working-directory: ${{ inputs.kernel_root }}
+      working-directory: ${{ github.workspace }}/kernel
       run: |
       run: |
         FORMATTED_BRANCH="${{ inputs.android_version }}-${{ inputs.kernel_version }}-${{ inputs.os_patch_level }}"
         FORMATTED_BRANCH="${{ inputs.android_version }}-${{ inputs.kernel_version }}-${{ inputs.os_patch_level }}"
-        
-        echo "========================================"
-        echo "  Initializing Kernel Repository"
-        echo "========================================"
-        echo "Branch: common-${FORMATTED_BRANCH}"
-        echo "========================================"
-        
+
+        # Initialize repo with the target branch
         repo init -u https://android.googlesource.com/kernel/manifest -b common-${FORMATTED_BRANCH} --depth=1
         repo init -u https://android.googlesource.com/kernel/manifest -b common-${FORMATTED_BRANCH} --depth=1
 
 
         # Check if branch is deprecated
         # Check if branch is deprecated
@@ -66,12 +43,5 @@ runs:
         
         
         echo "deprecated=$DEPRECATED" >> $GITHUB_OUTPUT
         echo "deprecated=$DEPRECATED" >> $GITHUB_OUTPUT
         
         
-        echo "========================================"
-        echo "  Syncing Kernel Source"
-        echo "========================================"
-        
+        # Sync kernel source
         repo --trace sync -c -j$(nproc --all) --fail-fast --no-tags --force-sync --no-clone-bundle
         repo --trace sync -c -j$(nproc --all) --fail-fast --no-tags --force-sync --no-clone-bundle
-        
-        echo "========================================"
-        echo "  ✓ Kernel Source Synced Successfully"
-        echo "========================================"

+ 21 - 0
.github/actions/hakan/action.yml

@@ -0,0 +1,21 @@
+name: Setup RFKILL Modules
+description: Configure WiFi/Bluetooth RFKILL modules for Hakan variant
+
+runs:
+  using: composite
+  steps:
+    - name: Configure RFKILL for WiFi/Bluetooth
+      shell: bash
+      working-directory: ${{ github.workspace }}/kernel
+      run: |
+        cat >> "${{ github.workspace }}/wild_gki.fragment" << 'EOF'
+        CONFIG_RFKILL=y
+        CONFIG_CFG80211=y
+        CONFIG_MAC80211=y
+        EOF
+
+        # Remove libarc4.ko and rfkill.ko from modules list
+        sed -i \
+          -e '/_COMMON_GKI_MODULES_LIST = \[/,/^[[:space:]]*\]/{/^[[:space:]]*"lib\/crypto\/libarc4\.ko",[[:space:]]*$/d}' \
+          -e '/_COMMON_GKI_MODULES_LIST = \[/,/^[[:space:]]*\]/{/^[[:space:]]*"net\/rfkill\/rfkill\.ko",[[:space:]]*$/d}' \
+          common/modules.bzl

+ 0 - 60
.github/actions/setup-bbg/action.yml

@@ -1,60 +0,0 @@
-name: Setup Baseband Guard (BBG)
-description: Download and configure Baseband Guard security module
-inputs:
-  kernel_root:
-    description: 'Path to kernel root directory'
-    required: true
-  defconfig_fragment:
-    description: 'Path to defconfig fragment file'
-    required: true
-
-runs:
-  using: composite
-  steps:
-    - name: Download Baseband Guard
-      shell: bash
-      working-directory: ${{ inputs.kernel_root }}
-      run: |
-        echo "========================================"
-        echo "      Setting up Baseband Guard         "
-        echo "========================================"
-        curl -LSs https://github.com/vc-teahouse/Baseband-guard/raw/main/setup.sh | bash
-        echo "✓ Baseband Guard downloaded"
-    
-    - name: Configure Baseband Guard
-      shell: bash
-      working-directory: ${{ inputs.kernel_root }}
-      run: |
-        # Add BBG to defconfig
-        echo "CONFIG_BBG=y" >> "${{ inputs.defconfig_fragment }}"
-        
-        # Modify security Kconfig to include baseband_guard in LSM
-        sed -i '/^config LSM$/,/^help$/{ /^[[:space:]]*default/ { /baseband_guard/! s/selinux/selinux,baseband_guard/ } }' common/security/Kconfig
-        
-        echo "✓ Baseband Guard configured in kernel"
-    
-    - name: Verify BBG Installation
-      shell: bash
-      working-directory: ${{ inputs.kernel_root }}
-      run: |
-        if grep -q "baseband_guard" common/security/Kconfig; then
-          echo "✓ SUCCESS: baseband_guard found in common/security/Kconfig"
-          grep -n "baseband_guard" common/security/Kconfig || true
-        else
-          echo "✗ FAILED: baseband_guard not found in common/security/Kconfig"
-          exit 1
-        fi
-    
-    - name: Extract BBG Version
-      shell: bash
-      working-directory: ${{ inputs.kernel_root }}/Baseband-guard
-      run: |
-        BBG_COMMIT=$(git rev-parse --short HEAD 2>/dev/null)
-        BBG_VERSION=$(git rev-list --count HEAD 2>/dev/null)
-        echo "BBG_COMMIT=$BBG_COMMIT" >> $GITHUB_ENV
-        echo "BBG_VERSION=$BBG_VERSION" >> $GITHUB_ENV
-        
-        echo "✓ Baseband Guard Setup Complete"
-        echo "  Version : $BBG_VERSION"
-        echo "  Commit  : $BBG_COMMIT"
-        echo "========================================"

+ 0 - 48
.github/actions/setup-wksu/action.yml

@@ -1,48 +0,0 @@
-name: Setup Wild KSU
-description: Download and configure Wild KSU with version tracking
-inputs:
-  ksu_commit:
-    description: 'KSU commit to use (leave empty for canary)'
-    required: false
-    default: ''
-  kernel_root:
-    description: 'Path to kernel root directory'
-    required: true
-
-runs:
-  using: composite
-  steps:
-    - name: Download Wild KSU
-      shell: bash
-      working-directory: ${{ inputs.kernel_root }}
-      run: |
-        echo "========================================"
-        echo "        Setting up Wild KSU             "
-        echo "========================================"
-        if [[ -n "${{ inputs.ksu_commit }}" ]]; then
-          echo "Using commit: ${{ inputs.ksu_commit }}"
-          curl -LSs "https://raw.githubusercontent.com/WildKernels/Wild_KSU/stable/kernel/setup.sh" | bash -s "${{ inputs.ksu_commit }}"
-        else
-          echo "Using canary build"
-          curl -LSs "https://raw.githubusercontent.com/WildKernels/Wild_KSU/stable/kernel/setup.sh" | bash -s canary
-        fi
-    
-    - name: Extract KSU Version Info
-      id: ksu-version
-      shell: bash
-      working-directory: ${{ inputs.kernel_root }}/Wild_KSU
-      run: |
-        KSU_GIT_VERSION=$(git rev-list --count HEAD 2>/dev/null)
-        KSU_GIT_TAG=$(git describe --tags --abbrev=0 2>/dev/null)
-        KSU_COMMIT=$(git rev-parse --short HEAD 2>/dev/null)
-        KSU_VERSION=$((30000 + KSU_GIT_VERSION))
-        
-        echo "KSU_GIT_TAG=$KSU_GIT_TAG" >> $GITHUB_ENV
-        echo "KSU_VERSION=$KSU_VERSION" >> $GITHUB_ENV
-        echo "KSU_COMMIT=$KSU_COMMIT" >> $GITHUB_ENV
-        
-        echo "✓ Wild KSU Setup Complete"
-        echo "  Tag     : $KSU_GIT_TAG"
-        echo "  Version : $KSU_VERSION"
-        echo "  Commit  : $KSU_COMMIT"
-        echo "========================================"

+ 36 - 49
.github/actions/setup-susfs/action.yml → .github/actions/susfs/action.yml

@@ -13,15 +13,6 @@ inputs:
   sublevel:
   sublevel:
     description: 'Kernel sublevel'
     description: 'Kernel sublevel'
     required: true
     required: true
-  kernel_root:
-    description: 'Path to kernel root directory'
-    required: true
-  kernel_patches:
-    description: 'Path to kernel_patches directory'
-    required: true
-  susfs4ksu:
-    description: 'Path to susfs4ksu directory'
-    required: true
 
 
 runs:
 runs:
   using: composite
   using: composite
@@ -29,14 +20,11 @@ runs:
     - name: Setup SUSFS Branch
     - name: Setup SUSFS Branch
       shell: bash
       shell: bash
       run: |
       run: |
-        echo "========================================"
-        echo "        Setting up SUSFS                "
-        echo "========================================"
         SUSFS_BRANCH="gki-${{ inputs.android_version }}-${{ inputs.kernel_version }}"
         SUSFS_BRANCH="gki-${{ inputs.android_version }}-${{ inputs.kernel_version }}"
         
         
         # Use downloaded SUSFS artifact
         # Use downloaded SUSFS artifact
         if [ -d "susfs_cache/$SUSFS_BRANCH" ]; then
         if [ -d "susfs_cache/$SUSFS_BRANCH" ]; then
-          echo "Using downloaded SUSFS branch: $SUSFS_BRANCH"
+          # Use cached SUSFS branch
           cp -r "susfs_cache/$SUSFS_BRANCH" susfs4ksu
           cp -r "susfs_cache/$SUSFS_BRANCH" susfs4ksu
         else
         else
           echo "ERROR: SUSFS branch $SUSFS_BRANCH not found in downloaded artifacts"
           echo "ERROR: SUSFS branch $SUSFS_BRANCH not found in downloaded artifacts"
@@ -47,25 +35,33 @@ runs:
         
         
         SUSFS_VERSION="2.0.0"
         SUSFS_VERSION="2.0.0"
         echo "SUSFS_VERSION=$SUSFS_VERSION" >> $GITHUB_ENV
         echo "SUSFS_VERSION=$SUSFS_VERSION" >> $GITHUB_ENV
+
+    - name: Enable KernelSU SUSFS Config
+      shell: bash
+      working-directory: ${{ github.workspace }}/kernel
+      run: |
+        cat >> "${{ github.workspace }}/wild_gki.fragment" << 'EOF'
+        # KernelSU SUSFS Configuration
+        CONFIG_KSU_SUSFS=y
+        EOF
     
     
     - name: Apply Base SUSFS Patches
     - name: Apply Base SUSFS Patches
       shell: bash
       shell: bash
-      working-directory: ${{ inputs.kernel_root }}/common
+      working-directory: ${{ github.workspace }}/kernel/common
       run: |
       run: |
-        echo "Applying SUSFS base patches..."
-        cp "${{ inputs.susfs4ksu }}/kernel_patches/fs/"* "${{ inputs.kernel_root }}/common/fs/"
-        cp "${{ inputs.susfs4ksu }}/kernel_patches/include/linux/"* "${{ inputs.kernel_root }}/common/include/linux/"
-        cp ${{ inputs.susfs4ksu }}/kernel_patches/50_add_susfs_in_gki-${{ inputs.android_version }}-${{ inputs.kernel_version }}.patch ./
+        # Apply base SUSFS patches
+        cp "${{ github.workspace }}/susfs4ksu/kernel_patches/fs/"* "${{ github.workspace }}/kernel/common/fs/"
+        cp "${{ github.workspace }}/susfs4ksu/kernel_patches/include/linux/"* "${{ github.workspace }}/kernel/common/include/linux/"
+        cp ${{ github.workspace }}/susfs4ksu/kernel_patches/50_add_susfs_in_gki-${{ inputs.android_version }}-${{ inputs.kernel_version }}.patch ./
         patch -p1 < 50_add_susfs_in_gki-${{ inputs.android_version }}-${{ inputs.kernel_version }}.patch 
         patch -p1 < 50_add_susfs_in_gki-${{ inputs.android_version }}-${{ inputs.kernel_version }}.patch 
         #|| true
         #|| true
-        echo "✓ Base SUSFS patches applied"
     
     
     - name: Apply Android 12 5.10 Fixes
     - name: Apply Android 12 5.10 Fixes
       if: inputs.android_version == 'android12' && inputs.kernel_version == '5.10'
       if: inputs.android_version == 'android12' && inputs.kernel_version == '5.10'
       shell: bash
       shell: bash
-      working-directory: ${{ inputs.kernel_root }}/common
+      working-directory: ${{ github.workspace }}/kernel/common
       run: |
       run: |
-        echo "Applying Android 12 5.10 specific fixes..."
+        # Android 12 5.10 fixes
         SUBLEVEL=${{ inputs.sublevel }}
         SUBLEVEL=${{ inputs.sublevel }}
         SUSFS_VERSION=${{ env.SUSFS_VERSION }}
         SUSFS_VERSION=${{ env.SUSFS_VERSION }}
         
         
@@ -73,50 +69,48 @@ runs:
           sed -i -e 's/goto show_pad;/return 0;/' ./fs/proc/task_mmu.c
           sed -i -e 's/goto show_pad;/return 0;/' ./fs/proc/task_mmu.c
         fi 
         fi 
         if [[ "$SUBLEVEL" -le 117 ]]; then
         if [[ "$SUBLEVEL" -le 117 ]]; then
-          cp ${{ inputs.kernel_patches }}/wild/susfs_fix_patches/v${SUSFS_VERSION}/a12-5.10/fdinfo.c.patch ./
+          cp ${{ github.workspace }}/kernel_patches/wild/susfs_fix_patches/v${SUSFS_VERSION}/a12-5.10/fdinfo.c.patch ./
           patch -p1 < fdinfo.c.patch
           patch -p1 < fdinfo.c.patch
         fi
         fi
         if [[ "$SUBLEVEL" -le 43 ]]; then
         if [[ "$SUBLEVEL" -le 43 ]]; then
-          cp ${{ inputs.kernel_patches }}/wild/susfs_fix_patches/v${SUSFS_VERSION}/a12-5.10/base.c.patch ./
+          cp ${{ github.workspace }}/kernel_patches/wild/susfs_fix_patches/v${SUSFS_VERSION}/a12-5.10/base.c.patch ./
           patch -p1 < base.c.patch
           patch -p1 < base.c.patch
         fi
         fi
-        echo "✓ Android 12 5.10 fixes applied"
     
     
     - name: Apply Android 13 5.10 Fixes
     - name: Apply Android 13 5.10 Fixes
       if: inputs.android_version == 'android13' && inputs.kernel_version == '5.10'
       if: inputs.android_version == 'android13' && inputs.kernel_version == '5.10'
       shell: bash
       shell: bash
-      working-directory: ${{ inputs.kernel_root }}/common
+      working-directory: ${{ github.workspace }}/kernel/common
       run: |
       run: |
-        echo "Applying Android 13 5.10 specific fixes..."
+        # Android 13 5.10 fixes
         SUBLEVEL=${{ inputs.sublevel }}
         SUBLEVEL=${{ inputs.sublevel }}
         SUSFS_VERSION=${{ env.SUSFS_VERSION }}
         SUSFS_VERSION=${{ env.SUSFS_VERSION }}
         
         
         if [[ "$SUBLEVEL" -le 107 ]]; then
         if [[ "$SUBLEVEL" -le 107 ]]; then
-          cp ${{ inputs.kernel_patches }}/wild/susfs_fix_patches/v${SUSFS_VERSION}/a13-5.10/fdinfo.c.patch ./
+          cp ${{ github.workspace }}/kernel_patches/wild/susfs_fix_patches/v${SUSFS_VERSION}/a13-5.10/fdinfo.c.patch ./
           patch -p1 < fdinfo.c.patch
           patch -p1 < fdinfo.c.patch
         fi
         fi
         if [[ "$SUBLEVEL" -le 209 && "${{ inputs.os_patch_level }}" != "2024-05" ]]; then
         if [[ "$SUBLEVEL" -le 209 && "${{ inputs.os_patch_level }}" != "2024-05" ]]; then
           sed -i -e 's/goto show_pad;/return 0;/' ./fs/proc/task_mmu.c
           sed -i -e 's/goto show_pad;/return 0;/' ./fs/proc/task_mmu.c
         fi
         fi
-        echo "✓ Android 13 5.10 fixes applied"
     
     
     - name: Apply Android 13 5.15 Fixes
     - name: Apply Android 13 5.15 Fixes
       if: inputs.android_version == 'android13' && inputs.kernel_version == '5.15'
       if: inputs.android_version == 'android13' && inputs.kernel_version == '5.15'
       shell: bash
       shell: bash
-      working-directory: ${{ inputs.kernel_root }}/common
+      working-directory: ${{ github.workspace }}/kernel/common
       run: |
       run: |
-        echo "Applying Android 13 5.15 specific fixes..."
+        # Android 13 5.15 fixes
         SUBLEVEL=${{ inputs.sublevel }}
         SUBLEVEL=${{ inputs.sublevel }}
         SUSFS_VERSION=${{ env.SUSFS_VERSION }}
         SUSFS_VERSION=${{ env.SUSFS_VERSION }}
         
         
         if [ "$SUBLEVEL" -le 41 ]; then
         if [ "$SUBLEVEL" -le 41 ]; then
-          cp ${{ inputs.kernel_patches }}/wild/susfs_fix_patches/v${SUSFS_VERSION}/a13-5.15/namespace.c.patch ./
+          cp ${{ github.workspace }}/kernel_patches/wild/susfs_fix_patches/v${SUSFS_VERSION}/a13-5.15/namespace.c.patch ./
           patch -p1 < namespace.c.patch
           patch -p1 < namespace.c.patch
           
           
-          cp ${{ inputs.kernel_patches }}/wild/susfs_fix_patches/v${SUSFS_VERSION}/a13-5.15/fdinfo.c.patch ./
+          cp ${{ github.workspace }}/kernel_patches/wild/susfs_fix_patches/v${SUSFS_VERSION}/a13-5.15/fdinfo.c.patch ./
           patch -p1 < fdinfo.c.patch
           patch -p1 < fdinfo.c.patch
           
           
-          cp ${{ inputs.kernel_patches }}/wild/susfs_fix_patches/v${SUSFS_VERSION}/a13-5.15/open.c.patch ./
+          cp ${{ github.workspace }}/kernel_patches/wild/susfs_fix_patches/v${SUSFS_VERSION}/a13-5.15/open.c.patch ./
           patch -p1 < open.c.patch
           patch -p1 < open.c.patch
           
           
           sed -i 's|is_i_uid_not_allowed(i_uid_into_mnt(i_user_ns(inode), inode).val)))|is_i_uid_not_allowed(inode->i_uid.val)))|g' fs/susfs.c
           sed -i 's|is_i_uid_not_allowed(i_uid_into_mnt(i_user_ns(inode), inode).val)))|is_i_uid_not_allowed(inode->i_uid.val)))|g' fs/susfs.c
@@ -124,57 +118,50 @@ runs:
         if [[ "$SUBLEVEL" -le 148 && "${{ inputs.os_patch_level }}" != "2024-05" ]]; then
         if [[ "$SUBLEVEL" -le 148 && "${{ inputs.os_patch_level }}" != "2024-05" ]]; then
           sed -i -e 's/goto show_pad;/return 0;/' ./fs/proc/task_mmu.c
           sed -i -e 's/goto show_pad;/return 0;/' ./fs/proc/task_mmu.c
         fi
         fi
-        echo "✓ Android 13 5.15 fixes applied"
     
     
     - name: Apply Android 14 5.15 Fixes
     - name: Apply Android 14 5.15 Fixes
       if: inputs.android_version == 'android14' && inputs.kernel_version == '5.15'
       if: inputs.android_version == 'android14' && inputs.kernel_version == '5.15'
       shell: bash
       shell: bash
-      working-directory: ${{ inputs.kernel_root }}/common
+      working-directory: ${{ github.workspace }}/kernel/common
       run: |
       run: |
-        echo "Applying Android 14 5.15 specific fixes..."
+        # Android 14 5.15 fixes
         SUBLEVEL=${{ inputs.sublevel }}
         SUBLEVEL=${{ inputs.sublevel }}
         
         
         if [[ "$SUBLEVEL" -le 148 && "${{ inputs.os_patch_level }}" != "2024-05" ]]; then
         if [[ "$SUBLEVEL" -le 148 && "${{ inputs.os_patch_level }}" != "2024-05" ]]; then
           sed -i -e 's/goto show_pad;/return 0;/' ./fs/proc/task_mmu.c
           sed -i -e 's/goto show_pad;/return 0;/' ./fs/proc/task_mmu.c
         fi
         fi
-        echo "✓ Android 14 5.15 fixes applied"
     
     
     - name: Apply Android 14 6.1 Fixes
     - name: Apply Android 14 6.1 Fixes
       if: inputs.android_version == 'android14' && inputs.kernel_version == '6.1'
       if: inputs.android_version == 'android14' && inputs.kernel_version == '6.1'
       shell: bash
       shell: bash
-      working-directory: ${{ inputs.kernel_root }}/common
+      working-directory: ${{ github.workspace }}/kernel/common
       run: |
       run: |
-        echo "Applying Android 14 6.1 specific fixes..."
+        # Android 14 6.1 fixes
         SUBLEVEL=${{ inputs.sublevel }}
         SUBLEVEL=${{ inputs.sublevel }}
         
         
         if [[ "$SUBLEVEL" -le 75 && "${{ inputs.os_patch_level }}" != "2024-05" ]]; then
         if [[ "$SUBLEVEL" -le 75 && "${{ inputs.os_patch_level }}" != "2024-05" ]]; then
           sed -i -e 's/goto show_pad;/return 0;/' ./fs/proc/task_mmu.c
           sed -i -e 's/goto show_pad;/return 0;/' ./fs/proc/task_mmu.c
         fi
         fi
-        echo "✓ Android 14 6.1 fixes applied"
     
     
     - name: Apply Android 15 6.6 Fixes
     - name: Apply Android 15 6.6 Fixes
       if: inputs.android_version == 'android15' && inputs.kernel_version == '6.6'
       if: inputs.android_version == 'android15' && inputs.kernel_version == '6.6'
       shell: bash
       shell: bash
-      working-directory: ${{ inputs.kernel_root }}/common
+      working-directory: ${{ github.workspace }}/kernel/common
       run: |
       run: |
-        echo "Applying Android 15 6.6 specific fixes..."
+        # Android 15 6.6 fixes
         SUBLEVEL=${{ inputs.sublevel }}
         SUBLEVEL=${{ inputs.sublevel }}
         SUSFS_VERSION=${{ env.SUSFS_VERSION }}
         SUSFS_VERSION=${{ env.SUSFS_VERSION }}
         
         
         if [[ "$SUBLEVEL" -ge 98 ]]; then
         if [[ "$SUBLEVEL" -ge 98 ]]; then
-          cp ${{ inputs.kernel_patches }}/wild/susfs_fix_patches/v${SUSFS_VERSION}/a15-6.6/base.c.patch ./
+          cp ${{ github.workspace }}/kernel_patches/wild/susfs_fix_patches/v${SUSFS_VERSION}/a15-6.6/base.c.patch ./
           patch -p1 < base.c.patch
           patch -p1 < base.c.patch
         fi
         fi
         if [[ "$SUBLEVEL" -le 58 ]]; then
         if [[ "$SUBLEVEL" -le 58 ]]; then
-          cp ${{ inputs.kernel_patches }}/wild/susfs_fix_patches/v${SUSFS_VERSION}/a15-6.6/task_mmu.c.patch ./
+          cp ${{ github.workspace }}/kernel_patches/wild/susfs_fix_patches/v${SUSFS_VERSION}/a15-6.6/task_mmu.c.patch ./
           patch -p1 < task_mmu.c.patch
           patch -p1 < task_mmu.c.patch
         fi
         fi
-        echo "✓ Android 15 6.6 fixes applied"
     
     
     - name: SUSFS Setup Complete
     - name: SUSFS Setup Complete
       shell: bash
       shell: bash
       run: |
       run: |
-        echo "✓ SUSFS Setup Complete"
-        echo "  Version: 2.0.0"
-        echo "  Branch: gki-${{ inputs.android_version }}-${{ inputs.kernel_version }}"
-        echo "========================================"
+        # SUSFS setup complete

+ 112 - 0
.github/actions/telegram-notify/action.yml

@@ -0,0 +1,112 @@
+name: 'Telegram Notification'
+description: 'Send Telegram notifications for kernel builds'
+inputs:
+  release_type:
+    description: 'Type of release (Actions, Pre-Release, Release)'
+    required: true
+  new_tag:
+    description: 'New release tag'
+    required: false
+    default: ''
+  release_result:
+    description: 'Result of the release job'
+    required: false
+    default: 'success'
+  telegram_bot_token:
+    description: 'Telegram bot token'
+    required: true
+  telegram_chat_id:
+    description: 'Telegram chat ID for announcements'
+    required: true
+  telegram_topic_id:
+    description: 'Telegram topic/thread ID'
+    required: true
+  telegram_user_id:
+    description: 'Telegram user ID for direct messages'
+    required: true
+  artifact_pattern:
+    description: 'Pattern for artifacts to download'
+    required: false
+    default: '*-TheWildJames-AnyKernel3'
+
+runs:
+  using: "composite"
+  steps:
+    - name: Download Kernel Artifacts
+      uses: actions/download-artifact@v4
+      with:
+        path: ./downloaded-artifacts
+        pattern: ${{ inputs.artifact_pattern }}
+        
+    - name: Prepare Artifact Zips
+      shell: bash
+      run: |
+        shopt -s nullglob
+        # Iterate over directories in downloaded-artifacts
+        for dir in ./downloaded-artifacts/*-AnyKernel3; do
+          [ -d "$dir" ] || continue
+          artifact_name=$(basename "$dir")
+          # Create zip for each artifact
+          (cd "$dir" && zip -r -q -9 "$GITHUB_WORKSPACE/${artifact_name}.zip" ./*)
+        done
+
+    - name: Send Telegram Notification (Actions)
+      if: ${{ inputs.release_type == 'Actions' }}
+      shell: bash
+      run: |
+        curl -X POST "https://api.telegram.org/bot${{ inputs.telegram_bot_token }}/sendMessage" \
+          -F chat_id="${{ inputs.telegram_chat_id }}" \
+          -F message_thread_id="${{ inputs.telegram_topic_id }}" \
+          -F text="
+          🌽 *New Kernel Actions Build Finished*
+          📦 *Repository:* [${{ github.repository }}](https://github.com/${{ github.repository }})
+          ✏️ *Commit:* [${{ github.sha }}](https://github.com/${{ github.repository }}/commit/${{ github.sha }})
+          [🔗 View Action Run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})" \
+          -F parse_mode="Markdown"
+
+    - name: Send Telegram Notification (Release)
+      if: ${{ inputs.release_type != 'Actions' && inputs.release_result == 'success' }}
+      shell: bash
+      run: |
+        RELEASE_TYPE_TEXT=""
+        if [ "${{ inputs.release_type }}" == "Pre-Release" ]; then
+          RELEASE_TYPE_TEXT="🧪 *Pre-Release*"
+        else
+          RELEASE_TYPE_TEXT="🚀 *Release*"
+        fi
+
+        curl -X POST "https://api.telegram.org/bot${{ inputs.telegram_bot_token }}/sendMessage" \
+          -F chat_id="${{ inputs.telegram_chat_id }}" \
+          -F message_thread_id="${{ inputs.telegram_topic_id }}" \
+          -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/${{ inputs.new_tag }})" \
+          -F parse_mode="Markdown"
+
+    - name: Send Direct Message with Artifacts
+      if: always()
+      shell: bash
+      run: |
+        shopt -s nullglob
+        files=("$GITHUB_WORKSPACE"/*.zip)
+
+        if [ ${#files[@]} -eq 0 ]; then
+            echo "No ZIP files found for DM."
+            exit 0
+        fi
+
+        if [ -z "${{ inputs.telegram_user_id }}" ]; then
+            echo "Error: telegram_user_id is not set."
+            exit 1
+        fi
+
+        for file in "${files[@]}"; do
+          # Send each zip to Telegram DM
+          # Using || true to prevent failure of one send from failing the whole action
+          curl -v -F chat_id="${{ inputs.telegram_user_id }}" \
+              -F document=@"$file" \
+              -F caption="📦 Build: $(basename "$file")" \
+              https://api.telegram.org/bot${{ inputs.telegram_bot_token }}/sendDocument || true
+        done

+ 92 - 0
.github/actions/vtomsonek/action.yml

@@ -0,0 +1,92 @@
+name: 'Setup Audio Modules'
+description: 'Configure SND audio modules for vTomsonek variant'
+inputs:
+  android_version:
+    description: 'Android version'
+    required: true
+  kernel_version:
+    description: 'Kernel version'
+    required: true
+  sublevel:
+    description: 'Kernel sublevel'
+    required: true
+  os_patch_level:
+    description: 'OS patch level'
+    required: true
+
+runs:
+  using: "composite"
+  steps:
+    - name: Configure SND Audio Modules
+      shell: bash
+      working-directory: ${{ github.workspace }}/kernel
+      run: |
+        cat >> "${{ github.workspace }}/wild_gki.fragment" << 'EOF'
+        # Sound Configuration
+        CONFIG_SND=y
+        CONFIG_SND_DRIVERS=y
+        CONFIG_SND_PCM=y
+        CONFIG_SND_TIMER=y
+        CONFIG_SND_DYNAMIC_MINORS=y
+        CONFIG_SND_PROC_FS=y
+        CONFIG_SND_ALOOP=m
+        CONFIG_USB_GADGET=y
+        CONFIG_CONFIGFS_FS=y
+        CONFIG_USB_CONFIGFS=y
+        CONFIG_USB_LIBCOMPOSITE=m
+        CONFIG_USB_AUDIO=m
+        CONFIG_USB_CONFIGFS_F_UAC1=y
+        CONFIG_USB_CONFIGFS_F_UAC2=y
+        EOF
+
+        # Add audio modules to gki modules list
+        echo "drivers/usb/gadget/legacy/g_audio.ko" >> common/android/gki_aarch64_modules
+        echo "sound/drivers/snd-aloop.ko" >> common/android/gki_aarch64_modules
+
+        if [[ -f common/modules.bzl ]]; then
+          # Insert audio modules into the module list based on version
+          if [[ "${{ inputs.android_version }}" == "android14" && "${{ inputs.kernel_version }}" == "5.15" && ${{ inputs.sublevel }} -le 110 && "${{ inputs.os_patch_level }}" != "2023-09" ]] \
+          || [[ "${{ inputs.android_version }}" == "android14" && "${{ inputs.kernel_version }}" == "6.1" && ${{ inputs.sublevel }} -le 25 && "${{ inputs.os_patch_level }}" != "2023-09" ]]; then
+            # For older kernel builds
+            sed -i '/COMMON_GKI_MODULES_LIST = \[/,/^[[:space:]]*\]/{/^[[:space:]]*\]$/i\    "sound/drivers/snd-aloop.ko",
+            }' common/modules.bzl
+            sed -i '/COMMON_GKI_MODULES_LIST = \[/,/^[[:space:]]*\]/{/^[[:space:]]*\]$/i\    "drivers/usb/gadget/libcomposite.ko",
+            }' common/modules.bzl
+            sed -i '/COMMON_GKI_MODULES_LIST = \[/,/^[[:space:]]*\]/{/^[[:space:]]*\]$/i\    "drivers/usb/gadget/legacy/g_audio.ko",
+            }' common/modules.bzl
+          else
+            # For newer kernel builds
+            sed -i '/_COMMON_GKI_MODULES_LIST = \[/,/^[[:space:]]*\]/{/^[[:space:]]*\]$/i\    "sound/drivers/snd-aloop.ko",
+            }' common/modules.bzl
+            sed -i '/_COMMON_GKI_MODULES_LIST = \[/,/^[[:space:]]*\]/{/^[[:space:]]*\]$/i\    "drivers/usb/gadget/libcomposite.ko",
+            }' common/modules.bzl
+            sed -i '/_COMMON_GKI_MODULES_LIST = \[/,/^[[:space:]]*\]/{/^[[:space:]]*\]$/i\    "drivers/usb/gadget/legacy/g_audio.ko",
+            }' common/modules.bzl
+          fi
+          
+          # Verify injection success
+          if grep -q '"sound/drivers/snd-aloop.ko"' common/modules.bzl && \
+            grep -q '"drivers/usb/gadget/libcomposite.ko"' common/modules.bzl && \
+            grep -q '"drivers/usb/gadget/legacy/g_audio.ko"' common/modules.bzl && \
+            grep -q '"drivers/usb/gadget/configfs.ko"' common/modules.bzl; then
+            echo "✓ Audio modules injection: successfully added all modules to list"
+          else
+            echo "✗ Audio modules injection: failed to add one or more modules"
+            exit 1
+          fi
+        fi
+
+        # ABI compare bypass per kernel/android version
+        if [[ "${{ inputs.android_version }}" == "android12" && "${{ inputs.kernel_version }}" == "5.10" ]]; then
+          sed -i 's/^\s*exit 1$/    echo "Who Cares? Bypassing Now!"/' build/abi/compare_to_symbol_list
+        elif [[ "${{ inputs.android_version }}" == "android13" && "${{ inputs.kernel_version }}" == "5.10" ]]; then
+          sed -i 's/^\s*exit 1$/    echo "Who Cares? Bypassing Now!"/' build/kernel/abi/compare_to_symbol_list
+        elif [[ "${{ inputs.android_version }}" == "android13" && "${{ inputs.kernel_version }}" == "5.15" ]]; then
+          sed -i 's/^\s*exit 1$/    echo "Who Cares? Bypassing Now!"/' build/kernel/abi/compare_to_symbol_list
+        elif [[ "${{ inputs.android_version }}" == "android14" && "${{ inputs.kernel_version }}" == "5.15" ]]; then
+          perl -i -pe 's/^(\s*)return 1$/$1print("Who Cares? Bypassing Now!")\n$1return 0/g if /if missing_symbols:/../return 1/' build/kernel/abi/check_buildtime_symbol_protection.py
+        elif [[ "${{ inputs.android_version }}" == "android14" && "${{ inputs.kernel_version }}" == "6.1" ]]; then
+          perl -i -pe 's/^(\s*)return 1$/$1print("Who Cares? Bypassing Now!")\n$1return 0/g if /if missing_symbols:/../return 1/' build/kernel/abi/check_buildtime_symbol_protection.py
+        elif [[ "${{ inputs.android_version }}" == "android15" && "${{ inputs.kernel_version }}" == "6.6" ]]; then
+          perl -i -pe 's/^(\s*)return 1$/$1print("Who Cares? Bypassing Now!")\n$1return 0/g if /if missing_symbols:/../return 1/' build/kernel/abi/check_buildtime_symbol_protection.py
+        fi

+ 36 - 0
.github/actions/wksu/action.yml

@@ -0,0 +1,36 @@
+name: Setup Wild KSU
+description: Download and configure Wild KSU with version tracking
+
+runs:
+  using: composite
+  steps:
+    - name: Download Wild KSU
+      shell: bash
+      working-directory: ${{ github.workspace }}/kernel
+      run: |
+        mv "$GITHUB_WORKSPACE/Wild_KSU" ./
+        ./setup.sh
+
+    - name: Enable KernelSU Config
+      shell: bash
+      working-directory: ${{ github.workspace }}/kernel
+      run: |
+        cat >> "${{ github.workspace }}/wild_gki.fragment" << 'EOF'
+        # KernelSU Configuration
+        CONFIG_KSU=y
+        EOF
+    
+    - name: Extract KSU Version Info
+      id: ksu-version
+      shell: bash
+      working-directory: ${{ github.workspace }}/kernel/Wild_KSU
+      run: |
+        # Extract and export KSU version info
+        KSU_GIT_VERSION=$(git rev-list --count HEAD 2>/dev/null)
+        KSU_GIT_TAG=$(git describe --tags --abbrev=0 2>/dev/null)
+        KSU_COMMIT=$(git rev-parse --short HEAD 2>/dev/null)
+        KSU_VERSION=$((30000 + KSU_GIT_VERSION))
+        
+        echo "KSU_GIT_TAG=$KSU_GIT_TAG" >> $GITHUB_ENV
+        echo "KSU_VERSION=$KSU_VERSION" >> $GITHUB_ENV
+        echo "KSU_COMMIT=$KSU_COMMIT" >> $GITHUB_ENV