Boot to Gecko


'Boot to Gecko' ( also referred to as 'B2G' ) is Mozilla's open source mobile operating system based on Linux and Mozilla's Gecko technology. The idea is essentially to have all user-accessible software running on the phone be a Web app that uses advanced HTML5 techniques and device APIs to access the phone's hardware directly via JavaScript.

For Web developers, the most important part to understand is that the entire user interface is a Web app, one that is capable of displaying and launching other Web apps. Any modifications you make to the user interface and any applications you create to run on B2G are Web pages, albeit with enhanced access to the mobile device's hardware and services.

For Web developers

Gaia is the user interface for B2G, and it is a Web application that runs locally on a B2G device, emulator, desktop build, or Firefox build. All you need to know in order to add apps or make changes to Gaia are Web technologies like JavaScript, HTML and CSS.

Boot to Gecko is under heavy development currently; we are constantly working on ways to make it easier for you to use and hack on Gaia and create apps. However, you need knowledge about systems in order to do things like build the entire B2G stack, or flash a phone with a build of B2G. Linked below are guides meant for Web developers interested in running and making changes to Gaia or developing apps to run on Boot to Gecko devices.

Writing apps for Boot to Gecko

B2G apps are nothing more than open Web apps that are installed on a B2G phone.

If you have a Boot to Gecko developer phone

If you have received a developer phone running B2G from Mozilla or had someone install B2G on your phone, here is a basic guide for working with your phone. We are working to improve this process and hope to have more streamlined instructions on MDN soon. If you are interested in the build/flash process, please see the following section 'Setting up & building Boot to Gecko' for more detailed information.

Running Gaia using Firefox Nightly

If you have some knowledge of git, you can clone the Gaia repository and launch Gaia using a recent Firefox Nightly build.

  • no build system  and very little setup required
  • can use the Firefox dev tools
  • the viewport is based on the size of the browser window
  • many device-like things won't work
  • apps are launched in separate, pinned tabs
  • Firefox Nightly might be unstable

Building and Running B2G desktop builds

It is possible to build a Boot to Gecko 'simulator' and run Gaia using this application. This software is based on Firefox but behaves similar to the on-device experience of Boot to Gecko. Currently Mozilla is working on providing nightly builds of this application for developers, and this work is being tracked in bug 744008. If you are familiar with building the Firefox code-base or C++ projects, you can build this application yourself following these instructions.

  • mobile viewport, similar experience to a mobile device in most respects
  • more device apis ( not all )
  • need to install a C/C++ build system and build gecko
  • The Firefox dev tools are not available.

Project Resources

Developing for Boot to Gecko

Marionette for Boot to Gecko

Marionette Tutorials

Writing Tests For Marionette

Tags (2)

Edit tags

Attachments (0)


Attach file