Firefox OS/DeviceQA/CollectLogs

From MozillaWiki
Jump to: navigation, search

Collect Logs

Wifi Logging

  • turn on the wifi debug message in Settings/Device

information/More Information/Developer/Wi-Fi output in adb,

  • attach the debug message using "adb logcat". You need to turn off/on the wifi to

output the debug message.

Packet Sniffing

HTTP Logging

Commands to begin logging on a Firefox OS device.

 ## in adb shell
 export NSPR_LOG_MODULES=timestamp,nsHttp:5,nsSocketTransport:5,nsStreamPump:5,nsHostResolver:5
 export NSPR_LOG_FILE=/data/local/tmp/myLogFile
 stop b2g

RIL Debugging

The below example turns RIL debugging on

 adb pull /system/b2g/defaults/pref/user.js .
 < edit user.js and set "ril.debugging.enabled" to true >
 adb remount
 adb push user.js /system/b2g/defaults/pref
 adb shell sync && adb reboot
 1. adb root
    adb remount
 2. Pull omni.ja from DUT
    adb pull /system/b2g/omni.ja
 3. Unzip omni.ja 
    unzip omni.ja -d Omni
 4. Find ril_consts.js in Omni/modules/
 5. Open ril_consts.js and update this.DEBUG_ALL = false to true.
    sed -i 's/this.DEBUG_ALL = false;/this.DEBUG_ALL = true;/g' Omni/modules/ril_consts.js
 6. cd Omni, zip all files
    zip -r omni.ja *
 7. Push it back to DUT then reboot it.
    adb push omni.ja /system/b2g
    adb reboot

MMS debuging

  • Add 'pref("mms.debugging.enabled", true);' to turn MMS debugging on
 adb forward tcp:9999 tcp:9999
 netcat localhost 9999
 navigator.mozSettings.createLock().set({'wifi.debugging.enabled': true})
  • to turn it back off, just set it to false:
 navigator.mozSettings.createLock().set({'wifi.debugging.enabled': false})

Source : bug 806611

  • to turn system system updates off; set gaia.system.checkForUpdates to false