android系统编译

来源:互联网 发布:linux系统克隆教程 编辑:程序博客网 时间:2024/06/08 10:55

我这里使用的是清华大学的android系统仓库https://mirrors.tuna.tsinghua.edu.cn/help/AOSP/

1.环境依赖

apt-get install  lib32stdc++6  git


配置git

git config  -global  user.email  ¨test@test.com¨ 

git  config  -global  user.name   ¨test¨

2.新建一个用于存放下载脚本文件的目录

mkdir ~/binPATH=~/bin:$PATH
3.下载Repo

git clone https://aosp.tuna.tsinghua.edu.cn/android/git-repo.git/cp git-repo/repo ~/bin/

4.修改Repo文件

~/bin/repo

REPO_URL = 'https://gerrit.googlesource.com/git-repo'改为REPO_URL = 'https://gerrit-google.tuna.tsinghua.edu.cn/git-repo'

5.创建用于存放Android源代码的目录

mkdir android_sourcecd android_source

6.下载初始包

#下载重试不限次数,防止网络异常中断wget -c -t 0 https://mirrors.tuna.tsinghua.edu.cn/aosp-monthly/aosp-latest.tar tar -vxzf aosp-latest.tarcd aosp #这时ls的话什么也看不到,因为只有一个隐藏的.repo目录repo sync

7.选择版本同步

repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest -b android-4.0.1_r1repo sync -j4

原创粉丝点击