Changes

Jump to: navigation, search

B2G/QA/Tips And Tricks

1,643 bytes removed, 23:53, 17 March 2014
Packet Sniffing
=== Packet Sniffing ===
Courtesy of Dennis Miller : httphttps://dennismillerdevwiki.wordpress.com/2011/02/03/debug-network-activity-in-android-using-wireshark/ Instructions for Mac:# Download and install Wireshark if you don’t have it already : http://www.wiresharkmozilla.org/download.html# Double click the dmg installer.# Drag the Wireshark icon onto the Applications alias.# Open the Utilities folder.# Create a folder somewhere on your hard drive for the Command line utilities. I put mine in /Users/yourname/wireshark/bin# Now drag the contents of the Command Line folder to this new folder.# Now set a PATH variable pointing to this directory. (e.g. export PATH=$PATH:B2G/Users/yourname/wireshark/bin )# Optional. If you have a problem with permissions you may have to drag the ChmodBPF folder into the StartupItems alias. Then run this command: cd /Library/StartupItems sudo chown -R root:wheel ChmodBF Ok now we are ready to start monitoring http traffic.# Launch an emulator instance for your project.# In one shell start tcpdump. adb shell “tcpdump -n -s 0 -w – | nc -l -p 11233″3. In another shell, forward data and start Wireshark. adb forward tcp:11233 tcp:11233 && nc 127.0.0.1 11233 | sudo wireshark -k -S -i - NOTE: If you run as sudo there should not be any permission errors. You should see the Wireshark UI now. It will say “Capturing From Standard Input”.Type http into the Filter box and hit Apply. Wait a moment while the filtering takes place.Call services from the emulator and watch the results in Wireshark. NOTE: The only drawback to this is that the adb utility will start to “choke” sometimes. If you want to see just headers, use -s 100 instead of 0. This helps somewhat.Packet_Sniffing_with_Wireshark
== Addon to Firefox web browser to see Firefox OS Simulator ==
Confirm
4,378
edits

Navigation menu