Cells is Open Source
Most of the Cells project has now been released under the terms of the GNU GPL. The code is released as a complete set of Android git repositories that initially targets the Asus Nexus 7 (grouper). Building Cells is similar to building other Android releases such as AOSP or CyanogenMod, and our full Gerrit review site allows easy collaboration with the community. The Cells source include a complete Android distribution, a Cells-enabled kernel, and custom user space utilities for creating and managing virtual Android instances. You can browse the code online here: https://cells-source.cs.columbia.edu/.
We recommend reading through all of the following instructions before beginning. Happy hacking!
Initialize Your Environment
Before beginning the download and build process, you will need to setup your environment for an Android build. This setup is well-described by the Android Open Source Project. The requirements are the same for building Cells. We have tested the build on OS X Mountain Lion as well as a variety of Linux distributions. For brevity, we provide only the necessary commands and a basic description where the details are the same as the standard Android build system.
Download and Build
$ curl curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo $ chmod a+x ~/bin/repo $ mkdir cells && cd cells
- common – all the common source code and repositories
- linux – supporting binary tools necessary for a build on a Linux system
- darwin – supporting binary tools necessary for a build on OSX
- grouper – necessary repositories for the Nexus 7 (grouper)
- aosp – all repositories contained in the Android Open Source Project
$ repo init -u https://cells-source.cs.columbia.edu/platform/manifest -b [BRANCH] -g [GROUPS]
- [BRANCH] will specify the Android release. Currently only cells-jb is supported for the Jelly Bean (4.3) build.
- [GROUPS] is the comma-separated list of repository groups, e.g.,common,darwin,grouper for building on OSX, and common,linux,grouper for building on Linux.
$ repo init -u https://cells-source.cs.columbia.edu/platform/manifest -b cells-jb -g common,linux,grouper $ repo init -u https://cells-source.cs.columbia.edu/platform/manifest -b cells-jb -g common,darwin,grouper
$ repo sync
For network trouble shooting issues and tips on saving network bandwidth, please refer to the Android source download page.
wget http://cert.incommon.org/InCommonServerCA.crt openssl x509 -inform DER -in InCommonServerCA.crt -out incommon.pem cat /etc/ssl/certs/ca-certificates.crt incommon.pem > ca-certs2.crt sudo cp /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt.bak sudo cp ca-certs2.crt /etc/ssl/certs/ca-certificates.crt
Configure the Build
$ source ./source-me.sh full_grouper-eng
OS X Users you will need the latest version of XCode. Using older toolchains may work, but is unsupported; setting the following environment variable may help: export TARGET_GCC_VERSION_EXP=4.6
Start the Build
$ make -j4
Flash the device
The build process results in several image files that can be flashed onto your Nexus 7 device. You can use Google’s fastboot tool (which you actually just built), or the Cells custom aflash command.
The following two commands are equivalent (see the Cells environment reference for more information on the aflash utility):
$ fastboot flashall -w $ aflash
This will flash the Cells system you just built onto your device. NOTE there is no GUI on the device yet! Your device should automatically reboot, and it will appear to be “stuck” at the logo screen. Make sure you can get a shell on the device using adb:
$ adb shell
# cell -h
# cell create home # cell create work # cell autoswitch home on # cell start home -D -s # cell autostart home on # cell start work -D -s # cell autostart work on
- Jelly Bean uses a large amount of memory, and starting two (or more instances) can quickly consume all the available RAM – especially on first boot as none of the Android applications have been pre-optimized. To mitigate this, you can wait for a single Cell to boot before starting a second, and you can also use the -H option when starting a Cell (see cell start -h). The -H option configures celld to share the optimized Dalvik cache directory amongst all running Cells potentially saving many megabytes of duplicated filesystem cache.
- When switching between Cells it is sometimes necessary to touch the screen to force the newly active Cell to re-draw. If the newly active Cell had previously put itself to sleep, it may also be necessary to press the POWER button.
- The Tegra display controller virtualization can sometimes cause on-screen flicker in the active Cell when background Cells are present. This is being actively investigated.
- This release of Cells does not support telephony, thus it is not possible to assign unique phone numbers to each Cell.