Firefox OS/DeviceQA/CollectLogs
From MozillaWiki
< Firefox OS | DeviceQA(Redirected from FirefoxOS/DeviceQA/CollectLogs)
Contents
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
https://wiki.mozilla.org/B2G/Packet_Sniffing_with_Wireshark
HTTP Logging
https://developer.mozilla.org/en-US/docs/Mozilla/Debugging/HTTP_logging#Firefox_OS_phones
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 /system/bin/b2g.sh
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
https://mozilla.box.com/s/zhr8wg0xae18xhennp2t
MMS debuging
- Add 'pref("mms.debugging.enabled", true);' to turn MMS debugging on
- Use the patterns above to change either the pref.js in the user profile or the user.js for the system: http://kb.mozillazine.org/Firefox_:_FAQs_:_About:config_Entries
- Real time turning wifi debug on ( you will need netcat ( http://netcat.sourceforge.net/download.php ; http://www.catonmat.net/blog/unix-utilities-netcat/ ) ). You will also need to work with a version that has the simple remote js console. Patch listed here: ( bug 723391 )
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