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.

jpm-mobile

You can use jpm and jpm-mobile for Firefox 38 and onwards.

This article is the reference for jpm-mobile.

The Node-based replacement for cfx --force-mobile. Enables you to run and test add-ons for Firefox Mobile (aka Fennec).

jpm usage is:

jpm-mobile [command] [options]

jpm supports the following global options:

-h, --help        - show a help message and exit
-V, --version     - print the jpm version number

Installation

jpm-mobile is distributed using the node package manager npm, so to get jpm-mobile you need to have npm installed, if you haven't already.  npm is included in Node.js, so to install npm, visit nodejs.org and click the Install button.

After that you can install jpm just as you would any other npm package:

npm install jpm-mobile -g

Depending on your setup, you might need to run this as an administrator:

sudo npm install jpm-mobile -g

At the command prompt, type:

jpm-mobile

You should see a screen summarizing the available jpm-mobile commands. Note that unlike cfx, jpm-mobile is available in every command prompt you start, as long as you installed it with the -g flag.

Problems?

If you don't see this, ask for help. SDK users and project team members discuss problems and proposals on the project mailing list. Someone else may have had the same problem you do, so try searching the list. You're welcome to post a question, too. You can also chat with other SDK users in #jetpack on Mozilla's IRC network.

Command reference

There are currently two jpm commands:

jpm-mobile run Launch an instance of Firefox with your add-on installed.
jpm-mobile test Runs your add-on's unit tests.

jpm-mobile run

This command runs a new instance of Firefox with the add-on installed:

jpm-mobile run

jpm-mobile run accepts the following options:

--adb /path/to/adb Provides the path to adb.
-b --binary BINARY

Use the package name of Firefox specified in BINARY.

jpm-mobile run -b fennec

You can get the package name by following command.

$ adb shell pm list packages | grep org.mozilla
package:org.mozilla.firefox
$ jpm-mobile run -b firefox # the package name is firefox
-v --verbose Verbose operation.

jpm-mobile test

 

jpm-mobile test

 

See the tutorial on unit testing and the reference documentation for the assert module for more details on this.

jpm-mobile test accepts the following options:

--adb /path/to/adb Provides the path to adb.
-b --binary BINARY

Use the package name of Firefox specified in BINARY.

jpm-mobile test -b fennec

You can get the package name by following command.

$ adb shell pm list packages | grep org.mozilla
package:org.mozilla.firefox
$ jpm-mobile run -b firefox # the package name is firefox
-v --verbose Verbose operation.

Document Tags and Contributors

 Contributors to this page: Askeing, wbamberg, evold
 Last updated by: Askeing,