mozilla

Revision 345891 of Choosing how to run Gaia or B2G

  • Revision slug: Mozilla/Firefox_OS/Choosing_how_to_run_Gaia_or_B2G
  • Revision title: Choosing how to run Gaia or B2G
  • Revision id: 345891
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment Firefox_OS/Choosing_how_to_run_Gaia_or_B2G Mozilla/Firefox_OS/Choosing_how_to_run_Gaia_or_B2G

Revision Content

{{ B2GMain() }}

Depending on your specific needs, you have an assortment of options to consider when experimenting with Firefox OS or the Gaia user interface. You can choose among the following options; each has its advantages and disadvantages to consider, and some are more flexible than others.

Running B2G on the desktop

It's possible to build a Firefox OS simulator and run Gaia on it. This software is based on Firefox but behaves very much like the on-device experience of Firefox OS. Currently Mozilla provides nightly builds of this application for developers. If you are familiar with building the Firefox code-base or C++ projects, you can build this application yourself following these instructions.

Advantages

  • The simulator provides a mobile-sized viewport.
  • The experience is similar to a real mobile device in most respects.
  • More (but not all) device APIs are available.

Disadvantages

  • You need to actually have a C/C++ build system installed.
  • You need to build Gecko and the simulator yourself.
  • The Firefox developer tools are not available

Why to run the B2G simulator

This is a good middle-of-the-road testing and development solution. It's a good way to get a better feel for how your app or other code will work in a device-like environment without actually having to flash a phone every time you want to test something.

Note: Before shipping an app, you will absolutely want to test on real hardware!

Simulator varieties

There are several varieties of the Firefox OS Simulator available:

Firefox OS Simulator add-on
This extension is the primary tool for testing apps running on Firefox OS, and is the recommended solution for most users. It includes support for eveloper tools, adding apps to the test environment, and so forth.
Developer desktop builds
These builds of the simulator are stand-alone applications that are primarily intended to help core Firefox OS developers to verify technical features.
Localizer desktop builds
The localizer builds are primarily useful for localization teams to work on and test their localizations of Firefox OS and of Firefox OS apps.

Running B2G on a mobile device

The most thorough way to test your B2G or Gaia development work, or your web app, is to build and install Firefox OS on a real mobile device. This is also the most complicated process.

Advantages

  • You get the full mobile device experience.
  • All device APIs are available.
  • You can experience your code's performance in real device usage.

Disadvantages

  • You need a full C/C++ build system installed.
  • You need to build Gecko and Gaia yourself.
  • You need a compatible mobile device on which to install the B2G operating system.
  • You need to flash the device with B2G, removing whatever operating system is currently installed.

Why to run B2G on a mobile device

This is, obviously, the most accurate way to test any code or web project on B2G or Gaia. By running on actual mobile hardware, you can ensure that your project performs well and looks good, and uses all device APIs correctly. In addition, you should always test on real hardware before shipping any code; failing to do so can have unfortunate effects that can be hard to predict.

Revision Source

<p>{{ B2GMain() }}</p>
<p>Depending on your specific needs, you have an assortment of options to consider when experimenting with Firefox OS or the <a href="/en/Mozilla/Boot_to_Gecko/Introduction_to_Gaia" title="en/Mozilla/Boot_to_Gecko/Introduction_to_Gaia">Gaia</a> user interface. You can choose among the following options; each has its advantages and disadvantages to consider, and some are more flexible than others.</p>
<h2 id="Running_B2G_on_the_desktop">Running B2G on the desktop</h2>
<p>It's possible to build a Firefox OS simulator and run Gaia on it. This software is based on Firefox but behaves very much like the on-device experience of Firefox OS. Currently Mozilla provides <a href="https://wiki.mozilla.org/Gaia/Hacking#ATTENTION_-_Desktop_builds_now_available" title="https://wiki.mozilla.org/Gaia/Hacking#ATTENTION_-_Desktop_builds_now_available">nightly builds of this application</a> for developers. If you are familiar with building the Firefox code-base or C++ projects, you can build this application yourself <a class="link-https" href="https://wiki.mozilla.org/Gaia/Hacking#Building_B2G" title="https://wiki.mozilla.org/Gaia/Hacking#Building_B2G">following these instructions</a>.</p>
<h3 id="Advantages">Advantages</h3>
<ul>
  <li>The simulator provides a mobile-sized viewport.</li>
  <li>The experience is similar to a real mobile device in most respects.</li>
  <li>More (but not all) device APIs are available.</li>
</ul>
<h3 id="Disadvantages">Disadvantages</h3>
<ul>
  <li>You need to actually have a C/C++ build system installed.</li>
  <li>You need to build Gecko and the simulator yourself.</li>
  <li>The Firefox developer tools are not available</li>
</ul>
<h3 id="Why_to_run_the_B2G_simulator">Why to run the B2G simulator</h3>
<p>This is a good middle-of-the-road testing and development solution. It's a good way to get a better feel for how your app or other code will work in a device-like environment without actually having to flash a phone every time you want to test something.</p>
<div class="note">
  <strong>Note:</strong> Before shipping an app, you will absolutely want to test on real hardware!</div>
<h3 class="note" id="Simulator_varieties">Simulator varieties</h3>
<p>There are several varieties of the Firefox OS Simulator available:</p>
<dl>
  <dt>
    <a href="/en-US/docs/Mozilla/Boot_to_Gecko/Using_Firefox_OS_Simulator" title="/en-US/docs/Mozilla/Boot_to_Gecko/Using_Firefox_OS_Simulator">Firefox OS Simulator add-on</a></dt>
  <dd>
    This extension is the primary tool for testing apps running on Firefox OS, and is the recommended solution for most users. It includes support for eveloper tools, adding apps to the test environment, and so forth.</dd>
  <dt>
    Developer desktop builds</dt>
  <dd>
    These builds of the simulator are stand-alone applications that are primarily intended to help core Firefox OS developers to verify technical features.</dd>
  <dt>
    Localizer desktop builds</dt>
  <dd>
    The localizer builds are primarily useful for localization teams to work on and test their localizations of Firefox OS and of Firefox OS apps.</dd>
</dl>
<h2 id="Running_B2G_on_a_mobile_device">Running B2G on a mobile device</h2>
<p>The most thorough way to test your B2G or Gaia development work, or your web app, is to build and install Firefox OS on a real mobile device. This is also the most complicated process.</p>
<h3 id="Advantages">Advantages</h3>
<ul>
  <li>You get the full mobile device experience.</li>
  <li>All device APIs are available.</li>
  <li>You can experience your code's performance in real device usage.</li>
</ul>
<h3 id="Disadvantages">Disadvantages</h3>
<ul>
  <li>You need a full C/C++ build system installed.</li>
  <li>You need to build Gecko and Gaia yourself.</li>
  <li>You need a compatible mobile device on which to install the B2G operating system.</li>
  <li>You need to flash the device with B2G, removing whatever operating system is currently installed.</li>
</ul>
<h3 id="Why_to_run_B2G_on_a_mobile_device">Why to run B2G on a mobile device</h3>
<p>This is, obviously, the most accurate way to test any code or web project on B2G or Gaia. By running on actual mobile hardware, you can ensure that your project performs well and looks good, and uses all device APIs correctly. In addition, you should <strong>always</strong> test on real hardware before shipping any code; failing to do so can have unfortunate effects that can be hard to predict.</p>
Revert to this revision