将Open Mobile API库添加到Android设备,以获取基于APDU的SIM卡访问权限 [英] Adding the Open Mobile API library to an Android device to get APDU-based access to the SIM

查看:791
本文介绍了将Open Mobile API库添加到Android设备,以获取基于APDU的SIM卡访问权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个没有NFC的设备.该设备也不支持Open Mobile API.我需要访问该设备上的SIM Applet.

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.

现在,我想知道是否可以添加该功能...如果我拥有Open Mobile API库的副本,那么如果通过ADB将Open Mobile API库推送到我的设备上,它是否可以工作?然后可以与我的SIM小程序交换APDU吗?

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?

推荐答案

不,这不起作用. Open Mobile API 只是Open Mobile API服务("SmartcardService")的接口.因此,该库仅帮助您的应用通过标准化接口(= Open Mobile API )与服务进行通信.如果您尝试在没有SmartcardService的设备上使用该库,则该库将无法绑定到该服务,因此,API调用将失败.

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.

  1. 从Android 5(API级别21)开始, TelephonyManager 提供一个API,以与SIM/UICC上的应用程序交换APDU命令.请参见 iccOpenLogicalChannel iccTransmitApduBasicChannel 打开移动API:在Android设备上访问UICC .
  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.

这篇关于将Open Mobile API库添加到Android设备,以获取基于APDU的SIM卡访问权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆