Repo is a tool provided by Google that simplifies using Git in the context of the Android source:
- Repo docs: http://source.android.com/source/developing.html
- Git docs: http://git-scm.com/book
Several packages are needed in order to build crDroid. Example (we are using Ubuntu):
sudo apt install bc bison build-essential ccache curl flex g++-multilib gcc-multilib git git-lfs gnupg gperf imagemagick lib32ncurses-dev lib32readline-dev lib32z1-dev liblz4-tool libncurses6 libncurses-dev libsdl1.2-dev libssl-dev libwxgtk3.2-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc zip zlib1g-dev
(Some of those packages may need adjustment for your linux distribution)
Install the Repo tool:
# create ~/bin and add to PATH for this session (or add to your shell profile)
mkdir -p ~/bin
export PATH=~/bin:$PATH
# download Repo
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
# make Repo executable
chmod a+x ~/bin/repo
Tip: Add export PATH=~/bin:$PATH
to ~/.bashrc
or your shell profile so Repo is available in future sessions.
Create a workspace and initialize the crDroid 16.0 manifest:
mkdir -p ~/crDroid
cd ~/crDroid
repo init -u https://github.com/crdroidandroid/android.git -b 16.0 --git-lfs --no-clone-bundle
Sync the source tree (may take a long time on first run):
repo sync
Notes and useful flags:
- To recover from interrupted syncs or to force a fresh copy:
repo sync --force-sync --no-tags --no-clone-bundle -j8
(adjust-j
to match your bandwidth/CPUs). - Use
repo sync -c
to only sync the current branch per project (saves time/space) when appropriate.
Prepare the build environment:
. build/envsetup.sh
Build using:
brunch <devicecodename>
(Replace <devicecodename>
with your device codename, e.g. caiman
, lemonadep
, etc.)
Troubleshooting tips:
- Out-of-disk-space: ensure enough free space (Android tree can require 100+ GB).
- If builds fail after repo sync, try
repo sync --force-sync
and a clean build:mka clean
then rebuild.
To submit changes or patches:
- Fork the repository on GitHub, make your changes, and open a Pull Request against the appropriate branch.
- We review PRs and merge them when appropriate.
- Read and follow our rules and guidelines: https://github.com/crdroidandroid/rules-and-guidelines
- If everything is in order, message Gabriel on Telegram: https://telegram.me/gwolf2u
Set overlays to the proper paths.
Frameworks base:
overlay/frameworks/base/core/res/res/values/config.xml
Example reference: https://github.com/crdroidandroid/android_frameworks_base/blob/16.0/core/res/res/values/cr_config.xml
SystemUI:
overlay/frameworks/base/packages/SystemUI/res/values/config.xml
Example reference: https://github.com/crdroidandroid/android_frameworks_base/blob/16.0/packages/SystemUI/res/values/cr_config.xml
We use Crowdin for translations. To help out see: https://github.com/crdroidandroid/crdroid_features#translations
Ready to share your build? Use the forum post template: https://github.com/crdroidandroid/crdroid_features/blob/16.0/ForumPostTemplate