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

This article provides a reference for all the B2G build, Gaia build, and Gecko build variables and commands you might need during Firefox OS-related build operations.

B2G build

Variables

Example
xxx

Commands

./repo sync
xxx
./config.sh
xxx

Gaia build

Variables

See the Gaia MakeFile for the definition of all these variables.

ADB
xxx
APP
Some commands can act on all of gaia or on one application only. This environment variable defines if we want a command to act on one app only, and if so, which app.
B2G_SYSTEM_APPS
Ensures that the system apps are installed on the system partition.
GAIA_DIR
xxx
PROFILE_DIR
xxx
PROFILE_FOLDER
This defines the folder where the profile will be generated. By default it's gaia/profile for normal profiles and gaia/profile-debug for DEBUG=1 profiles (see below.)
COREWEBAPPS_DIR
xxx
SCHEME
xxx
GAIA_DOMAIN
xxx
DEBUG
When set to 1, the generated profile is suitable to be used with Firefox desktop or the Firefox OS simulator (B2G Desktop): DEBUG=1 DESKTOP=0 make.
This includes the httpd.js extension and configured preferences so that you can access applications using app://<appname>.gaiamobile.org/. Some applications are known to work like this, most notably the SMS application.
LOCAL_DOMAINS
xxx
DESKTOP
This includes a set of extensions in the DEBUG profile to allow the Gaia System app to be loaded in Firefox. This is quite broken these days and deprecated in favor of Mulet. It's set to 1 by default when DEBUG=1 is used, but because this is really broken these days, so you'll want to disable it.
Be  careful as this also doesn't work with the Firefox OS Simulator (B2G Desktop) at all.
DEVICE_DEBUG
Enables a more developer-friendly experience: turns on adb debugging with devtools, disables the lock screen, and enables prefs to allow debugging of certified apps.
NO_LOCK_SCREEN
xxx
SCREEN_TIMEOUT
When set to 0, this sets a preference in the profile to disable screen timeout.
SYSTEM
xxx
GAIA_PORT
xxx
GAIA_LOCALES_PATH
xxx
GAIA_INSTALL_PARENT
xxx
LOCALES_FILE
xxx
GAIA_KEYBOARD_LAYOUTS
xxx
GAIA_KEYBOARD_DOWNLOADABLE_LAYOUTS
xxx
GAIA_KEYBOARD_ENABLE_USER_DICT
xxx
LOCALE_BASEDIR
xxx
BUILD_APP_NAME
Essentially an alias for APP (see above).
PRODUCTION
Creates a production build (rather than engineering); Facebook app id and some other production app ids are used with this.  Alternatively make production will work
GAIA_OPTIMIZE
When set to 1 this runs optimization steps when building Gaia applications such as JS code minification. Not all gaia applications are affected by this, as the feature is opt-in.
GAIA_DEVICE_TYPE
xxx
GAIA_DEV_PIXELS_PER_PX
The pixel density of the target device. This affects which image and/or video assets are copied into the build. This defaults to 1, but  higher spec devices need higher resolultion assets — for example the Flame should use a value of 1.5. It is aliased as GAIA_DPPX.
DOGFOOD
Turns on Dogfood Gaia build.
MOZILLA_OFFICIAL
When nonzero, a Mozilla-branded build will be produced. The default is 0.
GAIA_DEFAULT_LOCALE
xxx
GAIA_PRETRANSLATE
xxx
GAIA_CONCAT_LOCALES
xxx
GAIA_DISTRIBUTION_DIR
Use this to specify a customized Gaia; see the Market customizations guide for more details.
GAIA_APPDIRS
xxx
GAIA_ALLAPPDIRS
xxx
GAIA_MEMORY_PROFILE
xxx
NOFTU
When set to 1, this sets a preference in the profile to disable the FTU.
REMOTE_DEBUGGER
xxx
TARGET_BUILD_VARIANT
xxx
SETTINGS_PATH
xxx
FTU_PING_URL
xxx
KEYBOARD_LAYOUTS_PATH
xxx
CONTACTS_IMPORT_SERVICES_PATH
xxx
EMAIL_SERVICES_PATH
xxx
STAGE_DIR
xxx
GAIA_APP_TARGET
xxx
BUILD_DEBUG
xxx
VARIANT_PATH
xxx
REBUILD
xxx
P
xxx
VERBOSE
xxx
RAPTOR
Enables performance marks and measures to output metadata to logcat. Usage: RAPTOR=1 make reset-gaia
SHARE_PERF_USAGE
xxx
DEFAULT_KEYBOAD_SYMBOLS_FONT
xxx
DEFAULT_GAIA_ICONS_FONT
xxx
MOZ_APPROX_LOCATION
Use this to turn on the privacy panel; the default is off, except in engineering builds.

Commands

The following is an abbreviated list of the most common commands you'll need. A much more detailed list can be found in the Gaia make options reference.

make
Makes only the profile.
make reset-gaia
Deletes the previous profile and installs a new Gaia profile.
make install-gaia
Installs Gaia on top without deleting anything.
make production
Does the same thing as PRODUCTION=1 make reset-gaia.
make clean
Removes the generated profile.
make really-clean
Removes the generated profile and the directory's xul-runner; you should only run this when things are totally borked.

Gecko build

Variables

MOZ_BUILD_DATE
Sets the build id to a specific build date/time.
B2G_DEBUG
xxx
VARIANT
Specifies the Gecko variant you want to build. Valid types are detailed below:
eng

This is the default flavor. A plain make is the same as make eng.

  • Installs modules tagged with: eng, debug, user, and/or development.
  • Installs non-APK modules that have no tags specified.
  • Installs APKs according to the product definition files, in addition to tagged APKs.
  • ro.secure=0
  • ro.debuggable=1
  • ro.kernel.android.checkjni=1
  • adb is enabled by default.
  • marionette is enabled
  • Does not have update notifications by default ( B2G_UPDATER=1 to turn on )
user

This is the flavor intended for final release.

  • Installs modules tagged with user.
  • Installs non-APK modules that have no tags specified.
  • Installs APKs according to the product definition files; tags are ignored for APK modules.
  • ro.secure=1
  • ro.debuggable=0
  • adb is disabled by default.
  • Optimizes by default
userdebug make userdebug

The same as user, except:

  • Also installs modules tagged with debug.
  • ro.debuggable=1
  • adb is enabled by default.
  • marionette is enabled

Note: This table is inspired by the Android Build Variants table.

Commands

./build.sh buildsymbols
Makes build symbols for debugging; see Uploading symbols to Mozilla's symbol server.
./build.sh gecko-update-full
Creates an OTA mar file; see Firefox OS update packages.
./build.sh gecko-update-fota
Creates a FOTA mar/zip based on files containing only a subset of files and directories; see Firefox OS update packages.
./build.sh gecko-update-fota-full
Creates a FOTA mar/zip based on files; see Firefox OS update packages.
./build.sh gecko-update-fota-fullimg
Creates a FOTA mar/zip based on partitions; see Firefox OS update packages.

Document Tags and Contributors

 Last updated by: Superluk,