Search code examples
androidnfcsmartcardapducontactless-smartcard

What are the requirements for support of extended length APDUs and which smartphones support it?


When I first tried to send an APDU command and got the "Above supported length" error, I assumed that is just a limitation of the NFC chip itself - no way around it. However this site suggests that it might be a software problem in the Android OS instead:

many currently available smartphones are only able to transmit 261 Bytes[2] via NFC without major modifications of the operating system.

Does anyone know more about how to get get around this problem and how "major" exactly the modifications are?

Also, do you have a list, which phones support extended length APDU? If not, we should probably start one, as you really don't find much on google.

I know that the Samsung Galaxy Note II supports it, while Samsung Galaxy S3, Nexus 5 and Galaxy Nexus don't.


Solution

  • See this site: https://code.google.com/p/android/issues/detail?id=76598

    What you have to do:

    • Download the Android Sources
    • Change "261" to "2462" in the line in NativeNfcManager.java (as shown on the site linked above)
    • Build Android
    • Flash your modified Android version on the phone

    A tutorial for building Android for Nexus 5 can be found here: http://nosemaj.org/howto-build-android-kitkat-nexus-5

    This works for the reader mode of your smartphone, I do not know yet how to get it to work for the card emulation mode.