cat /proc/versionLinux version 6.6.30-android15-8-gdd9c02ccfe27-ab11987101: 其中-ab后跟的是内核源码树的提交哈希,-g 后跟着的是一个 12 位 16 进制数,在BUILD_INFO对应
mkdir kernel_a15 && cd kernel_a15
repo init -u https://mirrors.tuna.tsinghua.edu.cn/git/AOSP/kernel/manifest -b common-android15-6.6 --depth=1
repo init -m manifest_11987101.xml
repo sync -c --no-tags --no-clone-bundle -j$(nproc)规训 KernelSU
# 设置全局用户名,邮箱
git config --global user.name "Xieansecn"
git config --global user.email "xieansecn@163.com"
#打上KernelSU
git clone https://github.com/tiann/KernelSU.git
curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash -s main
git add -A
git commit -m "Add KernelSU"
#设好版本
cd KernelSU
export KSU_VER=$(($(git rev-list --count HEAD) + 10200))
echo $KSU_VER
#编译时设好版本
tools/bazel run --config=fast --config=stamp --lto=none --action_env=KSU_VERSION=$KSU_VER //common-modules/virtual-device:virtual_device_x86_64_dist -- --dist_dir=virt.\emulator.exe -avd Pixel_9 -kernel D:\VMShare\bzImage -show-kernel -no-snapshot-load./emulator -avd Pixel_9 -kernel ~/bzImage -show-kernel -no-snapshot-load
