To build Console OS, we recommend matching our build environment. Today we rely on Ubuntu 15.10 on a machine with a 64-bit processor. Building with a 32-bit version of Ubuntu is unlikely to work.
More RAM is better - at least 4GB should be used. If building with multiple cores, you should plan on at least 8GB of RAM, and a swap file (virtual memory). For faster build times, we also encourage you to use an solid-state drive - building Android with a traditional hard disk has become very slow.
Building Console OS on OS X is planned and possible, but not supported at this time.
- For starters, run Ubuntu Software Update until it reports no updates available.
- Then, run the following commands to add support for multi-arch building, and add additional required build components:
- sudo dpkg --add-architecture i386
- sudo apt-get update
- sudo apt-get install bison g++-multilib git gperf libxml2-utils dos2unix zlib1g:i386
- We recommend enabling ccache - It is not required, but will speed up incremental builds significantly.
- Create a file ~/.bashrc (or edit it, if it isn't there already)
- Edit the file and add the following:
- export USE_CCACHE=1
- If you are using a single disk drive, you don't need to define the ccache directory - however if you have multiple drives, moving the ccache to another drive may be beneficial. To do so, edit the .bashrc file to add the following
- export CCACHE_DIR= (insert path here)
Installing OpenJDK Android versions prior to Lollipop were built using the Sun/Oracle JDK. However, Google switched to OpenJDK for Lollipop, which is easier to install and set up.