24.08.2019

Mifare Card Emulation On Android

Mifare Card Emulation On Android Average ratng: 4,2/5 5424 reviews

Track tasks and feature requests

Questions: I have researched Mifare and other card emulation I have very good knowledge in programming (not Android, but C/C). I have proxmark and I have made multiple emulation codes for proxmark, so I know how the cards communicate. I don’t understand currently, does android enable full card emulation. I have researched this for about. Tunneling HTTP over NFC on Android using Host Card Emulation. Alex Suzuki Blocked Unblock Follow. An Android app that uses NFC with Host Card Emulation to perform bidirectional communication with an NFC reader application. In our case, the following output appears when holding the sample MIFARE tag included by Adafruit to the reader. Android 4.4 introduced host-based card emulation (HCE) but only down to the ISO14443-4 layer: Specifically, Android 4.4 supports emulating cards that are based on the NFC-Forum ISO-DEP specification (based on ISO/IEC 14443-4) and process Application Protocol Data Units (APDUs) as defined in the ISO/IEC 7816-4 specification.

Join 36 million developers who use GitHub issues to help identify, assign, and keep track of the features and bug fixes your projects need.

Sign up for free See pricing for teams and enterprises New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comments

commented Dec 13, 2017

There is NFC Card Emulator app, which is able to emulate NFC cards on Android. For Mifare cards it emulates card id. Is it possible to add the same feature to your app?
Can android phone emulate card data in addition to card id?

commented Dec 14, 2017

Mifare card specification

Hi @and7ey, I've noticed this app too. However, I don't think I will add a feature like this. In order to emulate the UID ugly hacks are needed which work only on some Android devices and require root privileges. I think the app using this technique mentioned on stackoverflow. However, on my Nexus 7 (2012) for example, the app does not work.

As far as I know, emulating more than the UID (the rest of the MIFARE Classic data) is even more complex. In theory it should be possible for most devices, but a custom build of the libnfc will be needed.

closed this Dec 27, 2017

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Based on this article, i'm trying to emulate mifare card managing APDU on android.According to the APDU receive, my application should answer the right APDU, thus simulating the mifare behaviour.

with rfidiot.py, reading a mifare card give me :

With my app simulating the card i got a wrong comportment:

An error appear on FF B0 00 01 01 APDU command. And i don't know where the 6981 APDU command comes from.

Does someone can help me on this 'bug' ? Freneau the rising glory of america.

Michael Roland
31.8k8 gold badges56 silver badges123 bronze badges
LiteLite

1 Answer

It is not possible what you are trying to do.. What @NikolayElenkov has done is emulate a ISO 7816-4 compliant card. MIFARE Classic is not ISO 7816-4 compliant (it does not use APDU commands and responses for communication). In fact, it is not even ISO 14443-4 compliant: it uses proprietary encryption on top of ISO 14443-3.

The fact that the communication looks like APDUs from the reader side, is because your reader strips off all encryption before it passes the data on and wraps that data inside 'virtual' APDUs. In that way, MIFARE cards can be used with software that can only deal with ISO 7816-4 compliant cards.

Mifare Classic Tool Windows

NFC guyNFC guy
9,6972 gold badges21 silver badges55 bronze badges

Mfcuk Android

Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.

Mifare Card Type

Not the answer you're looking for? Browse other questions tagged androidnfcmifareapduhce or ask your own question.