├── .github └── workflows │ ├── build-kernel-release.yml │ └── build.yml └── README.md /.github/workflows/build-kernel-release.yml: -------------------------------------------------------------------------------- 1 | name: Build and Release OnePlus Kernels 2 | 3 | permissions: 4 | contents: write 5 | actions: write 6 | 7 | on: 8 | workflow_dispatch: 9 | inputs: 10 | make_release: 11 | description: 'Do you want to create a release?' 12 | required: true 13 | type: boolean 14 | default: true 15 | ksun_branch: 16 | description: "Choose KernelSU Next Branch" 17 | required: true 18 | type: choice 19 | options: 20 | - stable 21 | - next 22 | - next-susfs 23 | - next-susfs-dev 24 | default: stable 25 | 26 | jobs: 27 | build-batch-1: # Non Bazel Builds 28 | name: build-batch-1 (${{ matrix.model }}, ${{ matrix.soc }}, ${{ matrix.branch }}, ${{ matrix.manifest }}, ${{ matrix.android_version }}, ${{ matrix.kernel_version }}, ${{ inputs.ksun_branch }}) 29 | strategy: 30 | fail-fast: false 31 | matrix: 32 | include: 33 | - model: OP11 34 | soc: kalama 35 | branch: oneplus/sm8550 36 | manifest: oneplus_11_v.xml 37 | android_version: android13 38 | kernel_version: "5.15" 39 | - model: OP11r 40 | soc: waipio 41 | branch: oneplus/sm8475 42 | manifest: oneplus_11r_v.xml 43 | android_version: android12 44 | kernel_version: "5.10" 45 | - model: OP-OPEN 46 | soc: kalama 47 | branch: oneplus/sm8550 48 | manifest: oneplus_open_v.xml 49 | android_version: android13 50 | kernel_version: "5.15" 51 | - model: OP-ACE-2 52 | soc: waipio 53 | branch: oneplus/sm8475 54 | manifest: oneplus_ace2_v.xml 55 | android_version: android12 56 | kernel_version: "5.10" 57 | - model: OP10t 58 | soc: waipio 59 | branch: oneplus/sm8475 60 | manifest: oneplus_10t_v.xml 61 | android_version: android12 62 | kernel_version: "5.10" 63 | - model: OP10pro 64 | soc: waipio 65 | branch: oneplus/sm8450 66 | manifest: oneplus_10_pro_v.xml 67 | android_version: android12 68 | kernel_version: "5.10" 69 | - model: OP-ACE-2-PRO 70 | soc: kalama 71 | branch: oneplus/sm8550 72 | manifest: oneplus_ace2pro_v.xml 73 | android_version: android13 74 | kernel_version: "5.15" 75 | - model: OP12r 76 | soc: kalama 77 | branch: oneplus/sm8550 78 | manifest: oneplus_12r_v.xml 79 | android_version: android13 80 | kernel_version: "5.15" 81 | uses: ./.github/workflows/build.yml 82 | secrets: inherit 83 | with: 84 | model: ${{ matrix.model }} 85 | soc: ${{ matrix.soc }} 86 | branch: ${{ matrix.branch }} 87 | manifest: ${{ matrix.manifest }} 88 | android_version: ${{ matrix.android_version }} 89 | kernel_version: ${{ matrix.kernel_version }} 90 | ksun_branch: ${{ inputs.ksun_branch }} 91 | 92 | build-batch-2: 93 | # needs: build-batch-1 94 | name: build-batch-2 (${{ matrix.model }}, ${{ matrix.soc }}, ${{ matrix.branch }}, ${{ matrix.manifest }}, ${{ matrix.android_version }}, ${{ matrix.kernel_version }}, ${{ inputs.ksun_branch }}) 95 | strategy: 96 | fail-fast: false 97 | matrix: 98 | include: 99 | - model: OP13 100 | soc: sun 101 | branch: oneplus/sm8750 102 | manifest: oneplus_13.xml 103 | android_version: android15 104 | kernel_version: "6.6" 105 | - model: OPAce5Pro 106 | soc: sun 107 | branch: oneplus/sm8750 108 | manifest: oneplus_ace5_pro.xml 109 | android_version: android15 110 | kernel_version: "6.6" 111 | - model: OP12 112 | soc: pineapple 113 | branch: oneplus/sm8650 114 | manifest: oneplus12_v.xml 115 | android_version: android14 116 | kernel_version: "6.1" 117 | - model: OP13r 118 | soc: pineapple 119 | branch: oneplus/sm8650 120 | manifest: oneplus_13r.xml 121 | android_version: android14 122 | kernel_version: "6.1" 123 | - model: OP-ACE-5 124 | soc: pineapple 125 | branch: oneplus/sm8650 126 | manifest: oneplus_ace5.xml 127 | android_version: android14 128 | kernel_version: "6.1" 129 | - model: OP-NORD-4 130 | soc: pineapple 131 | branch: oneplus/sm7675 132 | manifest: oneplus_nord_4_v.xml 133 | android_version: android14 134 | kernel_version: "6.1" 135 | - model: OP-PAD-2 136 | soc: pineapple 137 | branch: oneplus/sm8650 138 | manifest: oneplus_pad2_v.xml 139 | android_version: android14 140 | kernel_version: "6.1" 141 | uses: ./.github/workflows/build.yml 142 | secrets: inherit 143 | with: 144 | model: ${{ matrix.model }} 145 | soc: ${{ matrix.soc }} 146 | branch: ${{ matrix.branch }} 147 | manifest: ${{ matrix.manifest }} 148 | android_version: ${{ matrix.android_version }} 149 | kernel_version: ${{ matrix.kernel_version }} 150 | ksun_branch: ${{ inputs.ksun_branch }} 151 | 152 | trigger-release: 153 | needs: 154 | - build-batch-1 155 | - build-batch-2 156 | runs-on: ubuntu-latest 157 | if: ${{ inputs.make_release }} 158 | env: 159 | REPO_OWNER: ${{ github.repository_owner }} 160 | REPO_NAME: ${{ github.event.repository.name }} 161 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 162 | RELEASE_NAME: "*TEST BUILD* OnePlus Kernels With KernelSU Next & SUSFS v1.5.7 *TEST BUILD*" 163 | RELEASE_NOTES: | 164 | This release contains KernelSU Next and SUSFS v1.5.7 165 | 166 | Module: 167 | -> https://github.com/sidex15/ksu_module_susfs 168 | 169 | Non-Official Managers: 170 | -> https://github.com/KernelSU-Next/KernelSU-Next 171 | 172 | Features: 173 | [+] KernelSU-Next 174 | [+] SUSFS v1.5.7 175 | [+] Wireguard Support 176 | [+] Maphide LineageOS Detections 177 | [+] Futile Maphide for jit-zygote-cache Detections 178 | [+] Magic Mount Support 179 | 180 | steps: 181 | - name: Checkout code 182 | uses: actions/checkout@v3 183 | 184 | - name: Generate and Create New Tag 185 | run: | 186 | BASE_TAG="v1.5.7-r0" 187 | LATEST_TAG=$(gh api repos/$REPO_OWNER/$REPO_NAME/tags --jq '.[0].name') 188 | if [ -z "$LATEST_TAG" ]; then 189 | LATEST_TAG="$BASE_TAG" 190 | else 191 | LATEST_TAG=$(printf "%s\n%s\n" "$LATEST_TAG" "$BASE_TAG" | sort -rV | head -n1) 192 | fi 193 | NEW_TAG=$(echo "$LATEST_TAG" | awk -F'-r' '{suffix=$2; if (!suffix) suffix=0; suffix++; printf "%s-r%d", $1, suffix}') 194 | echo "New tag: $NEW_TAG" 195 | echo "NEW_TAG=${NEW_TAG}" >> $GITHUB_ENV 196 | git tag $NEW_TAG 197 | git push origin $NEW_TAG 198 | 199 | - name: Download Artifacts 200 | uses: actions/download-artifact@v4 201 | with: 202 | path: ./downloaded-artifacts 203 | 204 | - name: Create GitHub Release 205 | uses: actions/create-release@v1 206 | with: 207 | tag_name: ${{ env.NEW_TAG }} 208 | prerelease: true 209 | release_name: ${{ env.RELEASE_NAME }} 210 | body: ${{ env.RELEASE_NOTES }} 211 | env: 212 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 213 | 214 | - name: Upload Release Assets Dynamically 215 | run: | 216 | for file in ./downloaded-artifacts/kernel-*/*; do 217 | if [ -d "$file" ]; then 218 | continue 219 | fi 220 | echo "Uploading $file..." 221 | gh release upload ${{ env.NEW_TAG }} "$file" 222 | done 223 | env: 224 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 225 | NEW_TAG: ${{ env.NEW_TAG }} 226 | 227 | - name: Display Files Uploaded 228 | run: | 229 | echo "GitHub release created with the following files:" 230 | ls ./downloaded-artifacts/**/* 231 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | permissions: 3 | contents: write # Allow writing to repository contents (for pushing tags) 4 | actions: write # Allows triggering actions 5 | 6 | on: 7 | workflow_call: # This allows this workflow to be called from another workflow 8 | inputs: 9 | model: 10 | required: true 11 | type: string 12 | soc: 13 | required: true 14 | type: string 15 | branch: 16 | required: true 17 | type: string 18 | manifest: 19 | required: true 20 | type: string 21 | android_version: 22 | required: true 23 | type: string 24 | kernel_version: 25 | required: true 26 | type: string 27 | ksun_branch: 28 | required: true 29 | type: string 30 | default: stable 31 | 32 | jobs: 33 | build-kernel-oneplus-kernelsu-susfs: 34 | runs-on: ubuntu-latest 35 | 36 | steps: 37 | - name: Setup System 38 | run: | 39 | export DEBIAN_FRONTEND=noninteractive 40 | echo "DEBIAN_FRONTEND=noninteractive" >> $GITHUB_ENV 41 | 42 | df -h 43 | 44 | sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /usr/local/.ghcup /opt/hostedtoolcache/CodeQL /usr/local/share/powershell /usr/share/swift || true 45 | sudo docker image prune --all --force 46 | echo "some directories deleted" 47 | 48 | # Remove large unwanted packages 49 | sudo apt-get purge -y \ 50 | aria2 ansible azure-cli shellcheck rpm xorriso zsync \ 51 | esl-erlang firefox gfortran-8 gfortran-9 google-chrome-stable \ 52 | google-cloud-sdk imagemagick \ 53 | libmagickcore-dev libmagickwand-dev libmagic-dev ant ant-optional kubectl \ 54 | mercurial apt-transport-https mono-complete libmysqlclient \ 55 | unixodbc-dev yarn chrpath libssl-dev libxft-dev \ 56 | libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev \ 57 | snmp pollinate libpq-dev postgresql-client powershell ruby-full \ 58 | sphinxsearch subversion mongodb-org microsoft-edge-stable || true 59 | 60 | # Regex-based purges (for bulk families like mysql, php, dotnet) 61 | sudo apt-get purge -y $(dpkg-query -W -f='${binary:Package}\n' | grep -E '^mysql|^php|^dotnet') || true 62 | 63 | # Clean up 64 | sudo apt-get autoremove -y 65 | sudo apt-get autoclean -y 66 | echo "some packages purged" 67 | 68 | df -h 69 | 70 | - name: Install Repo and Python 71 | run: | 72 | # Install dependencies 73 | sudo apt update 74 | sudo apt install -y python3 python-is-python3 75 | 76 | mkdir -p ./git-repo 77 | curl -sSL https://storage.googleapis.com/git-repo-downloads/repo > ./git-repo/repo 78 | chmod a+rx ./git-repo/repo 79 | echo "REPO=$GITHUB_WORKSPACE/./git-repo/repo" >> $GITHUB_ENV 80 | 81 | - name: Set CONFIG Environment Variable 82 | run: | 83 | CONFIG="${{ inputs.model }}" 84 | 85 | # Set CONFIG as an environment variable for future steps 86 | echo "CONFIG=$CONFIG" >> $GITHUB_ENV 87 | 88 | echo "CONFIG set to: $CONFIG" 89 | 90 | - name: Clone AnyKernel3 and Other Dependencies 91 | run: | 92 | echo "Cloning AnyKernel3 and other dependencies..." 93 | 94 | ANYKERNEL_BRANCH="gki-2.0" 95 | SUSFS_BRANCH="gki-${{ inputs.android_version }}-${{ inputs.kernel_version }}" 96 | 97 | # Debug print the branches 98 | echo "Using branch for AnyKernel3: $ANYKERNEL_BRANCH" 99 | echo "Using branch for SUSFS: $SUSFS_BRANCH" 100 | 101 | # Clone repositories using the branch names 102 | git clone https://github.com/TheWildJames/AnyKernel3.git -b "$ANYKERNEL_BRANCH" 103 | git clone https://gitlab.com/simonpunk/susfs4ksu.git -b "$SUSFS_BRANCH" 104 | git clone https://github.com/TheWildJames/kernel_patches.git 105 | 106 | - name: Initialize and Sync Kernel Source 107 | run: | 108 | echo "Creating folder for configuration: $CONFIG..." 109 | mkdir -p "$CONFIG" 110 | cd "$CONFIG" 111 | 112 | # Initialize and sync kernel source 113 | echo "Initializing and syncing kernel source..." 114 | $REPO init -u https://github.com/OnePlusOSS/kernel_manifest.git -b ${{ inputs.branch }} -m ${{ inputs.manifest }} --repo-rev=v2.16 --depth=1 --no-clone-bundle --no-tags 115 | 116 | # Sync repo and apply patches 117 | $REPO --version 118 | $REPO --trace sync -c --no-clone-bundle --no-tags --optimized-fetch -j$(nproc --all) --fail-fast 119 | 120 | - name: Add KernelSU Next 121 | run: | 122 | echo "Changing to configuration directory: $CONFIG..." 123 | cd "$CONFIG/kernel_platform" 124 | 125 | echo "Adding KernelSU Next..." 126 | 127 | if [ "${{ inputs.ksun_branch }}" == "stable" ]; then 128 | curl -LSs "https://raw.githubusercontent.com/KernelSU-Next/KernelSU-Next/next/kernel/setup.sh" | bash - 129 | else 130 | curl -LSs "https://raw.githubusercontent.com/KernelSU-Next/KernelSU-Next/next/kernel/setup.sh" | bash -s ${{ inputs.ksun_branch }} 131 | fi 132 | 133 | git submodule update --init --recursive 134 | 135 | - name: Apply SUSFS Patches 136 | run: | 137 | echo "Changing to configuration directory: $CONFIG..." 138 | cd "$CONFIG/kernel_platform" 139 | 140 | echo "Applying SUSFS patches..." 141 | 142 | # Copy SUSFS patches 143 | cp ../../susfs4ksu/kernel_patches/50_add_susfs_in_gki-${{ inputs.android_version }}-${{ inputs.kernel_version }}.patch ./common/ 144 | cp ../../susfs4ksu/kernel_patches/fs/* ./common/fs/ 145 | cp ../../susfs4ksu/kernel_patches/include/linux/* ./common/include/linux/ 146 | 147 | cd ./KernelSU-Next 148 | 149 | if [ "${{ inputs.ksun_branch }}" == "stable" ] || [ "${{ inputs.ksun_branch }}" == "next" ]; then 150 | echo "Applying next SUSFS patches..." 151 | cp ../../../kernel_patches/next/0001-kernel-patch-susfs-v1.5.7-to-KernelSU-Next-v1.0.7.patch ./ksun_susfs_latest.patch 152 | patch -p1 --forward < ksun_susfs_latest.patch || true 153 | fi 154 | 155 | # Determine base version based on branch 156 | case "${{ inputs.ksun_branch }}" in 157 | next|stable) 158 | BASE_VERSION=10200 159 | ;; 160 | next-susfs|next-susfs-dev) 161 | BASE_VERSION=10198 162 | ;; 163 | *) 164 | BASE_VERSION=10200 165 | ;; 166 | esac 167 | 168 | cd ./kernel 169 | KSU_VERSION=$(expr $(/usr/bin/git rev-list --count HEAD) "+" $BASE_VERSION) 170 | echo "KSUVER=$KSU_VERSION" >> $GITHUB_ENV 171 | sed -i "s/DKSU_VERSION=11998/DKSU_VERSION=${KSU_VERSION}/" Makefile 172 | 173 | # Change to common directory and apply SUSFS patch 174 | cd ../../common 175 | if [ "${{ inputs.soc }}" == "sun" ]; then 176 | sed -i '/#include /a #include ' ./fs/namespace.c 177 | fi 178 | patch -p1 < 50_add_susfs_in_gki-${{ inputs.android_version }}-${{ inputs.kernel_version }}.patch || true 179 | 180 | - name: Apply KSUN Hooks 181 | run: | 182 | echo "Changing to configuration directory: $CONFIG..." 183 | cd "$CONFIG/kernel_platform/common" 184 | echo "Applying KSUN Hooks..." 185 | cp ../../../kernel_patches/next/syscall_hooks.patch ./ 186 | patch -p1 --fuzz=3 < ./syscall_hooks.patch 187 | 188 | - name: Apply Hide Stuff Patches 189 | run: | 190 | echo "Changing to configuration directory: $CONFIG..." 191 | cd "$CONFIG/kernel_platform/common" 192 | # Apply additional patch 193 | cp ../../../kernel_patches/69_hide_stuff.patch ./ 194 | patch -p1 -F 3 < 69_hide_stuff.patch 195 | 196 | - name: Add KernelSU-Next and SUSFS Configuration Settings 197 | run: | 198 | echo "Changing to configuration directory: $CONFIG..." 199 | cd "$CONFIG/kernel_platform" 200 | 201 | echo "Adding configuration settings to gki_defconfig..." 202 | 203 | # Add KSU configuration settings 204 | echo "CONFIG_KSU=y" >> ./common/arch/arm64/configs/gki_defconfig 205 | echo "CONFIG_KSU_KPROBES_HOOK=n" >> ./common/arch/arm64/configs/gki_defconfig 206 | 207 | # Add SUSFS configuration settings 208 | echo "CONFIG_KSU_SUSFS=y" >> ./common/arch/arm64/configs/gki_defconfig 209 | echo "CONFIG_KSU_SUSFS_HAS_MAGIC_MOUNT=y" >> ./common/arch/arm64/configs/gki_defconfig 210 | echo "CONFIG_KSU_SUSFS_SUS_PATH=y" >> ./common/arch/arm64/configs/gki_defconfig 211 | echo "CONFIG_KSU_SUSFS_SUS_MOUNT=y" >> ./common/arch/arm64/configs/gki_defconfig 212 | echo "CONFIG_KSU_SUSFS_AUTO_ADD_SUS_KSU_DEFAULT_MOUNT=y" >> ./common/arch/arm64/configs/gki_defconfig 213 | echo "CONFIG_KSU_SUSFS_AUTO_ADD_SUS_BIND_MOUNT=y" >> ./common/arch/arm64/configs/gki_defconfig 214 | echo "CONFIG_KSU_SUSFS_SUS_KSTAT=y" >> ./common/arch/arm64/configs/gki_defconfig 215 | echo "CONFIG_KSU_SUSFS_SUS_OVERLAYFS=n" >> ./common/arch/arm64/configs/gki_defconfig 216 | echo "CONFIG_KSU_SUSFS_TRY_UMOUNT=y" >> ./common/arch/arm64/configs/gki_defconfig 217 | echo "CONFIG_KSU_SUSFS_AUTO_ADD_TRY_UMOUNT_FOR_BIND_MOUNT=y" >> ./common/arch/arm64/configs/gki_defconfig 218 | echo "CONFIG_KSU_SUSFS_SPOOF_UNAME=y" >> ./common/arch/arm64/configs/gki_defconfig 219 | echo "CONFIG_KSU_SUSFS_ENABLE_LOG=y" >> ./common/arch/arm64/configs/gki_defconfig 220 | echo "CONFIG_KSU_SUSFS_HIDE_KSU_SUSFS_SYMBOLS=y" >> ./common/arch/arm64/configs/gki_defconfig 221 | echo "CONFIG_KSU_SUSFS_SPOOF_CMDLINE_OR_BOOTCONFIG=y" >> ./common/arch/arm64/configs/gki_defconfig 222 | echo "CONFIG_KSU_SUSFS_OPEN_REDIRECT=y" >> ./common/arch/arm64/configs/gki_defconfig 223 | echo "CONFIG_KSU_SUSFS_SUS_SU=n" >> ./common/arch/arm64/configs/gki_defconfig 224 | 225 | # Add additional tmpfs config setting 226 | echo "CONFIG_TMPFS_XATTR=y" >> ./common/arch/arm64/configs/gki_defconfig 227 | echo "CONFIG_TMPFS_POSIX_ACL=y" >> ./common/arch/arm64/configs/gki_defconfig 228 | 229 | - name: Add BBR Support 230 | run: | 231 | echo "Changing to configuration directory: $CONFIG..." 232 | cd "$CONFIG/kernel_platform" 233 | 234 | echo "Adding configuration settings to gki_defconfig..." 235 | echo "CONFIG_TCP_CONG_ADVANCED=y" >> ./common/arch/arm64/configs/gki_defconfig 236 | echo "CONFIG_TCP_CONG_BBR=y" >> ./common/arch/arm64/configs/gki_defconfig 237 | echo "CONFIG_TCP_CONG_BIC=y" >> ./common/arch/arm64/configs/gki_defconfig 238 | echo "CONFIG_TCP_CONG_WESTWOOD=y" >> ./common/arch/arm64/configs/gki_defconfig 239 | echo "CONFIG_TCP_CONG_HTCP=y" >> ./common/arch/arm64/configs/gki_defconfig 240 | 241 | echo "CONFIG_NET_SCH_FQ=y" >> ./common/arch/arm64/configs/gki_defconfig 242 | echo "CONFIG_NET_SCH_FQ_CODEL=y" >> ./common/arch/arm64/configs/gki_defconfig 243 | 244 | - name: Add TTL Target Support 245 | run: | 246 | echo "Changing to configuration directory: $CONFIG..." 247 | cd "$CONFIG/kernel_platform" 248 | 249 | echo "Adding configuration settings to gki_defconfig..." 250 | echo "CONFIG_IP_NF_TARGET_TTL=y" >> ./common/arch/arm64/configs/gki_defconfig 251 | echo "CONFIG_IP6_NF_TARGET_HL=y" >> ./common/arch/arm64/configs/gki_defconfig 252 | echo "CONFIG_IP6_NF_MATCH_HL=y" >> ./common/arch/arm64/configs/gki_defconfig 253 | 254 | - name: Run sed and perl Commands 255 | run: | 256 | echo "Changing to configuration directory: $CONFIG..." 257 | cd "$CONFIG/kernel_platform" 258 | 259 | echo "Running sed commands..." 260 | 261 | sed -i 's/CONFIG_LTO=n/CONFIG_LTO=y/' "./common/arch/arm64/configs/gki_defconfig" 262 | sed -i 's/CONFIG_LTO_CLANG_FULL=y/CONFIG_LTO_CLANG_THIN=y/' "./common/arch/arm64/configs/gki_defconfig" 263 | sed -i 's/CONFIG_LTO_CLANG_NONE=y/CONFIG_LTO_CLANG_THIN=y/' "./common/arch/arm64/configs/gki_defconfig" 264 | 265 | # Run sed commands for modifications 266 | sed -i 's/check_defconfig//' ./common/build.config.gki 267 | sed -i '$s|echo "\$res"|echo "\$res-Wild"|' ./common/scripts/setlocalversion 268 | sed -i '$s|echo "\$res"|echo "\$res-Wild"|' ./msm-kernel/scripts/setlocalversion 269 | sed -i '$s|echo "\$res"|echo "\$res-Wild"|' ./external/dtc/scripts/setlocalversion 270 | sed -i "/stable_scmversion_cmd/s/-maybe-dirty//g" ./build/kernel/kleaf/impl/stamp.bzl || echo "No stamp.bzl!" 271 | sed -i 's/-dirty//' ./common/scripts/setlocalversion 272 | sed -i 's/-dirty//' ./msm-kernel/scripts/setlocalversion 273 | sed -i 's/-dirty//' ./external/dtc/scripts/setlocalversion 274 | sed -i 's/-dirty//' ./build/kernel/kleaf/workspace_status_stamp.py || echo "No workspace_status_stamp.py!" 275 | 276 | sed -i '/echo "LTO $LTO "/i export LTO=thin' ./oplus/build/oplus_setup.sh 277 | sed -i 's/export REPACK_IMG=true/export REPACK_IMG=false/g' ./oplus/build/oplus_setup.sh 278 | 279 | # Run perl command to modify UTS_VERSION 280 | DATESTR=$(date -u) 281 | perl -pi -e 's{UTS_VERSION="\$\(echo \$UTS_VERSION \$CONFIG_FLAGS \$TIMESTAMP \| cut -b -\$UTS_LEN\)"}{UTS_VERSION="#1 SMP PREEMPT $DATESTR"}' ./common/scripts/mkcompile_h 282 | perl -pi -e 's{UTS_VERSION="\$\(echo \$UTS_VERSION \$CONFIG_FLAGS \$TIMESTAMP \| cut -b -\$UTS_LEN\)"}{UTS_VERSION="#1 SMP PREEMPT $DATESTR"}' ./msm-kernel/scripts/mkcompile_h 283 | 284 | # find . -type f -exec sed -i 's/\(make\s\+-C[^\n]*\)\s\+/\1 -j$(nproc) /g' {} + 285 | 286 | - name: Build the Kernel 287 | run: | 288 | echo "Changing to configuration directory: $CONFIG..." 289 | cd "$CONFIG" 290 | 291 | echo "Building the kernel..." 292 | # Clear Cache 293 | sudo sh -c 'sync; echo 3 > /proc/sys/vm/drop_caches' 294 | 295 | rm ./kernel_platform/common/android/abi_gki_protected_exports_* || echo "No protected exports!" 296 | rm ./kernel_platform/msm-kernel/android/abi_gki_protected_exports_* || echo "No protected exports!" 297 | 298 | BUILD_TYPE="gki" 299 | BAZEL_ARGS=(--jobs=$(nproc --all) --lto=thin) 300 | if [ "${{ inputs.soc }}" == "sun" ]; then 301 | BUILD_TYPE="perf" 302 | BAZEL_ARGS+=(-g) 303 | fi 304 | 305 | (stdbuf -oL bash -c ' 306 | while true; do 307 | echo "=== $(date) ===" 308 | free -h 309 | echo "======" 310 | df -h 311 | echo "======" 312 | top -b -n 1 | head -n 15 313 | echo "" 314 | sleep 60 315 | done 316 | ') & 317 | MONITOR_PID=$! 318 | trap "kill $MONITOR_PID" EXIT 319 | 320 | if [ -f ./kernel_platform/build_with_bazel.py ]; then 321 | ./kernel_platform/oplus/bazel/oplus_modules_variant.sh ${{ inputs.soc }} "$BUILD_TYPE" "" 322 | ./kernel_platform/build_with_bazel.py -t ${{ inputs.soc }} $BUILD_TYPE "${BAZEL_ARGS[@]}" -o "$(pwd)/out" 323 | else 324 | LTO=thin ./kernel_platform/oplus/build/oplus_build_kernel.sh ${{ inputs.soc }} "$BUILD_TYPE" 325 | fi 326 | 327 | - name: Copy Images 328 | run: | 329 | echo "Changing to configuration directory: $CONFIG..." 330 | cd "$CONFIG" 331 | 332 | echo "Copying Image" 333 | cp ./out/dist/Image ../AnyKernel3/Image 334 | if [ "${{ inputs.model }}" == "OPAce5Pro" ]; then 335 | cp ./out/dist/dtbo.img ../AnyKernel3/ 336 | cp ./out/dist/system_dlkm.erofs.img ../AnyKernel3/system_dlkm.img 337 | # cp ./out/dist/vendor_dlkm.img ../AnyKernel3/ 338 | # cp ./out/dist/vendor_boot.img ../AnyKernel3/ 339 | fi 340 | 341 | - name: Create ZIP Files for Different Formats 342 | run: | 343 | echo "Navigating to AnyKernel3 directory..." 344 | cd ./AnyKernel3 345 | 346 | # Zip the files in the AnyKernel3 directory with a new naming convention 347 | ZIP_NAME="${{ inputs.model }}_${{ inputs.android_version }}_${{ inputs.kernel_version }}_Next_SUSFS_AnyKernel3.zip" 348 | echo "Creating zip file $ZIP_NAME..." 349 | zip -r "../$ZIP_NAME" ./* 350 | # Fengchi Patch for OPAce5Pro 351 | if [ "${{ inputs.model }}" == "OPAce5Pro" ]; then 352 | sed -i 's/hmbird/xxbird/g' dtbo.img 353 | zip -r "../$ZIP_NAME-CN-version.zip" ./* 354 | fi 355 | 356 | - name: Upload Build Artifacts 357 | uses: actions/upload-artifact@v4 358 | with: 359 | name: kernel-${{ env.CONFIG }} 360 | path: | 361 | *.zip 362 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Wild Kernels for Android 2 | 3 | ## Your warranty is no longer valid! 4 | 5 | I am **not responsible** for bricked devices, damaged hardware, or any issues that arise from using this kernel. 6 | 7 | **Please** do thorough research and fully understand the features included in this kernel before flashing it! 8 | 9 | By flashing this kernel, **YOU** are choosing to make these modifications. If something goes wrong, **do not blame me**! 10 | 11 | --- 12 | 13 | ### Proceed at your own risk! 14 | 15 | --- 16 | 17 | # Kernels: 18 | 19 | [GKI](https://github.com/WildKernels/GKI_KernelSU_SUSFS) 20 | [Sultan](https://github.com/WildKernels/Sultan_KernelSU_SUSFS) 21 | [OnePlus](https://github.com/WildKernels/OnePlus_KernelSU_SUSFS) 22 | [Legacy Pixels](https://github.com/WildKernels/Pixel_KernelSU_SUSFS) 23 | 24 | --- 25 | 26 | # Other Links: 27 | 28 | [Kernel Patches](https://github.com/WildKernels/kernel_patches) 29 | [Old Build Scripts](https://github.com/TheWildJames/kernel_build_scripts) 30 | [Horizon Kernel Flasher](https://github.com/libxzr/HorizonKernelFlasher) 31 | 32 | --- 33 | 34 | # Installation instructions: 35 | 36 | Follow the steps for GKI: 37 | [Installation](https://kernelsu.org/guide/installation.html) 38 | 39 | To get boot.img format: 40 | [Get My Kernel Format](https://github.com/TheWildJames/Get_My_Kernel_Format) 41 | 42 | --- 43 | 44 | # Features 45 | 46 | - **KernelSU**: KernelSU is a root solution for Android GKI devices, it works in kernel mode and grants root permission to userspace applications directly in kernel space. 47 | - **SUSFS**: An addon root hiding kernel patches and userspace module for KernelSU. 48 | 49 | --- 50 | 51 | # Credits 52 | 53 | - **KernelSU**: Developed by [tiann](https://github.com/tiann/KernelSU). 54 | - **KernelSU-Next**: Developed by [rifsxd](https://github.com/KernelSU-Next/KernelSU-Next). 55 | - **Magic-KSU**: Developed by [5ec1cff](https://github.com/5ec1cff/KernelSU). 56 | - **SUSFS**: Developed by [simonpunk](https://gitlab.com/simonpunk/susfs4ksu.git). 57 | - **SUSFS Module**: Developed by [sidex15](https://github.com/sidex15). 58 | - **Sultan Kernels**: Developed by [kerneltoast](https://github.com/kerneltoast). 59 | 60 | Special thanks to the open-source community for their contributions! 61 | 62 | --- 63 | 64 | # Support 65 | 66 | If you encounter any issues or need help, feel free to open an issue in this repository or reach out to me. 67 | 68 | --- 69 | 70 | # Disclaimer 71 | 72 | Flashing this kernel will void your warranty, and there is always a risk of bricking your device. Please make sure to back up your data and ensure you understand the risks before proceeding. 73 | 74 | **Proceed at your own risk!** 75 | 76 | --- 77 | 78 | # To-DO 79 | 80 | - [X] Get Stoned & Build kernels! 81 | 82 | --- 83 | 84 | [Telegram](https://t.me/TheWildJames) 85 | [Telegram Group](https://t.me/WildKernels) 86 | 87 | # Special thanks to the following people for their contributions! 88 | This helps me alot! <3 89 | 90 | [simonpunk](https://gitlab.com/simonpunk/susfs4ksu.git) - Created SUSFS! 91 | [sidex15](https://github.com/sidex15) - Created module! 92 | [backslashxx](https://github.com/backslashxx) - Helped with patches! 93 | [Teemo](https://github.com/liqideqq) - Helped with patches! 94 | [幕落](https://github.com/MuLuo688) - Donation! 95 | 96 | If you have contributed and are not here please remind me! 97 | --------------------------------------------------------------------------------