sudo apt-get install git-core gnupg flex bison build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 libncurses5 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev libgl1-mesa-dev libxml2-utils xsltproc unzip fontconfig libssl-dev
安装repo
mkdir ~/bin
PATH=~/bin:$PATH
curl <https://storage.googleapis.com/git-repo-downloads/repo> > ~/bin/repo
chmod a+x ~/bin/repo
同步内核源代码
repo init -u <https://android.googlesource.com/kernel/manifest>
mv <kernel_manifest.xml> .repo/manifests
repo init -m manifest.xml # 如果遇到报错,需要将<kernel_manifest.xml> 重新命名为manifest.xml
repo sync
kernel_manifest.xml选择对应的GKI内核文件目录下下载
Generic Kernel Image (GKI) release builds | Android Open Source Project
在Release选择对应的GKI内核
在GKI内核中找到kernel目录
下载目录中的manifest.xml
按照上述步骤将文件存放到对应目录下
mv <kernel_manifest.xml> .repo/manifests
repo init -m manifest.xml # 如果遇到报错,需要将<kernel_manifest.xml> 重新命名为manifest.xml
repo sync