enabling gecko logs

(back to firefox os main page)

logs on Firefox OS devices, like those on Android devices, can be accessed using adb logcat, but by default Firefox OS doesn't seem to print logs for Gecko or Gaia, only low level kernel logs (e.g. things related to the Wi-Fi driver or power management). logs for the latter can be enabled in developer options, but i couldn't find a way to enable the former officially.

to do this, you need root and a computer with adb installed. some phones (like the Fx0) are rooted out of the box, while others need to be rooted manually.

  1. open a terminal/command prompt,
  2. enable adb's root mode using adb root,
  3. run adb shell ls /data/b2g/mozilla,
  4. the first folder should have a name that starts with random characters and ends in .default, make note of this name,
  5. run adb pull /data/b2g/mozilla/(default folder name)/prefs.js, where (default folder name) is the folder from earlier,
  6. open the prefs.js file, which is located in the same folder the terminal is running in,
  7. add the following line: user_pref("dom.mozApps.debug", true);,
  8. run adb push prefs.js /data/b2g/mozilla/(default folder name)/prefs.js,
  9. restart the device.

Gecko logs could be useful for checking why an app doesn't install, as FxOS often doesn't reveal this.