Adding the Open Mobile API library to an Android d

2019-09-10 11:39发布

I have a device without NFC. This device also does not support the Open Mobile API. I need access to the SIM applet on that device.

Now I wonder if I could add that functionality...If I have a copy of the Open Mobile API library, would it work if pushed that Open Mobile API library to my device through ADB? Could I then exchange APDUs with my SIM applet?

1条回答
Rolldiameter
2楼-- · 2019-09-10 11:59

No, that won't work. The Open Mobile API library is only an interface to the Open Mobile API service ("SmartcardService"). Thus, the library only helps your app to communicate with the service through a standardized interface (= the Open Mobile API). If you try to use the library on a device without the SmartcardService, the library won't be able to bind to that service and, consequently, the API calls will fail.

What you can do

  1. Starting with Android 5 (API level 21), the TelephonyManager provides an API to exchange APDU commands with applications on the SIM/UICC. See iccOpenLogicalChannel, iccTransmitApduBasicChannel, iccTransmitApduLogicalChannel, etc. Just as with the Open Mobile API, your app would, of course, need to have the permission to access that API.
  2. If there is an implementation of the SmartcardService for your device that also implements access to the SIM/UICC through the RIL, you could install that service together with the Open Mobile API library to get access to the SIM/UICC. See my report Open Mobile API: Accessing the UICC on Android Devices.
查看更多
登录 后发表回答