


Drag and drop your capture file into WireShark.Įxample C:\Users\Nitz>emulator -list-avdsĬ:\Users\Nitz>emulator -engine classic -tcpdump d:\dump.cap -avd Nexus_5X_API_22_64bitĮmulator: WARNING: Classic qemu does not support SMP.This method is much easier done using an emulator, because these come with tcpdump preinstalled and grabbing the captured traffic out of an emulator is a piece of cake.įirst of all we need to install WireShark. A device with Android >= 4.0 and tcpdump.Either this contains the Bluetooth log file directly (search for a btsnoop_hci.log), or the full path of the log file (grep the bug report for btsnoop_hci.So I've found myself in need of some Android network sniffing. Run adb bugreport bugreport.out to create a bug report ZIP file.Run adb root to gain root-level access to the phone.Connect to the phone via USB debugging with adb.Enable "Bluetooth HCI snoop log" in the Android developer options.Unfortunately, the location of this log file changes between Android versions, and access seems to require root in recent versions. This is similar to creating a tcpdump of TCP/IP traffic, just for Bluetooth.

The setup couldn't be simpler: connect the phone to the computer via USB, enable USB debugging, select the "Android Bluetooth" capture source in Wireshark, and start recording!Īndroid also has a function to log all traffic into a file, which can later be copied to a computer for analysis in Wireshark. Helpfully, newer versions of Wireshark include an androiddump utility to capture Bluetooth traffic directly from Android phones. If this is not supported out of the box, recording the Bluetooth traffic is useful in order to create a custom tool. While many of them come with mobile apps for control and configuration, sometimes it's convenient to access them from a computer instead. Bluetooth devices have become ubiquitous, whether it's headphones, heart rate monitors, smart watches, or light bulbs.
