apdu 移动sim_将Open Mobile API库添加到Android设备以获取基于APDU的SIM卡访问权限

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?

解决方案

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

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.

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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值