Search code examples
androidnfcrfidmifarecommon-access-card

Reading MIFARE access cards data using android NFC


So here is the problem. I'm trying to read the data stored on my work access card using android NFC. I have been able to successfully read the data into data type ByteArray, but when I try to convert this value into a string using Sting(byteArray, UTF-8) i get jargons like this 5�〕CG!�昕�>�.

I have tried several encoding charsets but all to no avail. So my guess is the data stored on these access cards are not string value, but if not, what kind of data can be stored there and how specifically can I get to read it successfully. All I need I believe should be stored is just my name or staff ID


Solution

  • Generally because of the security requirements of access cards any data on the card is encrypted with a key that usually includes the card's UID.

    So you would need the UID which you can get from the card.

    And knowledge of the encryption algorithm and the encryption key, which you are unlikely to be able to obtain.

    Thus I don't think you will be able to decipher what is stored on the card.