• Skip to main content
  • Select language
  • Skip to search
MDN Web Docs
  • Technologies
    • HTML
    • CSS
    • JavaScript
    • Graphics
    • HTTP
    • APIs / DOM
    • WebExtensions
    • MathML
  • References & Guides
    • Learn web development
    • Tutorials
    • References
    • Developer Guides
    • Accessibility
    • Game development
    • ...more docs
B2G OS
  1. MDN
  2. Archive of obsolete content
  3. B2G OS
  4. Debugging on Firefox OS
  5. Taking screenshots

Taking screenshots

In This Article
  1. Preparing your phone
  2. Taking a screenshot
    1. Terminal
    2. DDMS
    3. Phone button combination
    4. App Manager/Simulator

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

Tags: 
  • Debugging
  • Firefox OS
  • Screenshots
 Contributors to this page: chrisdavidmills, Leonarf, rahul.desai, raniere, prathamesh.chavan, cirocosta, viorela, markg, Jeremie, Audrey
 Last updated by: chrisdavidmills, Feb 27, 2017, 2:59:45 AM
See also
  1. Build and install
    1. Build and install overview
    2. B2G OS build process summary
    3. Build prerequisites
    4. Preparing for your first build
    5. Building B2G OS
    6. B2G installer add-on
    7. Building B2G OS for Flame on Mac OS X
    8. Choosing how to run Gaia or B2G OS
    9. Compatible Devices
    10. Installing B2G OS on a mobile device
    11. Creating and applying B2G OS update packages
    12. Building and installing FOTA community builds
    13. B2G build variables reference sheet
  2. Porting B2G OS
    1. Porting overview
    2. Porting basics
    3. Porting on CyanogenMod
  3. Developing Gaia
    1. Developing Gaia overview
    2. Running the Gaia codebase
    3. Run Gaia on desktop using Mulet
    4. Understanding the Gaia codebase
    5. Making Gaia code changes
    6. Testing Gaia code changes
    7. Submitting a Gaia patch
    8. Gaia build system primer
    9. Different ways to run Gaia
    10. Make options reference
    11. Gaia tools reference
  4. B2G OS APIs