Android深入--02--下载源码

来源:互联网 发布:c语言编程入门教程视频 编辑:程序博客网 时间:2024/05/09 01:14

0x0001 官方教程

https://source.android.com/source/initializing.html

NOTE:
Installing the JDK
The master branch of Android in the Android Open Source Project (AOSP) requires Java 8. On Ubuntu, use OpenJDK.
看着是OpenJDK, 擦,老汉用的sun 的。

tom@tommain:~$ java -version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
tom@tommain:~$

不管了,先试试吧,碰到问题再说。

0x0002另外的设置

The suggested cache size is 50-100G.

我靠,
需要这么多,老汉磁盘貌似不够,暂停吧,改天换笔记本搞。

0x0003 format了一个盘。。。。

0x0004 下载code,配置先不管了,等编译的时候再说阿

tom@tommain:~$ cd /media/tom/rom/tom@tommain:/media/tom/rom$ lslost+foundtom@tommain:/media/tom/rom$ mkdir bintom@tommain:/media/tom/rom$ vim ~/.bashrc tom@tommain:/media/tom/rom$ . ~/.bashrc tom@tommain:/media/tom/rom$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > bin/repo  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current                                 Dload  Upload   Total   Spent    Left  Speed100 27759  100 27759    0     0  28412      0 --:--:-- --:--:-- --:--:-- 28412tom@tommain:/media/tom/rom$ ls bin/repotom@tommain:/media/tom/rom$ chmod 777 bin/repo tom@tommain:/media/tom/rom$ lltotal 28drwx------  4 tom  tom   4096 Feb 27 22:36 ./drwxrwxrwx+ 5 root root  4096 Feb 27 22:32 ../drwxrwxr-x  2 tom  tom   4096 Feb 27 22:37 bin/drwx------  2 root root 16384 Feb 27 22:22 lost+found/tom@tommain:/media/tom/rom$ repreplace  repo     tom@tommain:/media/tom/rom$ repo init -u https://android.googlesource.com/platform/manifestgpg: keyring `/home/tom/.repoconfig/gnupg/secring.gpg' createdgpg: keyring `/home/tom/.repoconfig/gnupg/pubring.gpg' createdgpg: /home/tom/.repoconfig/gnupg/trustdb.gpg: trustdb createdgpg: key 920F5C65: public key "Repo Maintainer <repo@android.kernel.org>" importedgpg: key 692B382C: public key "Conley Owens <cco3@android.com>" importedgpg: Total number processed: 2gpg:               imported: 2  (RSA: 1)Get https://gerrit.googlesource.com/git-repo/clone.bundleGet https://gerrit.googlesource.com/git-repoGet https://android.googlesource.com/platform/manifest  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current  .......   * [new tag]         studio-1.4 -> studio-1.4 * [new tag]         studio-1.5 -> studio-1.5 * [new tag]         studio-2.0 -> studio-2.0 * [new tag]         studio-2.0-rc1 -> studio-2.0-rc1 * [new tag]         studio-2.2 -> studio-2.2 * [new tag]         studio-2.2-preview3 -> studio-2.2-preview3 * [new tag]         studio-2.2.2 -> studio-2.2.2 * [new tag]         studio_0.8.6 -> studio_0.8.6 * [new tag]         studio_1.0.0 -> studio_1.0.0 * [new tag]         studio_1.0.1 -> studio_1.0.1 * [new tag]         ub-jack-arzon-mr2 -> ub-jack-arzon-mr2 * [new tag]         webview-m40_r1 -> webview-m40_r1 * [new tag]         webview-m40_r2 -> webview-m40_r2 * [new tag]         webview-m40_r3 -> webview-m40_r3 * [new tag]         webview-m40_r4 -> webview-m40_r4Your identity is: tom <qdtom@foxmail.com>If you want to change this, please re-run 'repo init' with --config-nameTesting colorized output (for 'repo diff', 'repo status'):  black    red      green    yellow   blue     magenta   cyan     white   bold     dim      ul       reverse Enable color display in this user account (y/N)? yrepo has been initialized in /media/tom/rom

0x0005 指定特定的版本下载

tom@tommain:/media/tom/rom$ repo init -u https://android.googlesource.com/platform/manifest -b android-6.0.1_r9.repo/manifests/: discarding 302 commitsYour identity is: tom <qdtom@foxmail.com>If you want to change this, please re-run 'repo init' with --config-namerepo has been initialized in /media/tom/rom

0x0006去掉repo的用户名提示 阿

tom@tommain:/media/tom/rom$ repo init --config-name 'tom'Your Name  [tom]: tomYour Email [qdtom@foxmail.com]:      Your identity is: tom <qdtom@foxmail.com>is this correct [y/N]? yrepo has been initialized in /media/tom/rom

0x0007同步代码

repo sync

然后就是漫长的等待。。。。

0 0
原创粉丝点击