一 解压aosp-latest.tar adroid源码包
tar -xvf aosp-latest.tar(选其一解压)
tar xf aosp-latest.tar
cd aosp
python3.6 ~/bin/repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest -b android-11.0.0_r25 --config
二 配置repo
mkdir ~/bin # 在home下创建bin文件夹
PATH=~/bin:$PATH # 把bin文件夹加入环境变量的(该命令在命令行输入)
curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo > ~/bin/repo #下载repo脚本
chmod a+x ~/bin/repo #添加权限。
repo sync
原文链接:https://blog.csdn.net/xx326664162/article/details/86354616
如果报错的解决方法:
cd .repo/repo
git pull
cd ../..
repo sync
三 android-ndk-r23安装
1 解压android-ndk-r23压缩包
Unzip android-ndk-r23-linux.zip
2 配置ndk的环境变量
export ANDROID_NDK=/home/yunji.he/tools/android-ndk-r23
export PATH=$ANDROID_NDK:$PATH
四 patchelf-0.9安装
1 解压patchelf-0.9.tar.gz
tar -xzvf patchelf-0.9.tar.gz
2 指定安装位置
Cd patcheflf-09
./configure -