RDK Resources
[*RDK Preferred*]
Code Management Facility
RDK Forums
[RDK Conferences]
RDK Support
Archives
Papers & Presentations Archive
The Android source tree is located in a Git repository hosted by Google. The Git repository includes metadata for the Android source, including changes to the source and when the changes were made. This page describes how to download the source tree for a specific Android code-line.
To start with a factory image for a specific device instead of downloading the source, see Selecting a device build - download an image - raspberry pi or emulator
Repo is a tool that makes it easier to work with Git in the context of Android. For more information about Repo, see the Repo Command Reference (point to create section) and Repo README.built on top of Git. Repo helps manage many Git repositories, does the uploads to revision control systems, and automates parts of the development workflow. To familarize various repo commands please see RepoCommandReference
Repo comes in two parts: One is a launcher script
...
for installing, and it communicates with the second part, the full Repo tool included in a source code checkout. To install Repo:
Make sure that you have a bin/
directory in your home directory and that it's included in your path:
mkdir ~/bin
PATH=~/bin:$PATH
Download the Repo Launcher and ensure that it's executable:
Code Block |
---|
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo chmod a+x ~/bin/repo |
After installing the Repo Launcher, set up your client to access the
...
source code repository
...
.
Create an empty directory to hold your working files.
...
Code Block |
---|
mkdir WORKING_DIRECTORY |
...
cd WORKING_DIRECTORY |
Configure Git with your
...
name and
...
email address
...
. The name that you provide here shows up in attributions for your code submissions.
Code Block |
---|
git config --global user.name "Your Name" |
...
git config --global user.email "you@example.com" |
Run repo init
to get the latest version of Repo with its most recent bug fixes. You must specify a URL for the manifest
...
.
Code Block |
---|
repo init -u https://code.rdkcentral.com/r/manifests -m <manifestfile.xml> –b <branch name> |
example : repo init -u https://
...
code.
...
rdkcentral.com/
...
r/manifests -m rdkv-raspberrypi.xml –b morty
Note |
---|
|
To check out a branch other than master, specify it with -b
. For a list of branches,
...
...
repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1
A successful initialization ends with a message stating that Repo is initialized in your working directory. Your client directory should now contain a .repo
directory where files such as the manifest are kept.
To download the RDK source tree to your working directory from the repositories as specified in the default manifest, run:
Code Block |
---|
repo sync |
The RDK source files are located in your working directory under their project names.
By default, access to the RDK source code is anonymous and for restricted content user need to set up credential in .netrc file.
The first step is to create a password with the key generator tool. The second step is to force authenticated access by using the manifest URI https://code.rdkcentral.com/r/manifests.
Notice how the /r/
directory prefix triggers mandatory authentication. You can convert an existing client to use mandatory authentication with the following command:
repo init -u https://code.rdkcentral.com/r/manifests
When downloading from behind a proxy (which is common in some corporate environments), you might need to to explicitly specify the proxy that is then used by Repo:
Code Block |
---|
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> |