mirror of
https://github.com/Dichgrem/GKI-build.git
synced 2025-12-18 14:42:00 -05:00
Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3967a0ecca | ||
|
|
2686d6a135 | ||
|
|
49aca10ce6 | ||
|
|
75ed232bb3 | ||
|
|
943277d590 | ||
|
|
70a8794285 | ||
|
|
3727b78483 | ||
|
|
8d2e7cab3c | ||
|
|
51c3213124 | ||
|
|
e7b2b4892a | ||
|
|
1b9fec2bb3 | ||
|
|
5bbbe4bde1 | ||
|
|
2f31bb26a3 | ||
|
|
ba5b6e35f8 |
254
.github/workflows/build-gki-kernel.yml
vendored
254
.github/workflows/build-gki-kernel.yml
vendored
@@ -3,18 +3,44 @@ name: Build Ace3Pro Kernel
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
enable_susfs:
|
enable_bbr:
|
||||||
description: "Enable susfs support"
|
description: "Enable BBR support"
|
||||||
required: false
|
required: false
|
||||||
default: "true"
|
default: "false"
|
||||||
type: boolean
|
type: boolean
|
||||||
config_source:
|
enable_kpm:
|
||||||
description: "Choose config source for myconfig"
|
description: "Enable KPM support"
|
||||||
required: true
|
required: false
|
||||||
default: "repo"
|
default: "false"
|
||||||
|
type: boolean
|
||||||
|
enable_zram:
|
||||||
|
description: "Enable ZRAM support"
|
||||||
|
required: false
|
||||||
|
default: "false"
|
||||||
|
type: boolean
|
||||||
|
enable_sched:
|
||||||
|
description: "Enable SCHED support"
|
||||||
|
required: false
|
||||||
|
default: "false"
|
||||||
|
type: boolean
|
||||||
|
enable_susfs:
|
||||||
|
description: "Enable SUSFS support"
|
||||||
|
required: false
|
||||||
|
default: "false"
|
||||||
|
type: boolean
|
||||||
|
enable_lsm:
|
||||||
|
description: "Enable LSM_BBG support"
|
||||||
|
required: false
|
||||||
|
default: "false"
|
||||||
|
type: boolean
|
||||||
|
lto_solution:
|
||||||
|
description: "Select the level of lto"
|
||||||
|
required: false
|
||||||
|
default: "thin"
|
||||||
type: choice
|
type: choice
|
||||||
options:
|
options:
|
||||||
- repo
|
- thin
|
||||||
|
- full
|
||||||
root_solution:
|
root_solution:
|
||||||
description: "Choose root solution to integrate"
|
description: "Choose root solution to integrate"
|
||||||
required: false
|
required: false
|
||||||
@@ -25,11 +51,6 @@ on:
|
|||||||
- kernelsu
|
- kernelsu
|
||||||
- kernelsu-next
|
- kernelsu-next
|
||||||
- none
|
- none
|
||||||
kernel_name:
|
|
||||||
description: "Custom kernel name (optional)"
|
|
||||||
required: false
|
|
||||||
default: "GKI"
|
|
||||||
type: string
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-kernel:
|
build-kernel:
|
||||||
@@ -53,7 +74,7 @@ jobs:
|
|||||||
pahole dwarves zip gcc g++
|
pahole dwarves zip gcc g++
|
||||||
gcc --version
|
gcc --version
|
||||||
|
|
||||||
- name: Setup toolchains & directories
|
- name: Setup clang toolchains
|
||||||
run: |
|
run: |
|
||||||
set -e
|
set -e
|
||||||
echo "WORKDIR=$WORKDIR"
|
echo "WORKDIR=$WORKDIR"
|
||||||
@@ -78,7 +99,7 @@ jobs:
|
|||||||
|
|
||||||
echo "✅ Setup toolchains -> OK"
|
echo "✅ Setup toolchains -> OK"
|
||||||
|
|
||||||
- name: Setup & Clone Kernel
|
- name: Clone & Setup Kernel
|
||||||
run: |
|
run: |
|
||||||
set -e
|
set -e
|
||||||
mkdir -p "$WORKDIR"
|
mkdir -p "$WORKDIR"
|
||||||
@@ -102,7 +123,7 @@ jobs:
|
|||||||
# 设置 KERNEL_DIR 环境变量
|
# 设置 KERNEL_DIR 环境变量
|
||||||
echo "KERNEL_DIR=android_kernel_oneplus_sm8650" >> $GITHUB_ENV
|
echo "KERNEL_DIR=android_kernel_oneplus_sm8650" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Copy and configure kernel config
|
- name: Copy and configure config
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
echo "WORKDIR=$WORKDIR"
|
echo "WORKDIR=$WORKDIR"
|
||||||
@@ -134,8 +155,7 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
- name: Install Root solution
|
||||||
- name: Install root solution
|
|
||||||
run: |
|
run: |
|
||||||
cd "$WORKDIR/$KERNEL_DIR"
|
cd "$WORKDIR/$KERNEL_DIR"
|
||||||
export KCONFIG_CONFIG="$PWD/arch/arm64/configs/config_defconfig"
|
export KCONFIG_CONFIG="$PWD/arch/arm64/configs/config_defconfig"
|
||||||
@@ -154,7 +174,7 @@ jobs:
|
|||||||
;;
|
;;
|
||||||
sukisu)
|
sukisu)
|
||||||
echo "✅ 集成 SukiSU-Ultra"
|
echo "✅ 集成 SukiSU-Ultra"
|
||||||
curl -LSs https://raw.githubusercontent.com/SukiSU-Ultra/SukiSU-Ultra/main/kernel/setup.sh | bash -s main
|
curl -LSs https://raw.githubusercontent.com/SukiSU-Ultra/SukiSU-Ultra/main/kernel/setup.sh | bash -s susfs-main
|
||||||
echo "ROOT_SUFFIX=_SukiSU" >> $GITHUB_ENV
|
echo "ROOT_SUFFIX=_SukiSU" >> $GITHUB_ENV
|
||||||
;;
|
;;
|
||||||
none)
|
none)
|
||||||
@@ -168,10 +188,99 @@ jobs:
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
- name: Apply Susfs patches
|
- name: Enable BBR support
|
||||||
|
run: |
|
||||||
|
if [ "${{ inputs.enable_bbr }}" = "true" ]; then
|
||||||
|
echo "✅ Enabling BBR support"
|
||||||
|
cd "$WORKDIR/$KERNEL_DIR"
|
||||||
|
|
||||||
|
mkdir -p kernel/configs
|
||||||
|
printf '%s\n' \
|
||||||
|
'# Fragment config for enabling BBR' \
|
||||||
|
'CONFIG_TCP_CONG_ADVANCED=y' \
|
||||||
|
'CONFIG_TCP_CONG_BBR=y' \
|
||||||
|
'CONFIG_DEFAULT_BBR=y' \
|
||||||
|
'CONFIG_DEFAULT_TCP_CONG="bbr"' > kernel/configs/bbr.config
|
||||||
|
|
||||||
|
export ARCH=arm64
|
||||||
|
export KCONFIG_CONFIG=arch/arm64/configs/config_defconfig.new
|
||||||
|
|
||||||
|
scripts/kconfig/merge_config.sh -m arch/arm64/configs/config_defconfig kernel/configs/bbr.config
|
||||||
|
mv arch/arm64/configs/config_defconfig.new arch/arm64/configs/config_defconfig
|
||||||
|
echo "✅ BBR patch step finished"
|
||||||
|
else
|
||||||
|
echo "⏩ Skipping BBR support (disabled)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Enable KPM support
|
||||||
|
run: |
|
||||||
|
if [[ "${{ inputs.enable_kpm }}" == "true" && "${{ inputs.root_solution }}" == "sukisu" ]]; then
|
||||||
|
echo "✅ Enabling KPM support"
|
||||||
|
cd "$WORKDIR/$KERNEL_DIR"
|
||||||
|
mkdir -p kernel/configs
|
||||||
|
printf '%s\n' \
|
||||||
|
'# Fragment config for enabling KPM' \
|
||||||
|
'CONFIG_KPM=y' > kernel/configs/kpm.config
|
||||||
|
|
||||||
|
export ARCH=arm64
|
||||||
|
export KCONFIG_CONFIG=arch/arm64/configs/config_defconfig.new
|
||||||
|
scripts/kconfig/merge_config.sh -m arch/arm64/configs/config_defconfig kernel/configs/kpm.config
|
||||||
|
mv arch/arm64/configs/config_defconfig.new arch/arm64/configs/config_defconfig
|
||||||
|
echo "✅ KPM config finished"
|
||||||
|
else
|
||||||
|
echo "ℹ️ KPM patches skipped"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Enable ZRAM support
|
||||||
|
run: |
|
||||||
|
if [ "${{ inputs.enable_zram }}" = "true" ]; then
|
||||||
|
echo "✅ Enabling ZRAM support"
|
||||||
|
cd $GITHUB_WORKSPACE/kernel/
|
||||||
|
git clone https://github.com/ShirkNeko/SukiSU_patch.git
|
||||||
|
cd "$WORKDIR/$KERNEL_DIR"
|
||||||
|
|
||||||
|
echo "正在拉取ZRAM补丁"
|
||||||
|
cp -r ../SukiSU_patch/other/zram/lz4k/include/linux/* ./include/linux/
|
||||||
|
cp -r ../SukiSU_patch/other/zram/lz4k/lib/* ./lib/
|
||||||
|
cp -r ../SukiSU_patch/other/zram/lz4k/crypto/* ./crypto/
|
||||||
|
cp -r ../SukiSU_patch/other/zram/lz4k_oplus ./lib/
|
||||||
|
|
||||||
|
cp ../SukiSU_patch/other/zram/zram_patch/6.1/lz4kd.patch ./
|
||||||
|
echo "正在打lz4kd补丁"
|
||||||
|
patch -p1 -F 3 < lz4kd.patch || true
|
||||||
|
echo "✅ lz4kd_patch完成"
|
||||||
|
cp ../SukiSU_patch/other/zram/zram_patch/6.1/lz4k_oplus.patch ./
|
||||||
|
echo "正在打lz4k_oplus补丁"
|
||||||
|
patch -p1 -F 3 < lz4k_oplus.patch || true
|
||||||
|
echo "✅ lz4k_oplus_patch完成"
|
||||||
|
|
||||||
|
cd "$WORKDIR/$KERNEL_DIR"
|
||||||
|
|
||||||
|
mkdir -p kernel/configs
|
||||||
|
printf '%s\n' \
|
||||||
|
'# Fragment config for enabling ZRAM' \
|
||||||
|
'CONFIG_CRYPTO_LZ4HC=y' \
|
||||||
|
'CONFIG_CRYPTO_LZ4K=y' \
|
||||||
|
'CONFIG_CRYPTO_LZ4KD=y' \
|
||||||
|
'CONFIG_CRYPTO_842=y' \
|
||||||
|
'CONFIG_CRYPTO_LZ4K_OPLUS=y' \
|
||||||
|
'CONFIG_ZRAM_WRITEBACK=y' > kernel/configs/zram.config
|
||||||
|
|
||||||
|
export ARCH=arm64
|
||||||
|
export KCONFIG_CONFIG=arch/arm64/configs/config_defconfig.new
|
||||||
|
|
||||||
|
scripts/kconfig/merge_config.sh -m arch/arm64/configs/config_defconfig kernel/configs/zram.config
|
||||||
|
mv arch/arm64/configs/config_defconfig.new arch/arm64/configs/config_defconfig
|
||||||
|
echo "✅ ZRAM patch step finished"
|
||||||
|
else
|
||||||
|
echo "ℹ️ ZRAM patches skipped"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Enable SUSFS support
|
||||||
run: |
|
run: |
|
||||||
if [ "${{ inputs.enable_susfs }}" = "true" ]; then
|
if [ "${{ inputs.enable_susfs }}" = "true" ]; then
|
||||||
cd $GITHUB_WORKSPACE/kernel/android_kernel_oneplus_sm8650
|
echo "✅ Enabling SUSFS support"
|
||||||
|
cd "$WORKDIR/$KERNEL_DIR"
|
||||||
|
|
||||||
echo "🌿 Cloning susfs4ksu repository"
|
echo "🌿 Cloning susfs4ksu repository"
|
||||||
git clone https://gitlab.com/simonpunk/susfs4ksu.git
|
git clone https://gitlab.com/simonpunk/susfs4ksu.git
|
||||||
@@ -190,11 +299,76 @@ jobs:
|
|||||||
cd ../
|
cd ../
|
||||||
patch -p1 --fuzz=3 --ignore-whitespace < 50_add_susfs_in_gki-android14-6.1.patch || true
|
patch -p1 --fuzz=3 --ignore-whitespace < 50_add_susfs_in_gki-android14-6.1.patch || true
|
||||||
|
|
||||||
echo "✅ Susfs patch step finished"
|
if [ "${{ github.event.inputs.root_solution }}" = "sukisu" ]; then
|
||||||
|
echo "📦 Applying Fix patches for SukiSU"
|
||||||
|
patch -p1 < "$GITHUB_WORKSPACE/patches/fix1.patch"
|
||||||
|
patch -p1 < "$GITHUB_WORKSPACE/patches/fix2.patch"
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p kernel/configs
|
||||||
|
printf '%s\n' \
|
||||||
|
'# Fragment config for enabling SUSFS' \
|
||||||
|
'CONFIG_KSU_SUSFS=y' \
|
||||||
|
'CONFIG_KSU_SUSFS_HAS_MAGIC_MOUNT=y' \
|
||||||
|
'CONFIG_KSU_SUSFS_SUS_PATH=y' \
|
||||||
|
'CONFIG_KSU_SUSFS_SUS_MOUNT=y' \
|
||||||
|
'CONFIG_KSU_SUSFS_AUTO_ADD_SUS_KSU_DEFAULT_MOUNT=y' \
|
||||||
|
'CONFIG_KSU_SUSFS_AUTO_ADD_SUS_BIND_MOUNT=y' \
|
||||||
|
'CONFIG_KSU_SUSFS_SUS_KSTAT=y' \
|
||||||
|
'CONFIG_KSU_SUSFS_SUS_OVERLAYFS=n' \
|
||||||
|
'CONFIG_KSU_SUSFS_TRY_UMOUNT=y' \
|
||||||
|
'CONFIG_KSU_SUSFS_AUTO_ADD_TRY_UMOUNT_FOR_BIND_MOUNT=y' \
|
||||||
|
'CONFIG_KSU_SUSFS_SPOOF_UNAME=y' \
|
||||||
|
'CONFIG_KSU_SUSFS_ENABLE_LOG=y' \
|
||||||
|
'CONFIG_KSU_SUSFS_HIDE_KSU_SUSFS_SYMBOLS=y' \
|
||||||
|
'CONFIG_KSU_SUSFS_SPOOF_CMDLINE_OR_BOOTCONFIG=y' \
|
||||||
|
'CONFIG_KSU_SUSFS_OPEN_REDIRECT=y' > kernel/configs/susfs.config
|
||||||
|
|
||||||
|
export ARCH=arm64
|
||||||
|
export KCONFIG_CONFIG=arch/arm64/configs/config_defconfig.new
|
||||||
|
scripts/kconfig/merge_config.sh -m arch/arm64/configs/config_defconfig kernel/configs/susfs.config
|
||||||
|
mv arch/arm64/configs/config_defconfig.new arch/arm64/configs/config_defconfig
|
||||||
|
echo "✅ SUSFS patch step finished"
|
||||||
else
|
else
|
||||||
echo "ℹ️ Susfs patches skipped"
|
echo "ℹ️ SUSFS patches skipped"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
- name: Enable SCHED support
|
||||||
|
run: |
|
||||||
|
if [ "${{ inputs.enable_sched }}" = "true" ]; then
|
||||||
|
echo "✅ Enabling SCHED support"
|
||||||
|
cd "$WORKDIR/$KERNEL_DIR"
|
||||||
|
git clone https://github.com/HanKuCha/sched_ext.git
|
||||||
|
cp -r ./sched_ext/* ./kernel/sched
|
||||||
|
rm -rf ./sched_ext/.git
|
||||||
|
echo "✅ SCHED patch step finished"
|
||||||
|
cd ./kernel/sched
|
||||||
|
ls -la
|
||||||
|
else
|
||||||
|
echo "ℹ️ SCHED skipped"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Enable LSM_BBG support
|
||||||
|
run: |
|
||||||
|
if [ "${{ inputs.enable_lsm }}" = "true" ]; then
|
||||||
|
cd "$WORKDIR/$KERNEL_DIR"
|
||||||
|
echo "✅ Enabling LSM_BBG support"
|
||||||
|
wget -O- https://github.com/vc-teahouse/Baseband-guard/raw/main/setup.sh | bash
|
||||||
|
sed -i '/^config LSM$/,/^help$/{ /^[[:space:]]*default/ { /baseband_guard/! s/landlock/landlock,baseband_guard/ } }' security/Kconfig
|
||||||
|
|
||||||
|
mkdir -p kernel/configs
|
||||||
|
printf '%s\n' \
|
||||||
|
'# Fragment config for enabling LSM' \
|
||||||
|
'CONFIG_BBG=y' > kernel/configs/lsm.config
|
||||||
|
|
||||||
|
export ARCH=arm64
|
||||||
|
export KCONFIG_CONFIG=arch/arm64/configs/config_defconfig.new
|
||||||
|
scripts/kconfig/merge_config.sh -m arch/arm64/configs/config_defconfig kernel/configs/lsm.config
|
||||||
|
mv arch/arm64/configs/config_defconfig.new arch/arm64/configs/config_defconfig
|
||||||
|
echo "✅ LSM_BBG step finished"
|
||||||
|
else
|
||||||
|
echo "ℹ️ LSM_BBG skipped"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Build kernel
|
- name: Build kernel
|
||||||
run: |
|
run: |
|
||||||
@@ -211,8 +385,8 @@ jobs:
|
|||||||
export KERNEL_DEFCONFIG=config_defconfig
|
export KERNEL_DEFCONFIG=config_defconfig
|
||||||
|
|
||||||
# 默认 LTO 为 thin
|
# 默认 LTO 为 thin
|
||||||
export LTO="${LTO:-thin}"
|
export LTO="${{ inputs.lto_solution || 'thin' }}"
|
||||||
echo "LTO mode: $LTO"
|
echo "✅ LTO mode: $LTO"
|
||||||
|
|
||||||
# 工具链路径
|
# 工具链路径
|
||||||
export CLANG_PATH="$WORKDIR/clang-r547379"
|
export CLANG_PATH="$WORKDIR/clang-r547379"
|
||||||
@@ -282,7 +456,6 @@ jobs:
|
|||||||
BUILD_ARGS="-j${TH_COUNT} ${DEF_ARGS}"
|
BUILD_ARGS="-j${TH_COUNT} ${DEF_ARGS}"
|
||||||
|
|
||||||
echo "=== Start make (logging to ${OUT}/error.log) ==="
|
echo "=== Start make (logging to ${OUT}/error.log) ==="
|
||||||
chmod -R 777 *
|
|
||||||
rm android/abi_gki_protected_exports_* || true
|
rm android/abi_gki_protected_exports_* || true
|
||||||
make ${BUILD_ARGS} 2>&1 | tee ${OUT}/error.log || true
|
make ${BUILD_ARGS} 2>&1 | tee ${OUT}/error.log || true
|
||||||
|
|
||||||
@@ -317,6 +490,20 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
- name: Apply KPM patches
|
||||||
|
run: |
|
||||||
|
if [[ "${{ inputs.enable_kpm }}" == "true" && "${{ inputs.root_solution }}" == "sukisu" ]]; then
|
||||||
|
cd $GITHUB_WORKSPACE/kernel/android_kernel_oneplus_sm8650/out/arch/arm64/boot
|
||||||
|
curl -LSs "https://raw.githubusercontent.com/SukiSU-Ultra/SukiSU_patch/refs/heads/main/kpm/patch_linux" -o patch
|
||||||
|
chmod 777 patch
|
||||||
|
./patch
|
||||||
|
rm -rf Image
|
||||||
|
mv oImage Image
|
||||||
|
echo "✅ KPM patch finished"
|
||||||
|
else
|
||||||
|
echo "ℹ️ SCHED skipped"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Replace Image in anykernel3
|
- name: Replace Image in anykernel3
|
||||||
run: |
|
run: |
|
||||||
set -e
|
set -e
|
||||||
@@ -359,9 +546,22 @@ jobs:
|
|||||||
${{ github.workspace }}/kernel/${{ env.KERNEL_DIR }}/out/.config
|
${{ github.workspace }}/kernel/${{ env.KERNEL_DIR }}/out/.config
|
||||||
${{ github.workspace }}/kernel/output/kernel_info.txt
|
${{ github.workspace }}/kernel/output/kernel_info.txt
|
||||||
|
|
||||||
|
- name: Set package name
|
||||||
|
run: |
|
||||||
|
PKG_NAME="anykernel3-${{ github.run_number }}"
|
||||||
|
[[ "${{ inputs.enable_bbr }}" == "true" ]] && PKG_NAME="${PKG_NAME}_bbr"
|
||||||
|
[[ "${{ inputs.enable_kpm }}" == "true" ]] && PKG_NAME="${PKG_NAME}_kpm"
|
||||||
|
[[ "${{ inputs.enable_zram }}" == "true" ]] && PKG_NAME="${PKG_NAME}_zram"
|
||||||
|
[[ "${{ inputs.enable_sched }}" == "true" ]] && PKG_NAME="${PKG_NAME}_sched"
|
||||||
|
[[ "${{ inputs.enable_susfs }}" == "true" ]] && PKG_NAME="${PKG_NAME}_susfs"
|
||||||
|
[[ "${{ inputs.enable_lsm }}" == "true" ]] && PKG_NAME="${PKG_NAME}_lsm"
|
||||||
|
[[ "${{ inputs.root_solution }}" != "none" ]] && PKG_NAME="${PKG_NAME}_${{ inputs.root_solution }}"
|
||||||
|
PKG_NAME="${PKG_NAME}_lto-${{ inputs.lto_solution }}"
|
||||||
|
echo "PKG_NAME=$PKG_NAME" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Upload AnyKernel3 package
|
- name: Upload AnyKernel3 package
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
name: anykernel3-${{ github.run_number }}${{ env.ROOT_SUFFIX }}
|
name: ${{ env.PKG_NAME }}
|
||||||
path: ${{ github.workspace }}/anykernel3-${{ github.run_number }}.zip
|
path: ${{ github.workspace }}/anykernel3-${{ github.run_number }}.zip
|
||||||
@@ -16,9 +16,14 @@
|
|||||||
## Features
|
## Features
|
||||||
|
|
||||||
- Use clang-r547379
|
- Use clang-r547379
|
||||||
- Enable ThinLTO to build
|
- Enable ThinLTO/FullLTO to build
|
||||||
- Enable Root support : kernelsu/SukiSU/kernelsu-next
|
- Enable Root support : kernelsu/SukiSU/kernelsu-next
|
||||||
- Enable Susfs support : You can build susfs into kernel
|
- Enable BBR support : Enable bbr congestion control algorithm
|
||||||
|
- Enable KPM support : Enable kpm support in kernel
|
||||||
|
- Enable ZRAM support : Enable extra zram algorithm(LZ4KD/LZ4K_oplus)
|
||||||
|
- Enable SUSFS support : You can build susfs into kernel
|
||||||
|
- Enable SCHED support : Enable Fengchi scx scheduling
|
||||||
|
- Enable LSM_BBG support :block unauthorized writes to critical partitions/device nodes
|
||||||
- Enable Anykernel3 support : Packaged as a zip package of anykernel3
|
- Enable Anykernel3 support : Packaged as a zip package of anykernel3
|
||||||
|
|
||||||
To be continued...
|
To be continued...
|
||||||
|
|||||||
8726
config/a15config_back
Executable file
8726
config/a15config_back
Executable file
File diff suppressed because it is too large
Load Diff
8637
config/config_giulia
Normal file
8637
config/config_giulia
Normal file
File diff suppressed because it is too large
Load Diff
38
package.sh
Normal file
38
package.sh
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
R="$(printf '\033[1;31m')"
|
||||||
|
G="$(printf '\033[1;32m')"
|
||||||
|
Y="$(printf '\033[1;33m')"
|
||||||
|
C="$(printf '\033[1;36m')"
|
||||||
|
W="$(printf '\033[0m')"
|
||||||
|
|
||||||
|
ORIG_ZIP="anykernel3-sukisu-susfs-nokpm-6.1.130.zip"
|
||||||
|
NEW_ZIP="anykernel3-sukisu-susfs-nokpm-6.1.130-new.zip"
|
||||||
|
WORK_DIR="ak3_work"
|
||||||
|
NEW_IMAGE="Image"
|
||||||
|
|
||||||
|
echo -e "${C}🧹 清理旧文件...${W}"
|
||||||
|
rm -rf "$WORK_DIR" "$NEW_ZIP"
|
||||||
|
mkdir -p "$WORK_DIR"
|
||||||
|
|
||||||
|
cd "$WORK_DIR"
|
||||||
|
echo -e "${C}📦 解压原始刷机包...${W}"
|
||||||
|
unzip -q "../$ORIG_ZIP" || { echo -e "${R}❌ 解压失败!${W}"; exit 1; }
|
||||||
|
|
||||||
|
FILE_COUNT=$(find . -type f | wc -l)
|
||||||
|
(( FILE_COUNT > 10 )) || { echo -e "${R}❌ 文件数量异常: $FILE_COUNT${W}"; exit 1; }
|
||||||
|
echo -e "${G}✅ 解压成功,共 $FILE_COUNT 个文件。${W}"
|
||||||
|
|
||||||
|
echo -e "${C}🪣 备份原始 Image 文件...${W}"
|
||||||
|
cp -f Image ../Image.old.backup
|
||||||
|
|
||||||
|
echo -e "${C}🔁 替换新的 Image 文件...${W}"
|
||||||
|
cp -f ../$NEW_IMAGE ./Image
|
||||||
|
chmod 755 Image
|
||||||
|
|
||||||
|
echo -e "${C}📦 重新打包刷机包...${W}"
|
||||||
|
zip -r -q "../$NEW_ZIP" . -x "*/.*"
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
echo -e "${G}✅ 操作完成!新刷机包: $NEW_ZIP${W}"
|
||||||
8
patches/fix1.patch
Normal file
8
patches/fix1.patch
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
--- a/drivers/kernelsu/ksud.c
|
||||||
|
+++ b/drivers/kernelsu/ksud.c
|
||||||
|
@@ -71,7 +71,6 @@
|
||||||
|
#ifdef CONFIG_KSU_SUSFS_SUS_SU
|
||||||
|
-bool susfs_is_sus_su_ready = false;
|
||||||
|
#endif // #ifdef CONFIG_KSU_SUSFS_SUS_SU
|
||||||
|
|
||||||
|
u32 ksu_devpts_sid;
|
||||||
8
patches/fix2.patch
Normal file
8
patches/fix2.patch
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
--- a/drivers/kernelsu/kernel_compat.c
|
||||||
|
+++ b/drivers/kernelsu/kernel_compat.c
|
||||||
|
@@ -83,6 +83,7 @@
|
||||||
|
|
||||||
|
+ #undef ksu_access_ok
|
||||||
|
int ksu_access_ok(const void *addr, unsigned long size) {
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,0,0)
|
||||||
|
/* For kernels before 5.0.0, pass the type argument to access_ok. */
|
||||||
Reference in New Issue
Block a user