4

Are there javax.smartcardio analogues on Android? but not using Open Mobile API.

Thanks!

Taras
  • 2,526
  • 3
  • 33
  • 63
  • 1
    I was porting it, but my development has stalled :( – Maarten Bodewes Feb 26 '13 at 23:13
  • @owlstead did you faced some significant problems?? – Taras Feb 27 '13 at 08:49
  • Not really, at that time the lack of hardware that contains an nfc chip was hardest, so i could not really test anything. – Maarten Bodewes Feb 27 '13 at 09:20
  • @owlstead so you mean that it's possible somehow to connect to a smart card using Android NFC API? – Taras Feb 27 '13 at 10:11
  • I found some info http://nelenkov.blogspot.com/2012/08/accessing-embedded-secure-element-in.html – Taras Feb 27 '13 at 10:35
  • 1
    Do you want to do smart card I/O with: (1) the SIM card; (2) a contactless card over NFC; (3) a smart card in a PC/SC (or proprietary) USB attached reader? If the latter, have a look at this [project](http://www.scdroid.com/software). – martijno Feb 27 '13 at 10:49
  • 2
    @martijno I want to do smart card I/O with microSD smart card inserted into Android device. – Taras Feb 27 '13 at 10:51

2 Answers2

6

I'm using javax.smartcardio.* as a facade to IsoDep on Android in a project called SCUBA. Note that this is for trancieving APDUs to ISO14443 cards in the field of the NFC chip (in NFC capable Android phones), and not for communicating with SIM or SE.

(Main motivation was to be able to use the same JMRTD ePassport reading API jar both on J2SE and Android without changes.)

EDIT: If you're interested in communicating with a card in an external reader, have a look at this SCDroid project. Also ACS appears to have Android support for their ACR122U reader.

martijno
  • 1,723
  • 1
  • 23
  • 53
  • Oh, hi martijn, could have quessed that you had similar needs ;) – Maarten Bodewes Feb 27 '13 at 11:41
  • @martijno hello! I am working at same task: using Scuba with nfc.IsoDep and JMRTD. Now I need to implement Scuba and JMRTD with some lib for SmartCard reader embedded in my Android tablet. So if you still remember can you explain how did you implemented "javax.smartcardio.* as a facade to IsoDep". Thank you in advance. – Romowski Feb 05 '18 at 03:47
  • @Romowsky Add a dependency for `compile 'net.sf.scuba:scuba-sc-android:0.0.16'` (currently, but do check Maven central) to your `build.gradle`. – martijno Feb 09 '18 at 20:53
2

You can check out the com.android.nfc_extras packages in the AOSP tree. This will allow you to send APDU's to a secure element. It will also allow you to enable card emulation. This will only work on a rooted phone or an AOSP build. You wont be able to install anything on the secure element as you won't have access to the keys (unless you have a engineering sample with a different secure element). NFC extras is a private API so you may not be able to use it on a non-rooted phone.

Shane
  • 1,255
  • 14
  • 14
  • 1
    Thanks for info, unfortunately I design an app for non-rooted devices. By the way, does NFC API give an ability to communicate with a smart card inserted in micro SD slot? – Taras Mar 27 '13 at 19:57