Skip to content

Latest commit

 

History

History
32 lines (26 loc) · 1.8 KB

OnDevice.md

File metadata and controls

32 lines (26 loc) · 1.8 KB

On-Device Capture Mode

On-device capture mode enables the user to capture NFC traffic of third-party applications running on the device. All ISO 14443 layer traffic between the application and the tag, or in case of HCE, the reader, is captured.

Requirements

Usage

  1. Switch to Capture Mode in the navigation drawer.
  2. Start recording by pressing Begin Capture.
  3. Switch to 3rd party app, that should be captured.
  4. Use NFC functions of 3rd party app.
  5. Switch back to NFCGate.
  6. Stop recording by pressing Stop Capture.

Captured NFC traffic is available in Logging. From there, it can be exported as a pcapng file.

Technical Information

Capturing NFC traffic requires hooking Java methods in Android's NFC service. As framework code might change between Android versions, on-device capture might break, depending on the Android version! Please see compatibility document for detailed information. On-device capture hooks the following functions within the Android NFC service (com.android.nfc):

  • public TransceiveResult com.android.nfc.NfcService.TagService#transceive(int nativeHandle, byte[] data, boolean raw)
  • public int com.android.nfc.NfcDispatcher#dispatchTag(Tag tag)
  • public void com.android.nfc.cardemulation.HostEmulationManager#onHostEmulationData(byte[] data)
  • public void com.android.nfc.cardemulation.HostEmulationManager#onHostEmulationActivated()
  • public boolean com.android.nfc.NfcService#sendData(byte[] data)