A lightweight Android app to read basic, non-sensitive EMV data from NFC-enabled credit/debit cards and store masked logs.
- Reads basic card data using Android's
NfcAdapter. - Parses EMV TLV data to extract:
- Tag 84: Application Identifier (AID)
- Tag 50: Application Label
- Tag 5A: Primary Account Number (PAN)
- Securely masks the PAN in logs (e.g.,
411111******1111). - Logs each successful read as a JSON object to a local file.
- "Share Logs" button to export the log file.
- "Verbose Mode" switch to include raw TLV hex data in the log.
- Prerequisites: Android Studio (latest stable version).
- Clone/Download: Get the source code.
- Open: Open the project folder in Android Studio.
- Build: Gradle will sync. Build the project (Build > Make Project).
- Run: Connect an Android device with NFC capabilities.
- Install: Run the app (Run > Run 'app').
- Ensure NFC is enabled on your Android device (usually in Settings > Connections > NFC).
- Open the app.
- (Optional) Toggle "Verbose Mode" on.
- Tap an NFC-enabled (contactless) EMV card to the center of the back of your phone.
- The app will read the card, and the JSON log for that transaction will appear on the screen.
- This log is appended to
emv_logs.jsonlin the app's private storage. - Click "Share Logs" to export this file using a standard Android share sheet.
This app is for educational and diagnostic purposes.
- PAN Masking: It reads Tag 5A to get the PAN and immediately masks it before logging.
- No Transactional Data: This app cannot read transactional tags like
9F02(Amount) or5F2A(Currency). These tags are not stored on the card; they are set by a POS terminal during a transaction. The log will shownullfor these fields. - No Sensitive Data: This app does not read, interpret, or store Track 2 data, cardholder names, or any cryptographic keys.
- Card Compatibility: The app attempts to select both "1PAY.SYS.DDF01" and "2PAY.SYS.DDF01" application environments. This should cover most Visa, Mastercard, and other common cards, but may not work for every card.
The app doesn't take direct text input. It reads this data from the card via NFC commands.
-
FCI Response (after selecting AID):
6F298407A0000000031010500456495341A51A8801015F2D04656E66729F1101019F120A436172746520566973619000- Key Tags:
84(AID),50(App Label),88(SFI)
- Key Tags:
-
READ RECORD Response (from SFI):
701A5A0841111111111111115F24032512319F080200309000- Key Tag:
5A(PAN)
- Key Tag:
This is the standard log entry.
{
"timestamp": "2025-10-27T10:30:05+0100",
"aid": "A0000000031010",
"appLabel": "VISA",
"pan": "411111******1111",
"amount": null,
"currency": null
}This log includes the raw hex data from the card responses.
{
"timestamp": "2025-10-27T10:30:15+0100",
"aid": "A0000000031010",
"appLabel": "VISA",
"pan": "411111******1111",
"amount": null,
"currency": null,
"verboseLogs": {
"fciResponseHex": "6F298407A00000s00031010500456495341A51A8801015F2D04656E66729F1101019F120A436172746520566973619000",
"recordDataHex": "701A5A0841111111111111115F24032512319F08020030"
}
}