It’s also possible to store it on a removable drive and to pass that drive around between users or between machines. It‘s possible to store the mirror on a LAN server and to access it over NFS, SSH or Git. $ repo init -u /usr/local/aosp/mirror/platform/manifest.gitįinally, to sync a client against the server, the mirror needs to be synced against the server, then the client against the mirror: $ cd /usr/local/aosp/mirror Note that it's important to specify an absolute path: $ mkdir -p /usr/local/aosp/master Once the mirror is synced, new clients can be created from it. Notice the -mirror flag, which can only be specified when creating a new client: $ mkdir -p /usr/local/aosp/mirror The first step is to create and sync the mirror itself, which uses close to 10GB of network bandwidth and a similar amount of disk space. These instructions assume that the mirror is created in /usr/local/aosp/mirror. When using many clients, especially in situations where bandwidth is scarce, it is better to create a local mirror of the entire server content, and to sync clients from that mirror (which requires no network access). You need root access to modify the TCP setting: $ sudo sysctl -w _window_scaling=0 It has been reported that tweaking the settings of the TCP/IP stack and using non-parallel commands can improve the situation. 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 export rarely, Linux clients experience connectivity issues, getting stuck in the middle of downloads (typically during “Receiving objects”). You can convert an existing client to use mandatory authentication with the following command: $ repo init -u Notice how the /a/ directory prefix triggers mandatory authentication. The second step is to force authenticated access, by using the following manifest URI. 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. In that case, it is possible to use authenticated access, which then uses a separate quota for each user, regardless of the IP address. if many users sync new clients from the same IP address within a short period). when accessing the source repositories from beyond a NAT firewall), the quotas can trigger even for regular usage patterns (e.g. When sharing an IP address with other users (e.g. To protect the servers against excessive usage, each IP address is associated with a quota. Using authenticationīy default, access to the Android source code is anonymous. For more about repo sync and other Repo commands, see Version Control. The initial sync operation will take an hour or more to complete. The Android source files will be located in your working directory under their project names. To pull down files to your working directory from the repositories as specified in the default manifest, run $ repo sync repo directory where files such as the manifest will be kept. Your client directory should now contain a. The name that you provide here will show up in attributions for your code submissions.Ī successful initialization will end with a message stating that Repo is initialized in your working directory. Make sure this is a live address at which you can receive messages. To use the Gerrit code-review tool, you will need an email address that is connected with a registered Google account. When prompted, please configure Repo with your real name and email address. To check out a branch other than “master”, specify it with -b: $ repo init -u -b android-4.0.1_r1 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. Run repo init to bring down the latest version of Repo with all its most recent bug fixes. Give it any name you like: $ mkdir WORKING_DIRECTORY If you're using MacOS, this has to be on a case-sensitive filesystem. Make sure you have a bin/ directory in your home directory, and that it is included in your path: $ mkdir ~/binĭownload the Repo script and ensure it is executable: $ curl > ~/bin/repoįor version 1.16, the SHA-1 checksum for repo is 19ba8290344752da23e00cfb2b26afb43b463fe6Īfter installing Repo, set up your client to access the android source repository:Ĭreate an empty directory to hold your working files. To install, initialize, and configure Repo, follow these steps: For more information about Repo, see Version Control. Repo is a tool that makes it easier to work with Git in the context of Android. Downloading the Source Tree Installing Repo
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |