NFC Spy

NFC Spy


NFC Spy make it easy to watch APDUs transceived between reader and contactless smart card. This is useful for NFC/HCE developer to learn about the underlying communication protocol, debug quential error, etc.

To use this app, You need two android phones both has NFC hardware, and at least one is runing 4.4 or greater version for HCE suport.

One phone act as a emulated card using NFC card emulation mode (HCE, starting from android 4.4 kitKat).

Another phone act as a card reader using NFC reader mode.

This two phones connected to each other using WLAN direct (WiFi-P2P).

When first phone close to a REAL card reader (POS, ATM, etc.), it will send all APDUs it received to the second phone by WiFi-P2P socket. The second phone gets APDUs, and then send these to a REAL card which attached close to it, similarly, the second phone send respones APDUs from REAL card to first phone, then the REAL card reader.

Eventually the REAL reader will act as read a REAL card directly, and this app will record all APDUs sent and received, that is how this app works, and why call it 'NFC Spy'.

This is an open source app, You can get source code from https://github.com/sinpolib/nfcspy/

NOTE:

You should NOT use it for illegal acts, or you will be solely responsible for any consequences thereof. In addition, this app may be need to root/modify your system to work better, please be careful when doing this, and again, Developer of this app do NOT accept any responsibility.

If you also installed other HCE apps, you may see multiple items in the 'Tap & Pay' page of system settings, And you need select NFC Spy's card before use it.

Android's HCE architecture use HCE service to implement card emulation, every service need to declare AIDs it will respone when card reader select application by aid.
This leads to three problems, first, only ISO14443-A/ISO7816 compatible smart card can be emulated, second is NFC Spy can only handle limited card type, the last is HCE only works with card reader which send a stardard ISO7816 SELECT NAME/AID command as the first APDU.

The first problem can NOT be resolved for the time being, unless you switch to other implemention of card emulation such as some versions of CyanogenMod, but what will be another story.
To solve the second, you can use a rooted phone with Xposed framework, add NFC Spy or 'NFC Card-Emulation Catch-All Routing' mod.
To solve the last one, you may need a custom ROM which has modified system libaray.

Recent changes:
1,Source code repository migrated from Google Code to GitHub
Add to list
Free
55
2.8
User ratings
73
Installs
10,000+
Concerns
0
File size
217 kb
Screenshots
Screenshot of NFC Spy Screenshot of NFC Spy Screenshot of NFC Spy Screenshot of NFC Spy Screenshot of NFC Spy Screenshot of NFC Spy
About NFC Spy
NFC Spy make it easy to watch APDUs transceived between reader and contactless smart card. This is useful for NFC/HCE developer to learn about the underlying communication protocol, debug quential error, etc.

To use this app, You need two android phones both has NFC hardware, and at least one is runing 4.4 or greater version for HCE suport.

One phone act as a emulated card using NFC card emulation mode (HCE, starting from android 4.4 kitKat).

Another phone act as a card reader using NFC reader mode.

This two phones connected to each other using WLAN direct (WiFi-P2P).

When first phone close to a REAL card reader (POS, ATM, etc.), it will send all APDUs it received to the second phone by WiFi-P2P socket. The second phone gets APDUs, and then send these to a REAL card which attached close to it, similarly, the second phone send respones APDUs from REAL card to first phone, then the REAL card reader.

Eventually the REAL reader will act as read a REAL card directly, and this app will record all APDUs sent and received, that is how this app works, and why call it 'NFC Spy'.

This is an open source app, You can get source code from https://github.com/sinpolib/nfcspy/

NOTE:

You should NOT use it for illegal acts, or you will be solely responsible for any consequences thereof. In addition, this app may be need to root/modify your system to work better, please be careful when doing this, and again, Developer of this app do NOT accept any responsibility.

If you also installed other HCE apps, you may see multiple items in the 'Tap & Pay' page of system settings, And you need select NFC Spy's card before use it.

Android's HCE architecture use HCE service to implement card emulation, every service need to declare AIDs it will respone when card reader select application by aid.
This leads to three problems, first, only ISO14443-A/ISO7816 compatible smart card can be emulated, second is NFC Spy can only handle limited card type, the last is HCE only works with card reader which send a stardard ISO7816 SELECT NAME/AID command as the first APDU.

The first problem can NOT be resolved for the time being, unless you switch to other implemention of card emulation such as some versions of CyanogenMod, but what will be another story.
To solve the second, you can use a rooted phone with Xposed framework, add NFC Spy or 'NFC Card-Emulation Catch-All Routing' mod.
To solve the last one, you may need a custom ROM which has modified system libaray.

Recent changes:
1,Source code repository migrated from Google Code to GitHub

Android Market Comments
A Google User
Jun 2, 2015
Doesnt work on S5. Tried changing nfc read methods, no good
A Google User
Apr 27, 2015
Works awesome. Great job guys!!
A Google User
Jan 11, 2015
کار نمیکنه
A Google User
Dec 8, 2014
Suxs ballz Do it work?
A Google User
Apr 7, 2014
Works fine with Nexus 5 & Nexus 7 Could you just make this app record all data stream between card and reader?
Version 1000000
Version 1000000