SIMLOCK feature

SIMLOCK特性解析
本文介绍了SIMLOCK特性的实现原理及不同平台之间的差异。探讨了Qualcomm解决方案中的具体应用,并解释了ICCcardProxy如何处理PersoLock状态变化。此外,还说明了APP在SIMLOCK特性中的作用。

1. SIMLOCK feature 由modem实现,在modem中提前设置好运营商制定的


2.  各个平台实现有差异:

    8916  platform not support slot-1 and slot-2 have the difference simlock, This is old simlock. 

    8994/8909 platform support slot-1 and slot-2 have the difference simlock, This is new simlock.


3. Qualcomm Solution: 
    00023762: What is the purpose of feature FEATURE_MMGSDI_PERSONALIZATION_SLOT2_LOCKED_ON_SLOT1 ? 


4.  tech doc:

     80-N5899-1_PERSONALIZATION FEATURE DESIGN OVERVIEW

    80-NM328-7_SIM LOCK ENGINE BASED ON HCK OVERVIEW


5.  ICCcardProxy  提供APP进行事件注册,当PersoLock状态变化由modem主动上传后,确定是否通知上层APP


6. APP仅仅提供网络锁的通知和密码输入。


7. APP调用接口传入密码,解锁由modem自完成

public static int getGuardinfoAvailabilitystatus(Context context, boolean forceRead) { if (forceRead) { GUARDINFO_AVAILABILITYSTATUS = -1; } if (GUARDINFO_AVAILABILITYSTATUS == -1) { synchronized (GUARDINFO) { if (GUARDINFO_AVAILABILITYSTATUS == -1) { try { GUARDINFO_AVAILABILITYSTATUS = BasePreferenceController.UNSUPPORTED_ON_DEVICE; //ifdef ODM_HQ_EDIT //lichen@ODM_HQ.NW,7021120,2024/03/15 unisoc platform call OplusTelephonyManager's method Bundle bundle; if (FeatureUtils.isFeatureSprdMNC()) { Class<?> cls = null; PathClassLoader classLoader = new PathClassLoader(UNISOCLIBPATH, context.getClassLoader()); cls = Class.forName(FULLCLSNNAME, true, classLoader); Method methodGetInstance = cls.getMethod("getInstance", Context.class); Method methodRequestForTelephonyEvent = cls.getMethod("requestForTelephonyEvent", int.class, int.class, android.os.Bundle.class); Object obj = methodGetInstance.invoke(null, context); bundle = (Bundle) methodRequestForTelephonyEvent.invoke(obj, 0, EVENT_SIM_GET_SIMLOCK_FEATURE, null); } else { bundle = OplusTelephonyManager.getInstance(context).requestForTelephonyEvent(0, OplusTelephonyManager.EVENT_SIM_GET_SIMLOCK_FEATURE, null); } //endif ODM_HQ_EDIT Log.i(TAG, "bundle = " + bundle); if (bundle != null) { String str = bundle.getString(OplusTelephonyManager.RESULT_KEY); String result = SettingsUtils.hexString2BinaryString(str); if (TextUtils.isEmpty(result) || (result.length() <= DIGIT_6)) { Log.i(TAG, "result is null " + result); GUARDINFO_AVAILABILITYSTATUS = BasePreferenceController.UNSUPPORTED_ON_DEVICE; } String value = result.substring(DIGIT_6, DIGIT_6 + 1); Log.i(TAG, "value = " + value + ", str = " + str + ", result = " + result); GUARDINFO_AVAILABILITYSTATUS = FEATURE_AVAILABLE.equals(value) ? BasePreferenceController.AVAILABLE : BasePreferenceController.UNSUPPORTED_ON_DEVICE; } } catch (Exception e) { e.printStackTrace(); Log.e(TAG, "Exception is " + e); Log.e(TAG, "isAvailable error getCause:"+ e.getCause() + ",getMessage:" + e.getMessage()); GUARDINFO_AVAILABILITYSTATUS = BasePreferenceController.UNSUPPORTED_ON_DEVICE; } } } } return GUARDINFO_AVAILABILITYSTATUS; }报错System.err: at com.android.settings.Utils.getGuardinfoAvailabilitystatus(Utils.java:1603)
07-09
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值