Search code examples
javasmartcardapdu

Read smart card files


i am trying to read a smart card files , after a long search i can now send APDU command to select MF (Master File) but i need to access to EF (Elementary File) , here is the command i'm sending :

ResponseAPDU r = channel.transmit(new CommandAPDU(new byte[] { 0X00,(byte) 0XA4, 0X00, 0X00, 0X02, 0X3F, 0X00 }));

and here is the response :

6F 1C 82 01 38 83 02 3F 00 85 02 03 7F 86 0C 7F 7F 7F 7F 41 60 60 7F 7F 7F 60 00 8A 01 05 90 00

i know that i got a positif response 90 00 , so what next should i do in order to access to EF.


Solution

  • You now need to pick a file and select it with the same command. If you Google ISO7816-4 you Will find a few sites describing the read binary and read record commands. Depending on the file type you selected. There is not standard ISO command for listing DFs andd EFs, though. Try EFICCID (2FE2 IIRC) for a start, it is present in most cards.