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.

Taking screenshots of your application can be useful in many circumstances, for example showing your work to a client, or when publishing your app on the Marketplace. This article explains how to take screenshots on your Firefox OS phone.

Note: Android developers will find this familiar: The steps are really similar.

Preparing your phone

  1. On your phone, go to the Developer Settings and check Remote Debugging & Console Enabled.
  2. Make sure you phone has ADB installed and working.
  3. Connect your phone to your computer via USB.

Taking a screenshot

You now have four choices: using the Terminal, using DDMS in Eclipse, using the dedicated button combination on the phone, or using the App Manager.

Terminal

Open a terminal window, then enter the follwing three commands:

  1. Take the screenshot using the following command (you can change screenshot.png if you want to call it something else):
    adb shell screencap -p /sdcard/screenshot.png
  2. Pull the picture onto your computer:
    adb pull /sdcard/screenshot.png
  3. Remove the screenshot from your device:
    adb shell rm /sdcard/screenshot.png

Alternatively, you can use ffmpeg:

  1. Make sure you have ffmpeg installed:
    1. On Mac, if you use MacPorts, you can do this with sudo port install ffmpeg. For homebrew, do brew install ffmpeg.
    2. On Linux (Ubuntu/Debian), use sudo apt-get install ffmpeg.
  2. cd into the B2G/gaia directory.
  3. Use the make screenshot command to take a screenshot.
  4. You now have a screenshot called screenshot.png.

DDMS

Open Eclipse.

  1. Open DDMS: Window > Open Perspective > Other > DDMS.
  2. On the left side panel, in the Devices tab, click the Screen capture button.
  3. A new window appears with several options; click on Save button to save your screenshot.

Note: To learn more about DDMS, have a look at the DDMS documentation .

Phone button combination

  1. On Firefox OS versions up to 2.0, simultaneously hold down the Home and Power buttons for a few seconds.
  2. On Firefox OS version 2.1 and beyond, simultaneously hold down the Volume Down and Power buttons for a few seconds.

This takes a screenshot, which is saved in your Gallery. You can now copy the picture from your SDCard to your computer using whatever method suits you best.

Note: The button combination change was made because many people feel that Home and Power is more difficult to do that it should be, especially with one hand, plus devices with no hardware Home button are not very well supported (you can't use a software Home button in many places in Gaia, such as the lock screen).

App Manager/Simulator

  1. Go to the App Manager, connect to your phone, and navigate to the Device tab on the left.
  2. Click on the Screenshot button at the bottom of the page (is at the same place that you started the simulator).

Document Tags and Contributors

 Last updated by: chrisdavidmills,