如何下载Android源码(window和Linux)
来源:互联网 发布:淘宝全球购支持退货吗 编辑:程序博客网 时间:2024/05/16 14:48
$ mkdir WORKING_DIRECTORY $ cd WORKING_DIRECTORY
repo init
to bring down the latest version of Repo with all its most recent bug fixes. You must specify a URL for the manifest, which specifies where the various repositories included in the Android source will be placed within your working directory.$ repo init -u https://android.googlesource.com/platform/manifest
To check out a branch other than "master", specify it with -b:
$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1
1.5.3、When prompted, please configure Repo with your real name and email address. To use the Gerrit code-review tool, you will need an email address that is connected with a registered Google account. Make sure this is a live address at which you can receive messages. The name that you provide here will show up in attributions for your code submissions.在运行1.5.2的命令时,会弹出一个要求输入你的gmail邮箱的提示。最好输入有效的邮箱地址。To pull down files to your working directory from the repositories as specified in the default manifest, run
$ repo sync
The Android source files will be located in your working directory under their project names. The initial sync operation will take an hour or more to complete. For more about repo sync
and other Repo commands, see Version Control.
$ repo syncremote: Counting objects: 10, done.remote: Compressing objects: 100% (4/4), done.remote: Total 6 (delta 2), reused 6 (delta 2)Unpacking objects: 100% (6/6), done.From git://github.com/richi-chen/Pandaboard-ICS-repo3ea7f09..11ecd6d master -> origin/master534d620..5fa74f5 omapzoom -> origin/omapzoomerror: .repo/manifests/: contains uncommitted changes
By default, access to the Android source code is anonymous. To protect the servers against excessive usage, each IP address is associated with a quota.
When sharing an IP address with other users (e.g. when accessing the source repositories from beyond a NAT firewall), the quotas can trigger even for regular usage patterns (e.g. if many users sync new clients from the same IP address within a short period).
In that case, it is possible to use authenticated access, which then uses a separate quota for each user, regardless of the IP address.
The first step is to create a password from the password generator and to save it in ~/.netrc
according to the instructions on that page.
The second step is to force authenticated access, by using the following manifest URI: https://android.googlesource.com/a/platform/manifest
. Notice how the /a/
directory prefix triggers mandatory authentication. You can convert an existing client to use mandatory authentication with the following command:
$ repo init -u https://android.googlesource.com/a/platform/manifest
2.7、可能遇到的一些网络问题When downloading from behind a proxy (which is common in some corporate environments), it might be necessary to explicitly specify the proxy that is then used by repo:
$ export HTTP_PROXY=http://<proxy_user_id>:<proxy_password>@<proxy_server>:<proxy_port>
$ export HTTPS_PROXY=http://<proxy_user_id>:<proxy_password>@<proxy_server>:<proxy_port>
More rarely, Linux clients experience connectivity issues, getting stuck in the middle of downloads (typically during "Receiving objects"). It has been reported that tweaking the settings of the TCP/IP stack and using non-parallel commands can improve the situation. You need root access to modify the TCP setting:
$ sudo sysctl -w net.ipv4.tcp_window_scaling=0 $ repo sync -j1
- 如何下载Android源码(window和Linux)
- 如何下载Android源码(window和Linux)
- window环境下下载android源码和eclipse关联源码
- Android源码(window下如何获取)
- 如何下载android源码
- 如何下载android源码
- 如何下载android源码
- 如何下载Android源码
- 如何下载android源码
- 如何下载android源码
- 如何下载linux(ubuntu)相关源码
- git和repo 的知识(在下载android源码和linux内核源码时)
- 如何下载Linux软件源码
- Android源码下载方法(Windows+Linux)
- Android 如何下载系统源码
- 如何下载android系统源码
- linux下载编译android源码
- Linux 下Android源码下载
- lua协同
- 第十二周项目1--图基本算法库
- 通过init-connect + binlog 实现MySQL审计功能
- 念念不忘 必有回响
- linux zip命令
- 如何下载Android源码(window和Linux)
- 移动端web开发技巧
- 同事的整理-----部分学习参考推荐
- 我所觉得好用且常用的Linux命令
- 单例模式
- hdu1233 还是畅通工程 (kruskal求最小生成树)
- 字符串拼接新技能
- PAT 1011. World Cup Betting (20)
- (第七周项目4)队列数组