Card emulation changes in Android 2.3.4

Posted on May 19, 2011 - By

Android 2.3.4 Gingerbread is the latest officially released platform that was rolled out a couple of weeks ago to the Google Nexus S and Nexus One. The biggest feature upgrade is that video chat is now available on Google Talk for all those whose devices with a front-facing camera. This new update is a maintenance release that adds several bug fixes and patches to the Android 2.3 platform and it does not increment the API level, it uses the same API level 10 as 2.3.3

Since the source code for 2.3.4 has already been pushed to the Android Open Source Project (AOSP), we’ve been analyzing it and we found the some changes in the NFC Java Classes, mainly in card emulation features:

New NFC-EE (Nfc Execution Environment) API’s as shared library

There are two new classes, NfcAdapterExtras and NfcExecutionEnvironment, implemented as a shared library in frameworks/base/nfc-extras. The NfcAdapterExtras class provides additional methods on an NfcAdapter for Card Emulation and management of the Nfc Execution Environment (EE). But the access to this functionality is limited because it depends on the NfcAdapter.getNfcAdapterExtrasInterface() method that was hidden with the “@hide” tag.

NFCExtras class

New ApduList class in the android.nfc package to create an array of APDU commands and send them to the SE. This class is also hidden with the “@hide” tag.

No more NfcSecureElement class. This class was used in 2.3.3 version as the primary API for managing all aspects of the Secure Element (SE) like open/close the SE, get the SE unique identifier, and so on, but was deleted from this version, probably as result of this new “NFC-EE” paradigm. From now on,  you need to define a “route” (such as a UICC via SWP or the embedded secure chip) to the SE instead of open it directly.

So, what Google NFC software engineers said this past week at the company’s I/O developer conference about card emulation is true: there are no public APIs to card emulation. But definitely they are working on card emulation functionality and  it’s already part of the new Android 2.3.4

Tagged , , , , .

8 Comments

  • Dominik says:

    I wanted to load the NfcAdapterExtras class with
    mAdapter = NfcAdapter.getDefaultAdapter(this);
    Class c = Class.forName(“com.android.nfc_extras.NfcAdapterExtras”);
    Method get = c.getMethod(“get”, NfcAdapter.class);
    Object nfcAdapterExtras = get.invoke(null, mAdapter);
    but I get a ClassNotFoundException (on Android 2.3.4).

    How can I access this class?
    Dominik

  • Try using the reflection techniques as in this post http://gibraltarsf.com/blog/?p=13

  • Dominik says:

    Thanks for your comment. The problem is that the invocation of

    Class.forName(“com.android.nfc_extras.NfcAdapterExtras”);

    throws a ClassNotFoundException, executed on an Android 2.3.4.
    Dominik

  • Fernando says:

    Examining the sources it seems that only embedded SE is available. There is no way to use an alternative route to an external EE (i.e. inside an UICC)

  • Sumit says:

    Can you please show some sample code of this reflection technique by which we can use the hidden methods…
    thanks in advance

Trackbacks and Pingbacks

  • […] by Argentina-based NFC specialists Gibraltar Software Factory this week, however, shows that card emulation capabilities were added, but hidden, in the latest Android 2.3.4 release. LEARN MORE — Topics: Android, Bloomberg, Coupons, Eric Schmidt, Google I/O, Harvard Business […]

  • […] But at the Google I/O conference earlier this month software engineers working on Android’s NFC capabilities raised concerns over the viability of NFC card emulation mode for mobile payments. New research published by Argentina-based NFC specialists Gibraltar Software Factory this week, however, shows that card emulation capabilities were added, but hidden, in the latest Android 2.3.4 release. […]

  • […] But at the Google I/O conference earlier this month software engineers working on Android’s NFC capabilities raised concerns over the viability of NFC card emulation mode for mobile payments. New research published by Argentina-based NFC specialists Gibraltar Software Factory this week, however, shows that card emulation capabilities were added, but hidden, in the latest Android 2.3.4 release. […]