Reputation: 101
I want to communicate from my Android app to a Java Card applet loaded on a SIM card using APDUs under Android prior to 5.0 (4.2.2, for example). My applet is not a SIM Toolkit applet, it is a common Java Card applet.
Following this post (thanks to @vojta and @jean) and SEEK I would like to build my app using RIL (Radio Interface Layer). Where can I get those libs? The only ones I can get is for Nexus - here.
If I understand it well I will have a different .apk file for each mobile manufacturer. Am I right? If yes, is there any other way to communicate from Android to SIM applet apart from SEEK?
If I cannot avoid that (I really think SEEK is the best or the only way to communicate with my SIM applet), can someone share a step-by-step manual for building such an example APK application (including communication with the applet)?
Upvotes: 3
Views: 4086
Reputation: 40851
You cannot simply add that functionality (RIL extensions to access a UICC/SIM-based secure element) to an app. Instead, the mobile phone has to support this functionality. You typically cannot replace the radio interface library/telephony framework on the fly (you could probably do such kind of patching on rooted devices, but still that's not something you would typically integrate in your app).
However, many current Android devices come with a ready-made SEEK implementation that could be used to access the UICC/SIM card (many devices by Samsung (e.g. GS3 and later), Sony, HTC, and Motorola). When it comes to Nexus devices, the Nexus 6 is the first that supports SEEK.
On devices that support SEEK (i.e. that come with the SEEK smartcard service preinstalled), you can use SEEK by linking your application to the SEEK SDK-addon or by integrating the Open Mobile API directly (either as a library project or by adding the source files) into your application (you can find the latest version here).
You can find a sample application for access to smartcard applications through SEEK here: https://github.com/seek-for-android/open-mobile-api-sample
Upvotes: 4