--- title: Using the App Manager slug: Archive/B2G_OS/Using_the_App_Manager translation_of: Archive/B2G_OS/Using_the_App_Manager ---
The App Manager is a new tool available in Firefox for Desktop, which provides a number of useful tools to help you test, deploy and debug HTML5 web apps on Firefox OS phones and the Firefox OS Simulator, directly from your browser.
The App Manager is for developers targeting Firefox OS 1.2 or later. If you're developing apps for Firefox OS 1.1, then you should check out the documentation for the Firefox OS 1.1 Simulator instead.
{{EmbedYouTube("z1Bxg1UJVf0")}}
The App Manager is composed of:
This section is designed to get you up and running as soon as possible; if you need some more detail please skip forward to the {{ anch("Device and system configuration") }} section and start reading from there. Also see the {{ anch("Troubleshooting") }} section for help if you are having trouble.
about:app-manager
)Settings > Screen Lock
) and enable Remote Debugging (Settings > Device information > More information > Developer
)The first thing you'll need to do when using the App Manager is make sure your system and phone are set up correctly. This section will run through all the steps required.
Make sure your device is running Firefox OS 1.2/Boot2Gecko 1.2 or higher. To check which version of Firefox OS the device is runing, go to Settings > Device Information > Software
.
If you don't have a high enough version installed, depending on what phone you have you will need to either install an available nightly build of Firefox 1.2+, or configure and build it yourself from source.
Builds available:
Note: To build your own Firefox OS 1.2+ distribution, follow the instructions located at Building and installing Firefox OS, starting with Firefox OS build prerequisites.
Next, you need to enable remote debugging in Firefox OS. To do so, go to Settings > Device information > More information > Developer
and check the Remote Debugging checkbox.
The process uses the Android Debug Bridge (ADB) to handle the device-computer connection and communication. There are two options for running ADB:
Let Firefox handle ADB (recommended). Install the ADB Helper add-on, which makes the process easier. With this installed, there's no need to install the ADB, and no need to type the adb forward
command: everything is handled by the add-on.
adb
as explained in Installing ADB. You'll need to enable port forwarding by entering the following command into your terminal:
adb forward tcp:6000 localfilesystem:/data/local/debugger-socketNote that you'll need to do this every time the phone is restarted or unplugged then re-plugged.
Note: There's no need to run this command if you installed the ADB Helper Add-on.
With all your configuration done, it's now time to plug your device into your computer and start the App Manager:
Settings > Screen Lock
and unchecking the Lock Screen
checkbox. This is a good idea because when the screen gets locked, the phone connection gets lost, meaning it is no longer available for debugging.Tools > Web Developer > App Manager
menu option, or type about:app-manager
in the URL bar.Note: The other controls in the connection status bar allow you to connect a simulator to the App Manager, which we cover in the next section, below, and change the port that the connection happens on. If you change the port, you'll also need to enable port forwarding for this port as well, as instructed in the {{anch("Enable port forwarding")}} section, above.
If you haven't got a real device available to use with App Manager, you can still try it out using a Firefox OS Simulator Add-on. To start off, install the simulator with the following button (multiple versions are available; you are advised to install them all, for maximum flexibility):
Once you've installed the simulator(s), you need to go to about:app-manager to see the connection status bar at the bottom of the App Manager tab, and click the "Start simulator" button. At least three buttons will appear:
Now everything is working, let's review the functionality available inside the App Manager, starting with the Apps panel. From here, you can import an existing app to push onto your device and debug:
Information about your app should appear on the right hand side of the window, as seen below:
From Firefox 28 onwards, the Apps Panel includes an editor for the app manifest:
Clicking on "Update" will update (install) the app on the device. Clicking on "debug" will connect a toolbox to the app, allowing you to debug its code directly:
Note: You'll enjoy playing around with the toolbox — try altering the DOM, CSS etc. and you'll see the updates reflected on the device in realtime. Such updates will be saved on the installed app code; you'll see them next time you open the app on the device.
Before Firefox 28, the tools are launched in a separate window. From Firefox 28 onwards, the tools are launched in a separate tab in the App Manager itself, alongside the Apps and Device tabs. The tab is given your app's icon so it's easy to find:
If an app was not added successfully — for example if the URL was incorrect, or you selected a packaged app folder — an entry will be added to the page for this app, but this will include error information.
You can also delete an app from this view, by hovering over the App name/description on the left of the window, and pressing the "X" button that appears in each case. This however doesn't remove the app from the device. To do that you need to manually remove the app using the device itself.
The Device tab displays information about the connected device. From the "Installed Apps" window, apps on the device can be started and debugged.
Note: Certified Apps are not listed by default. See how to debug certified apps.
The "Permissions" window shows the required priviledges for different Web APIs on the current device:
Finally, you can take a screenshot of the current device display by clicking the "Screenshot" button. The screenshot appears in a new tab on Firefox, and from there you can save or discard it as you wish.
Currently only devices running a development build of Firefox OS 1.2+ are capable of debugging certified apps. If you have a development build, you can enable certified app debugging by changing the pref devtools.debugger.forbid-certified-apps
to false
in your profile. To do this, follow the steps below:
On your computer, enter the following command in Terminal/console to enter your device's filesystem via the shell:
adb shell
Your prompt should change to root@android
.
Next, stop B2G running using the following command:
stop b2g
Navigate to the following directory:
cd /data/b2g/mozilla/*.default/
Here, update the prefs.js file with the following line:
echo 'user_pref("devtools.debugger.forbid-certified-apps", false);' >> prefs.js
After you've finished editing and saving the file, start B2G again using the following command:
start b2g
Exit the android filesystem using the exit
command; this will return you to your normal terminal prompt.
Next, reconnect to the App Manager and you should see certified apps appear for debugging.
Note: If you want to add this preference to your Gaia build you can run make DEVICE_DEBUG=1 reset-gaia
.
You can run custom B2G Desktop and Gaia builds in the App Manager via the simulator. Read Running custom Firefox OS/Gaia builds in the App Manager for more details.
If the device is not recognized:
adb forward
command?Can't connect your device to the App Manager or start the simulator? Let us know or file a bug.