Documentation for com.android.nfc_extras?

Obviously, if you have a built-in phone, you can use com.android.nfc_extras to access features such as card emulation ( Secure Access Control on ICS 4.0.4 ).

I know that this is an unofficial API, but is there any documentation for it (official or unofficial)? Or, on the other hand, card emulation is much more complicated than I understood?

+4
source share
2 answers

Keep in mind that accessing a protected item and creating a card emulation are actually two different things. The security element is substantially closed; you cannot change it. Using com.android.nfc_extras , you can enable map emulation through a secure element. What is it.

You can send the APDU to the protected element from your application, for example, by contacting the IsoDep tag (the same code path is used at the bottom of the NFC stack). See for example http://nelenkov.blogspot.nl/2012/08/accessing-embedded-secure-element-in.html for a good explanation of how to do this.

+4
source

No documentation. If you want to delve into this API, I suggest you look directly at the source code. It is not so much, only two files which implement and define API. Here you can get a copy:

http://source-android.frandroid.com/frameworks/base/nfc-extras/java/com/android/nfc_extras/

In the API you will find concepts such as ExecutionEnvironment, Routes, etc. Do not let these concepts confuse you. Ultimately, all you can do with the NfcExtras interface is:

  • Enable map emulation by setting the route created using ROUTE_ON_WHEN_SCREEN_ON.

  • Disable map emulation by setting the route to "off".

  • Data exchange with a built-in secure element.

What is it! Everything else is just a sugar API to make things bigger than they really are.

Some additional reservations:

  • If you want to call functions in which your application should be white in the nfcee_access.xml file, it is located in / etc. If you do not complete the whitelist, you will receive an access violation exception.

  • It is not possible to distinguish between a built-in secure element or UICC that supports NFC present in the phone.

  • There is no way to talk to a NIC-compatible UICC on the phone. You can only talk with the built-in secure element (as well as the SmartMX chip for phones with the NXP chipset). Communication with the UICC itself is only possible through the RID interface through the ISO7816 interface, and this is - if at all possible - patented.

  • Last but not least, there is no guarantee that the NfcExtras interface does nothing at all. The interface is used by Google Wallet, but the mobile payment market is segmented, and everyone is preparing their own soup. I know of at least one major mobile payment provider that completely ignores the NfcExtras interface, disables it, and uses its own hidden mechanism to turn it on and off.

+2
source

All Articles