mirror of
https://github.com/Dichgrem/GKI-build.git
synced 2025-12-16 13:42:00 -05:00
fix:ak3.sh
This commit is contained in:
60
.github/workflows/build-gki-kernel.yml
vendored
60
.github/workflows/build-gki-kernel.yml
vendored
@@ -397,66 +397,6 @@ jobs:
|
|||||||
cd output
|
cd output
|
||||||
rm -rf ramdisk patch modules
|
rm -rf ramdisk patch modules
|
||||||
|
|
||||||
# 备份原始 anykernel.sh
|
|
||||||
cp anykernel.sh anykernel.sh.bak
|
|
||||||
|
|
||||||
# 自定义 anykernel.sh 配置
|
|
||||||
cat > anykernel.sh << 'EOF'
|
|
||||||
### AnyKernel3 Ramdisk Mod Script
|
|
||||||
## osm0sis @ xda-developers
|
|
||||||
|
|
||||||
### AnyKernel setup
|
|
||||||
# global properties
|
|
||||||
properties() { '
|
|
||||||
kernel.string=Wild Plus Kernel by TheWildJames or Morgan Weedman
|
|
||||||
do.devicecheck=0
|
|
||||||
do.modules=0
|
|
||||||
do.systemless=0
|
|
||||||
do.cleanup=1
|
|
||||||
do.cleanuponabort=0
|
|
||||||
device.name1=corvette
|
|
||||||
device.name2=PJX110
|
|
||||||
device.name3=
|
|
||||||
device.name4=
|
|
||||||
device.name5=
|
|
||||||
supported.versions=
|
|
||||||
supported.patchlevels=
|
|
||||||
supported.vendorpatchlevels=
|
|
||||||
'; } # end properties
|
|
||||||
|
|
||||||
### AnyKernel install
|
|
||||||
## boot shell variables
|
|
||||||
block=boot
|
|
||||||
is_slot_device=auto
|
|
||||||
ramdisk_compression=auto
|
|
||||||
patch_vbmeta_flag=auto
|
|
||||||
no_magisk_check=1
|
|
||||||
|
|
||||||
# import functions/variables and setup patching - see for reference (DO NOT REMOVE)
|
|
||||||
. tools/ak3-core.sh
|
|
||||||
|
|
||||||
kernel_version=$(cat /proc/version | awk -F '-' '{print $1}' | awk '{print $3}')
|
|
||||||
case $kernel_version in
|
|
||||||
5.1*) ksu_supported=true ;;
|
|
||||||
6.1*) ksu_supported=true ;;
|
|
||||||
6.6*) ksu_supported=true ;;
|
|
||||||
*) ksu_supported=false ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
ui_print " " " -> ksu_supported: $ksu_supported"
|
|
||||||
$ksu_supported || abort " -> Non-GKI device, abort."
|
|
||||||
|
|
||||||
# boot install
|
|
||||||
if [ -L "/dev/block/bootdevice/by-name/init_boot_a" -o -L "/dev/block/by-name/init_boot_a" ]; then
|
|
||||||
split_boot # for devices with init_boot ramdisk
|
|
||||||
flash_boot # for devices with init_boot ramdisk
|
|
||||||
else
|
|
||||||
dump_boot # use split_boot to skip ramdisk unpack, e.g. for devices with init_boot ramdisk
|
|
||||||
write_boot # use flash_boot to skip ramdisk repack, e.g. for devices with init_boot ramdisk
|
|
||||||
fi
|
|
||||||
## end boot install
|
|
||||||
EOF
|
|
||||||
|
|
||||||
# 创建更新信息文件
|
# 创建更新信息文件
|
||||||
cat > kernel_info.txt << EOF
|
cat > kernel_info.txt << EOF
|
||||||
Kernel Name: $KERNEL_NAME
|
Kernel Name: $KERNEL_NAME
|
||||||
|
|||||||
53
anykernel.sh
Normal file
53
anykernel.sh
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
### AnyKernel3 Ramdisk Mod Script
|
||||||
|
## osm0sis @ xda-developers
|
||||||
|
|
||||||
|
### AnyKernel setup
|
||||||
|
# global properties
|
||||||
|
properties() { '
|
||||||
|
kernel.string=Wild Plus Kernel by TheWildJames or Morgan Weedman
|
||||||
|
do.devicecheck=0
|
||||||
|
do.modules=0
|
||||||
|
do.systemless=0
|
||||||
|
do.cleanup=1
|
||||||
|
do.cleanuponabort=0
|
||||||
|
device.name1=corvette
|
||||||
|
device.name2=PJX110
|
||||||
|
device.name3=
|
||||||
|
device.name4=
|
||||||
|
device.name5=
|
||||||
|
supported.versions=
|
||||||
|
supported.patchlevels=
|
||||||
|
supported.vendorpatchlevels=
|
||||||
|
'; } # end properties
|
||||||
|
|
||||||
|
### AnyKernel install
|
||||||
|
## boot shell variables
|
||||||
|
block=boot
|
||||||
|
is_slot_device=auto
|
||||||
|
ramdisk_compression=auto
|
||||||
|
patch_vbmeta_flag=auto
|
||||||
|
no_magisk_check=1
|
||||||
|
|
||||||
|
# import functions/variables and setup patching - see for reference (DO NOT REMOVE)
|
||||||
|
. tools/ak3-core.sh
|
||||||
|
|
||||||
|
kernel_version=$(cat /proc/version | awk -F '-' '{print $1}' | awk '{print $3}')
|
||||||
|
case $kernel_version in
|
||||||
|
5.1*) ksu_supported=true ;;
|
||||||
|
6.1*) ksu_supported=true ;;
|
||||||
|
6.6*) ksu_supported=true ;;
|
||||||
|
*) ksu_supported=false ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
ui_print " " " -> ksu_supported: $ksu_supported"
|
||||||
|
$ksu_supported || abort " -> Non-GKI device, abort."
|
||||||
|
|
||||||
|
# boot install
|
||||||
|
if [ -L "/dev/block/bootdevice/by-name/init_boot_a" -o -L "/dev/block/by-name/init_boot_a" ]; then
|
||||||
|
split_boot # for devices with init_boot ramdisk
|
||||||
|
flash_boot # for devices with init_boot ramdisk
|
||||||
|
else
|
||||||
|
dump_boot # use split_boot to skip ramdisk unpack, e.g. for devices with init_boot ramdisk
|
||||||
|
write_boot # use flash_boot to skip ramdisk repack, e.g. for devices with init_boot ramdisk
|
||||||
|
fi
|
||||||
|
## end boot install
|
||||||
Reference in New Issue
Block a user