Packaged apps Redirect 2



Note: Currently the Firefox Marketplace supports packaged apps for Firefox OS apps only.

Purpose of packaged apps


Types of packaged apps

There are three types of packaged apps:

Privileged app
A privileged app has the following characteristics:
  • Approved by an app store after code review or equivalent.
  • App's resources are signed by the app store.
Certified app
A certified app is intended for a critical system function like the default dialer or the system settings app on a smartphone. This type of app would be used for critical functions on a Firefox OS phone. It is not intended for third party apps, so most app developers cannot use this type of app. A certified app is a packaged app that is similar to a privileged app, except that all device permissions are implicit, meaning they are enabled without explicit user approval. A certified app must be approved for a device by the OEM or carrier in order to have this implicit approval to use critical APIs. To specify that an app is a certified app, add the type field to its manifest.webapp file and set it to certified.
Plain packaged app

Using sensitive Web APIs



Packaged apps and the Firefox Marketplace


Testing packaged app installation

To install a packaged app on a Firefox OS device using the Simulator for testing purposes, see the section on "Push to Device" in the Simulator guide. To test a packaged app without the Simulator, you can install it on a device from a regular web server by following the steps below, in the Self-publishing packaged apps section.

Self-publishing packaged apps

You can self-publish a packaged app by hosting it on a server along with a mini-manifest in the same directory that identifies the app and is used in the install process. This section covers how to do this detail.

Note that you can also host a packaged app locally and test it on a real device. The Web server and the phone must be on the same network, and the server must be able to serve requests from the local network. You just need to include the absolute path to the referenced files, in the same way as the absolute paths are included normally (see below.) Remember to include the port information if you are using a non-standard port, for example


  1. Zip up your app's contents and give it the name This file should contain all the app's resource files, including the manifest.

    Caution: You must be also careful to zip the contents you wish to appear in the packaged app, and not the directory they are contained in. If you zip up the parent directory, the manifest will end up in the wrong place, and the packaged app will be invalid.

  2. Create a file called package.manifest and give it the contents below. This is a mini-manifest used for packaged app installation purposes. It is not the main manifest of your app that is inside the zip file. See Mini-manifest fields if you want more detailed information about mini-manifests.
        "name": "My sample app",
        "package_path" : "",
        "version": "1",
        "developer": {
            "name": "Chris Mills",
            "url": ""
        <p>Packaged app installation page</p>
          // This URL must be a full url.
          var manifestUrl = '';
          var req = navigator.mozApps.installPackage(manifestUrl);
          req.onsuccess = function() {
          req.onerror = function() {
  4. Copy, package.manifest, and index.html into your app root directory (my-app-directory in my examples).

Note: You can not install privileged or certified apps with installations from hosted packages, as they need to be signed. Use the Simulator to test privileged apps.

Mini-manifest fields

Here is a more in-depth example of a mini-manifest:

  "name": "My app",
  "package_path": "",
  "version": "1.0",
  "size": 172496,
  "release_notes": "First release",
  "developer": {
    "name": "Developer Name",
    "url": ""
  "locales": {
    "fr-FR": {
      "name": "Mon application"
    "se-SE": {
      "name": "Min balla app"
  "icons": {
    "16": "/icons/16.png",
    "32": "/icons/32.png",
    "256": "/icons/256.png"

When the Firefox Marketplace generates a mini-manifest for your app, it pulls information from your app's manifest for some of the fields. You can find documentation for these fields at App manifest. The fields unique to the mini-manifest are package_path, release_notes, and size. The name, version, developer, and locales fields in your app manifest must be exactly the same as in your mini-manifest.

Here is information on the mini-manifest that relates to using it locally for your own testing:

(required) The app's name. Maximum length is 128 characters.
(required) The URL where the app's zip file can be found. You need to make sure the package_path is absolute to where the ZIP file is located.
The version of the app.
The size of the app's zip file in bytes. This is not necessary for local testing, but provide it to get a progressbar during installation.
Information about this release of the app. On the Marketplace this information comes from a Web page that is part of the submission process.
Information about the developer, contains the name and url fields. The developer info needs to match between the mini-manifest and the main manifest file in the ZIP.
Localization information. Keys should be in xx-YY format.
Icons for use by the app.

Note: Values in package and webapp.manifest need to be the same, otherwise installation will fail. The safest way is to copy manifest.webapp into package.manifest and just add the package_path.

Differences from hosted apps



    The UUID is randomly generated at install time, which means that it is unique per device it is installed on. The app:// protocol will be useful in future releases of the Web runtime for some identity, payment and OAuth flows.

  • For a self-hosted packaged app, you need to include an additional mini-manifest in the same directory as the zipped packaged app, which doesn't need to be called manifest.webapp (you might call it something like package.webapp). See Self-publishing packaged apps above for more details.
  • They are installed with a different mozApps API function, installPackage(), which for a self-hosted packaged app must point to the mini-manifest.


Updating packaged apps

For information on updating apps, see Updating apps.

Packaged app example

Firefox OS Boilerplate App

Document Tags and Contributors

Contributors to this page: chrisdavidmills
Last updated by: chrisdavidmills,