Please note, this is a STATIC archive of website from 03 Nov 2016, does not collect or store any user information, there is no "phishing" involved.

Gaia tools reference

This article lists a number of helpful tools available for working with Gaia.

Note: You can find a number of very useful tips and tricks on debugging Firefox OS at the B2G QA Tips and tricks page.


MozITP is an all-in-one package bundle for Gaia related tools. It contains pre-configured flash tool (b2g_util), b2g-installer and Gaia Integration Test environment. You can use MozITP to test Gaia Integration Test on Mulet, emulator or real devices. You can also flash builds from TaskCluster or b2g-installer blob-free builds.


Foxbox is a build automation script that builds a full Gaia development environment with the Gaia build hosted inside a VM, which is also accessible from the host machine (meaning you can still workon it using your favourite text editor, etc.) This works on all platforms, but should be especially useful to Windows users as the regular Gaia build procedure doesn't work on a standard Windows environment.

Backup/restore/flashing tools

Tools to backup your profile, etc.


The b2g_util tools package provides a variety of tools to help you with debugging Firefox OS. It can:

  • Check the installed b2g version
  • Get the crash report link
  • Reset the device
  • Enable/disable the cert apps for WebIDE
  • Backup/restore your profile (currently not complete, but a workaround is provided for now.)

To install it, you first need Python 2.7, pip, and setuptools. then you can run:

sudo pip install -U b2g_util

Once installation is complete, you can connect your device and test it by issuing the following command to get the installed b2g version:



The pc-sync-tool is an app available in the Firefox Marketplace that backs up your data/profile. It must be used in conjunction with the Firefox OS assistant add-on for desktop.

Backup and restore profile

To backup and restore data you can use our tool, which is contained in the B2G-flash-tool Git repo.

  1. Clone the above repo (git clone
  2. Make sure that your phone is connected via USB to your computer, and that ADB (see Important steps to follow first above) and Debugging via USB (in your device's Developer settings) are enabled.
  3. cd into the cloned directory

To backup data:

python -b

This should save your device profile to a directory called mozilla-profile, in the same directory as the script is located. To restore your backup:

python -r

Note: To display a full list of options for the tool, run it with a -h or --help flag.


The B2G-flash-tool repo also contains many other tools for rapid flashing of new builds to devices and related tasks — ideal for QA work. For example:

Debugging tools

Tools that perform debugging functions.


Firefox's WebIDE tool deserves a special mention here — as well as just testing and debugging apps, it is also useful for monitoring performance, memory usage, etc. (see Monitoring performance.)

Contained with the the B2G-flash-tool repo, retrieves device crash reports (/data/b2g/mozilla/Crash Reports/.)

B2G root directory tools

There are a number of scripts in the B2G root directory that perform various useful debugging functions, such as:

Other misc tools

There are a number of helpful tools located in the gaia/tools/ directory, and other places

Located at gaia/tools/, is a PNG image compressor. You can run it with the following command structure:

$ ./tools/ -v bg.png

This will remove unnecessary metadata and further compress the png; it can save up to 99.5% of the file size, which has a very measurable impact on an app's ZIP size and memory footprint.

Located at gaia/tools/, is an SVG compressor.

Located at gaia/tools/, synchronizes the offline cache of an external app into a local directory structure. This should be run from the base directory of an app in gaia/external-apps. It builds a directory for each known origin in the offline cache.

Located in the B2G root directory, provides an easy way to retrieve device prefs.


Document Tags and Contributors

 Contributors to this page: Superluk, chrisdavidmills, shinglyu, PaulYang, rvdhrvdh
 Last updated by: Superluk,