piotrekwitkowski / LibraryNFC

MIFARE DESFire NFC Reader and HCE Emulator apps for Android

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LibraryNFC

is a school project to emulate NXP's MIFARE DESFire-based library ID cards with Android's Host Card Emulation.

LibraryHCE

This module offers emulation of a contactless library ID card. Emulation uses native MIFARE DESFire command set. The DESFire protocol implemented here is this reverse engineered version.

See the list of supported commands.

LibraryReader

This module enables reading data from physical and emulated DESFire-based library ID cards.

Its programmed use-case is to

  1. connect with a DESFire card (physical or with a specific Android application)
  2. select a library DESFire Application
  3. authenticate with AES key
  4. read data from a DESFire File

Configuration

The "Android" AID used by both HCE and Reader Android applications can be configured in the strings.xml file of the nfc helper library.

Emulated library ID

The data (Application AID, AES key, Data Files) of the emulated DESFire Application can be configured here.

Library ID reader

The data (Application AID and AES key) of the Reader module can be configured here.

Deployment

To deploy the applications two NFC-capable Android phones are needed. My setup included motorola one (Emulator) and Nexus 4 (Reader). I have tested emulation with some Sony and Huawei phones and it didn't work so well. You can use CTSVerifier to test your phone's NFC capabilities.

I was using Android Studio version 3.6.1.

Issues

Although I don't plan to update the app anytime soon, feel free to open Issues if you need clarification or help with NFC. I'd like to thank this way for many others that provided me with resources. Please consider starring the repo if you like it!

About

MIFARE DESFire NFC Reader and HCE Emulator apps for Android


Languages

Language:Java 100.0%