Coder Social home page Coder Social logo

matutes / nfcspy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sinpolib/nfcspy

0.0 1.0 0.0 531 KB

NFC Spy is an Android app, It can watch APDUs transceived between reader and contactless smart card.

License: GNU General Public License v3.0

Java 100.00%

nfcspy's Introduction

NFC Spy

NFC Spy is an Android app, It can watch APDUs transceived between reader and contactless smart card.

The latest version will be published in https://play.google.com/store/apps/details?id=com.sinpo.nfcspy


This is useful for NFC/HCE developer to learn about the underlying communication protocol, debugging equential error, etc. However, 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.

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 (WiFiP2P).

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'.

NOTE:

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.

License

NFC Spy is licensed under GNU GPLv3 - see the LICENSE file.

nfcspy's People

Contributors

sinpowei avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.