Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


Lightsaber build documentation and tool to flash Gaia and custom apps.

Preparing your Aries device

We recommend that you run this on an Aries device. It will, however, run correctly on a Flame or theoretically any other device.

Getting started

If you haven't already, you should follow the general (B2G build instructions)[] up until they ask you to run ./

Important note

All paths here and beyond are relative to your user folder, ~/. If you are on OS X, you should be using a case sensitive image to store all of these files. For example, /Volumes/firefoxos. For instructions on how to create this image, see Mac file system case sensitivity.

Do not put the lightsaber repo in your B2G repo.

Installing Dependencies

Linux only

If you're on Linux, you must install the nodejs-legacy package, which symlinks node to nodejs. Via apt-get:

sudo apt-get install nodejs-legacy

Linux and OS X

Install the node global dependencies:

sudo npm install -g bower && sudo npm install -g gulp && sudo npm install -g apm && sudo npm install -g grunt-cli && sudo npm install -g browserify

Clone mozilla-central

mozilla-central is the Gecko branch used for Lightsaber.

hg clone ~/mozilla-central

Setup B2G repository

You should already have a B2G repository cloned if you followed the general B2G build instructions. If not, clone the B2G repository locally:

git clone ~/B2G
cd ~/B2G

Configure B2G repository

B2G must be configured to point to mozilla-central.

echo 'export GECKO_PATH=~/mozilla-central' > .userconfig

Configure for Aries device

B2G must be configured for the Aries device

./ aries

Acquire binaries and build

You must now acquire the device binaries using the ./ tool:


Flash the full image

If the build completes without problems, you can flash the full image as follows:


Enable USB debugging

Go into the Settings app, then Developer > Debugging via USB > set this to "ADB only" or "ADB and DevTools".

Installing Lightsaber Gaia branch and apps

git clone
cd lightsaber
make install
make sync

Enable Developer Mode

adb shell "stop b2g"
adb shell "cd /data/b2g/mozilla/*.default/;echo 'user_pref(\"dom.apps.developer_mode\", true);' >> prefs.js;"
adb shell "start b2g"

That's all

You should now have a device, running Lightsaber, to play around with.

Using this tool

These instructions are separate from installing Lightsaber on an Aries device. Instructions from here onward are just for using this tool. This tool is a wrapper for repo ( It packages Lightsaber apps into a Gaia Lightsaber branch.

Quick setup

Install, build, and flash Lightsaber (CAUTION: this will destroy your profile!) If you're on Linux, first run sudo apt-get install nodejs-legacy

sudo npm install -g bower && sudo npm install -g gulp && sudo npm install -g apm && sudo npm install -g grunt-cli && sudo npm install -g browserify
git clone
cd lightsaber
make install
make sync

Quick update

Only run this if you already have Lightsaber installed, and you want to update your Lightsaber Gaia branch and apps

make sync
make install-gaia


git clone
cd lightsaber
make install

Sync repos

You will need to do this everytime a sub-repo is updated.

make sync

Delete all downloaded content, built files, etc.

make really-clean


Similar to Gaia. Note that all make commands accept env vars such as DEVICE_DEBUG, just like Gaia does. Choose any of the following:


Build a Gaia profile.


make install-gaia

Build a Gaia profile and flash it onto your device.

make install-gaia

make reset-gaia

Destroy your Gaia profile, build a new one, and flash it onto your device.

make reset-gaia

make clean

Deletes all Lightsaber app build files and cleans the Gaia repo.

make clean


Lightsaber build system for Gaia and custom apps



No releases published


No packages published
You can’t perform that action at this time.