我正在阅读此链接上有关签署具有运营商特权的应用程序的信息。
我知道如何使用密钥库对应用程序进行签名以用于生产版本,但如何将 UICC 证书添加到我的应用程序以使其获得运营商权限?
我的主要目标是能够调用TelephonyManager函数,例如:
iccOpenLogicalChannel
iccCloseLogicalChannel
iccTransmitApduLogicalChannel
iccTransmitApduBasicChannel
这是我在调用上述函数之一时得到的堆栈跟踪:
E/AndroidRuntime: FATAL EXCEPTION: main
E/AndroidRuntime: Process: com.xxxx, PID: 2668
E/AndroidRuntime: java.lang.SecurityException: No modify permission or carrier privilege.
E/AndroidRuntime: at android.os.Parcel.readException(Parcel.java:1599)
E/AndroidRuntime: at android.os.Parcel.readException(Parcel.java:1552)
E/AndroidRuntime: at com.android.internal.telephony.ITelephony$Stub$Proxy.iccOpenLogicalChannel(ITelephony.java:2966)
E/AndroidRuntime: at android.telephony.TelephonyManager.iccOpenLogicalChannel(TelephonyManager.java:2914)
E/AndroidRuntime: at android.view.View.performClick(View.java:5198)
E/AndroidRuntime: at android.view.View$PerformClick.run(View.java:21147)
E/AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:739)
E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:95)
E/AndroidRuntime: at android.os.Looper.loop(Looper.java:148)
E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5417)
E/AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
提前致谢!