android framework 第1天

作者: Blanchard | 来源:发表于2021-01-21 08:42 被阅读0次

没有前提,不谢邀,太长不看,

直接开始

  • 找一台 linux 系统或者虚拟机,
  • 打开终端窗口
  • 直接运行下面脚本,或者手工每一行敲进终端窗口

安装下载工具

sudo apt-get install -y curl
mkdir ~/bin
curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo \
    -o ~/bin/repo
export PATH=~/bin:$PATH
chmod +x ~/bin/repo

快速下载软件包

mkdir -p ~/src && cd ~/src
wget -c https://mirrors.tuna.tsinghua.edu.cn/aosp-monthly/aosp-latest.tar
tar xf aosp-latest.tar
cd AOSP
mkdir ~/src/AOSP && cd ~/src/AOSP
sudo apt-get install -y git-core
repo init \
    --repo-url=https://mirrors.tuna.tsinghua.edu.cn/git/git-repo \
    --repo-branch=master \
    -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest \
    -b master

repo sync -l -c -d -j 2

编译镜像

#building
sudo apt-get install -y git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 \
lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev \
libgl1-mesa-dev libxml2-utils xsltproc unzip  curl
sudo apt-get install -y openjdk-8-jdk

mkdir -p ~/android_ouput
export OUT_DIR_COMMON_BASE=~/android_ouput
export WITH_DEXPREOPT=false
source build/envsetup.sh
lunch aosp_arm64-eng
make -j `nproc`

第1天作业:

  • 成功运行命令(碰到问题逐个解决)
  • (加分项)了解每个命令每个选项和参数的作用

参考:

https://www.jianshu.com/p/3922ec229077
https://mirrors.tuna.tsinghua.edu.cn/help/git-repo/
https://mirrors.tuna.tsinghua.edu.cn/help/AOSP/
https://source.android.com/setup/build/initializing
https://source.android.google.cn/source/initializing?hl=zh-cn
https://www.jianshu.com/p/367f0886e62b

相关文章

网友评论

    本文标题:android framework 第1天

    本文链接:https://www.haomeiwen.com/subject/aehrzktx.html