An NFC development house in Argentina has discovered hidden code in Android 2.3 Gingerbread that enables the Google Nexus S to write to NFC tags as well as read them.
Gibraltar Software Factory, a specialist mobile solutions developer based in Argentina, has combed through Android 2.3′s source code and identified a number of API calls — currently hidden — that deal with the operating system’s tag writing functionality.
The company then put together demonstration software that showcases the phone’s tag writing capability — as can be seen in this video:
As shipped, Android 2.3 Gingerbread only allows tag reading. This means that the Nexus S, the first Gingerbread handset, can only so far retrieve information from pre-programmed near field communication tags. Google has promised that write functionality is on the way soon with some upcoming extensions to the SDK. It would appear to be these that Gibraltar has unearthed.
“We’ve been analyzing the Android kernel source code and we found a lot of ‘@hide’ tags in the NFC java classes,” says the firm’s Gustavo Gonzalez in a blog post detailing the discovery. “The @hide tag is used to mark public APIs that are not to be exported in the SDK. This is used by the Android team to have APIs accessible across packages without having them available to applications. APIs marked with @hide are considered private to the Android platform and can change at any time, so you cannot rely on them.”
Gonzalez then goes on to assert that “we can confirm that there is some extended NFC functionality hidden in Android 2.3 that can be accessed” before walking developers step-by-step through example tag-writing code.
The method, Gonzalez points out, “will work as long as you use a tag pre-formatted with any NFC Forum type tag with default public keys.”
• Thanks to Paco Lazca.