【笔记】Android U RILJ 中与运营商名称SPN显示相关的日志分析

源码阅读:AOSPXRef

常用日志关键字

Note:">"下发MD,"<"MD上报,[]中的id有请求和返回的对应关系

| KEY | Comment |
| > OPERATOR | 下发MD,请求运营商信息 |
| < OPERATOR | MD上报运营商注册信息 |
| > DATA_REGISTRATION_STATE | 下发MD请求驻网状态信息 |
| < DATA_REGISTRATION_STATE | MD上报驻网状态 |
| Poll ServiceState done | SST 更新网络状态完成 |

updateSpnDisplayCdnr 网络状态变化触发SPN更新

实网Log分析

// radio关闭时不会更新SPN

03-27 14:23:59.808824 2120 2120 D MTKSST : [GsmSST1] updateSpnDisplay: radio is off w/ showPlmn=true plmn=null

03-27 14:23:59.808919 2120 2120 D MTKSST : [GsmSST1] updateSpnDisplay: rawSpn =

// 还没获取到运营商信息。(请求运营商信息的过程很快,耗时短,都不需要半秒的)

03-27 14:23:29.955064 2120 2120 D RILJ : [1938]> OPERATOR [PHONE0]

03-27 14:23:29.967462 2120 2455 D RILJ : [1938]< OPERATOR {, , } [PHONE0]

// 还没驻网成功,搜网或处于飞行模式

03-27 14:23:59.737880 2120 2585 D RILJ : [1984]> DATA_REGISTRATION_STATE [PHONE0]

03-27 14:23:59.747966 2120 2455 D RILJ : [1984]< DATA_REGISTRATION_STATE {.regState = NOT_REG_MT_SEARCHING_OP , .rat = UNKNOWN, .reasonForDenial = NONE, .cellIdentity = {.noinit = {}}, .registeredPlmn = , .accessTechnologySpecificInfo = {.noinit = {}}} [PHONE0]

// 驻网在本地LTE网络,从mccmnc和registeredPlmn可以确认。

++疑问:根据什么确认显示alphaLong还是alphaShort?++

03-27 14:23:59.969940 2120 2585 D RILJ : [1988]> DATA_REGISTRATION_STATE [PHONE0]

03-27 14:24:00.049672 2120 2455 D RILJ : [1988]< DATA_REGISTRATION_STATE {.regState = REG_HOME , .rat = LTE , .reasonForDenial = NONE, .cellIdentity = {.lte = {.base = {.base = {.mcc = 722, .mnc = 07 , .ci = 256, .pci = 0, .tac = 1, .earfcn = 2525}, .operatorNames = {.alphaLong = AR - Movistar, .alphaShort = Movistar }, .bandwidth = 10000}, .additionalPlmns = [], .optionalCsgInfo = {.noinit = {}}, .bands = [5]}}, .registeredPlmn = 72207, .accessTechnologySpecificInfo = {.eutranInfo = {.lteVopsInfo = {.isVopsSupported = true, .isEmcBearerSupported = true}, .nrIndicators = {.isEndcAvailable = false, .isDcNrRestricted = false, .isNrAvailable = false}}}} [PHONE0]

03-27 14:23:59.960990 2120 2120 D RILJ : [1986]> OPERATOR [PHONE0]

// 通知应用程序网络状态发生变化

03-27 14:23:59.986333 2120 2455 D RILJ : Unsol response received; Sending ack to ril.cpp [PHONE0]
03-27 14:23:59.986511 2120 2455 D RILJ : [UNSL]< UNSOL_RESPONSE_NETWORK_STATE_CHANGED[PHONE0]

// 驻网信息,由Modem根据当时注册网络的信息上报的,和Telephony的SST信息一致。

03-27 14:23:59.987577 2120 2455 D RILJ : [1986]< OPERATOR {AR - Movistar, Movistar, 72207} [PHONE0]

// CS在无线局域网,注册在HOME LTE(在CS域中,++语音和短信++ 数据通过++电路交换方式++传输),可用服务:[VOICE, SMS, VIDEO]

03-27 14:24:00.057818 2120 2585 D NRM-C-0 : onRequestNetworkRegistrationInfoComplete result: 0, info: NetworkRegistrationInfo{ domain=CS transportType=WWAN registrationState=HOME networkRegistrationState=HOME roamingType=NOT_ROAMING accessNetworkTechnology=LTE rejectCause=0 emergencyEnabled=false availableServices=[VOICE,SMS,VIDEO] cellIdentity=CellIdentityLte:{ mCi=256 mPci=0 mTac=1 mEarfcn=2525 mBands=[5] mBandwidth=10000 mMcc=722 mMnc=07 mAlphaLong=AR - Movistar mAlphaShort=MovistarmAdditionalPlmns={} mCsgInfo=null} voiceSpecificInfo=VoiceSpecificRegistrationInfo { mCssSupported=false mRoamingIndicator=0 mSystemIsInPrl=0 mDefaultRoamingIndicator=0} dataSpecificInfo=null nrState=**** rRplmn=72207 isUsingCarrierAggregation=false}

// PS状态变化,从搜网到注册完成,驻网在HOME LTE,具备DATA能力,

03-27 14:24:00.074533 2120 2601 D NRM-I-0 : onRequestNetworkRegistrationInfoComplete result: 0, info: NetworkRegistrationInfo{ domain=PS transportType=WLAN registrationState=NOT_REG_OR_SEARCHING networkRegistrationState=NOT_REG_OR_SEARCHING roamingType=NOT_ROAMING accessNetworkTechnology=UNKNOWN rejectCause=0 emergencyEnabled=false availableServices=[] ++cellIdentity=null++ voiceSpecificInfo=null dataSpecificInfo=android.telephony.DataSpecificRegistrationInfo :{ maxDataCalls = 0 isDcNrRestricted = false isNrAvailable = false isEnDcAvailable = false mLteAttachResultType = 0 mLteAttachExtraInfo = 0 LteVopsSupportInfo : mVopsSupport = 1 mEmcBearerSupport = 1 } nrState=**** rRplmn=null isUsingCarrierAggregation=false}

03-27 14:24:00.103294 2120 2585 D NRM-C-0 : onRequestNetworkRegistrationInfoComplete result: 0, info: NetworkRegistrationInfo{ domain=PS transportType=WWAN registrationState=HOME networkRegistrationState=HOME roamingType=NOT_ROAMING accessNetworkTechnology=LTE rejectCause=0 emergencyEnabled=false availableServices=[DATA] ++cellIdentity=CellIdentityLte:{ mCi=256 mPci=0 mTac=1 mEarfcn=2525 mBands=[5] mBandwidth=10000 mMcc=722 mMnc=07 mAlphaLong=AR - Movistar mAlphaShort=Movistar mAdditionalPlmns={} mCsgInfo=null}++ voiceSpecificInfo=null dataSpecificInfo=android.telephony.DataSpecificRegistrationInfo :{ maxDataCalls = 16 isDcNrRestricted = false isNrAvailable = false isEnDcAvailable = false mLteAttachResultType = 0 mLteAttachExtraInfo = 0 LteVopsSupportInfo : mVopsSupport = 2 mEmcBearerSupport = 2 } nrState=**** rRplmn=72207 isUsingCarrierAggregation=false}

// TS.25是MD配,但是来源TS.25的SPN显示优先级很低

03-27 14:24:00.208931 2120 2120 D MtkRILJ : lookupOperatorNameMVNOplmn name update to TS.25/MVNO: AR - Movistar

// ServiceState 更新网络状态完成,切换到LTE,alphatag更新到AR - Movistar

03-27 14:24:00.223138 2120 2120 D MTKSST : [GsmSST0] Poll ServiceState done: newSS={mVoiceRegState=0(IN_SERVICE), mDataRegState=0(IN_SERVICE), mChannelNumber=2525, duplexMode()=1, mCellBandwidths=[10000], mOperatorAlphaLong=AR - Movistar, mOperatorAlphaShort=AR - Movistar, isManualNetworkSelection=false(automatic), getRilVoiceRadioTechnology=14(LTE), getRilDataRadioTechnology=14(LTE), mCssIndicator=unsupported, mNetworkId=-1, mSystemId=-1, mCdmaRoamingIndicator=-1, mCdmaDefaultRoamingIndicator=-1, mIsEmergencyOnly=false, isUsingCarrierAggregation=false, mArfcnRsrpBoost=0, mNetworkRegistrationInfos=[NetworkRegistrationInfo{ domain=PS transportType=WLAN registrationState=NOT_REG_OR_SEARCHING networkRegistrationState=NOT_REG_OR_SEARCHING roamingType=NOT_ROAMING accessNetworkTechnology=UNKNOWN rejectCause=0 emergencyEnabled=false availableServices=[] cellIdentity=null voiceSpecificInfo=null dataSpecificInfo=android.telephony.DataSpecificRegistrationInfo :{ maxDataCalls = 0 isDcNrRestricted = false isNrAvailable = false isEnDcAvailable = false mLteAttachResultType = 0 mLteAttachExtraInfo = 0 LteVopsSupportInfo : mVopsSupport = 1 mEmcBearerSupport = 1 } nrState=**** rRplmn=null isUsingCarrierAggregation=false}, NetworkRegistrationInfo{ domain=CS transportType=WWAN registrationState=HOME networkRegistrationState=HOME roamingType=NOT_ROAMING accessNetworkTechnology=LTE rejectCause=0 emergencyEnabled=false availableServices=[VOICE,SMS,VIDEO] cellIdentity=CellIdentityLte:{ mCi=256 mPci=0 mTac=1 mEarfcn=2525 mBands=[5] mBandwidth=10000 mMcc=722 mMnc=07 mAlphaLong=AR - Movistar mAlphaShort=AR - Movistar mAdditionalPlmns={} mCsgInfo=null} voiceSpecificInfo=VoiceSpecificRegistrationInfo { mCssSupported=false mRoamingIndicator=0 mSystemIsInPrl=0 mDefaultRoamingIndicator=0} dataSpecificInfo=null nrState=**** rRplmn=72207 isUsingCarrierAggregation=false}, NetworkRegistrationInfo{ domain=PS transportType=WWAN registrationState=HOME networkRegistrationState=HOME roamingType=NOT_ROAMING accessNetworkTechnology=LTE rejectCause=0 emergencyEnabled=false availableServices=[DATA] cellIdentity=CellIdentityLte:{ mCi=256 mPci=0 mTac=1 mEarfcn=2525 mBands=[5] mBandwidth=10000 mMcc=722 mMnc=07 mAlphaLong=AR - Movistar mAlphaShort=AR - Movistar mAdditionalPlmns={} mCsgInfo=null} voiceSpecificInfo=null dataSpecificInfo=android.telephony.DataSpecificRegistrationInfo :{ maxDataCalls = 16 isDcNrRestricted = false isNrAvailable = false isEnDcAvailable = false mLteAttachResultType = 0 mLteAttachExtraInfo = 0 LteVopsSupportInfo : mVopsSupport = 2 mEmcBearerSupport = 2 } nrState=**** rRplmn=72207 isUsingCarrierAggregation=false}], mNrFrequencyRange=0, mOperatorAlphaLongRaw=AR - Movistar, mOperatorAlphaShortRaw=Movistar, mIsDataRoamingFromRegistration=false, mIsIwlanPreferred=false}

03-27 14:24:00.224207 2120 2120 D MTKSST : [GsmSST0] RAT switched Unknown -> LTE at cell 256

// 非漫游,根据EF中displayRule显示SPN值,但是实际界面显示了PLMN

03-27 14:24:00.252327 2120 2120 D MTKSST : [GsmSST0] carrierName=, overrideName=

03-27 14:24:00.252465 2120 2120 D ServiceStateTracker: [0] updateSpnDisplayCdnr: curSpn = ; curPlmn = AR - Movistar; curDisplayRule = 2

03-27 14:24:00.258072 2120 2120 I CDNR : getCarrierDisplayNameFromEf withoutRoaming = false

03-27 14:24:00.258204 2120 2120 I CDNR : getCarrierDisplayNameFromEf registeredPlmnNumeric = 72207 ; isRoaming = false; showSpn = true; showPlmn = false; spn =

// 根据EF内容,更新了SPN为AR - Movistar,同PLMN,所以会显示AR - Movistar

03-27 14:24:00.258433 2120 2120 D CDNR : getCarrierDisplayNameFromEf displayRule = { SPN_bit = 2, PLMN_bit = 0 }; spn = AR - Movistar ; plmn = AR - MovistarshowSpn = true; showPlmn = false

03-27 14:24:00.258617 2120 2120 D CDNR : CarrierName from EF: { spn = AR - Movistar, dataSpn = null, showSpn = true, plmn = AR - Movistar, showPlmn = false

03-27 14:24:00.267668 2120 2120 D ServiceStateTracker: [0] updateTctSpnDisplay: updateSpnDisplay: changed sending intent, rule=2 , showPlmn='false', plmn='AR - Movistar', showSpn='true', spn='AR - Movistar', dataSpn='null', subId='2'

03-27 14:24:00.303102 2120 2120 D ServiceStateTracker: [0] setCarrierText simNumeric:72207, operatorNumeric:72207, gid1:FFFFFFFF, carrierText:AR - Movistar

相关说明

1、不同平台的Modem配置TS.25或许会存在差异,比如6835芯片的配置路径在modem_t_6835 / mcu/custom/service/plmn/TS25。

2、TS25文件用于显示运营商名称,较新的平台机制(带MIPC的平台)才移到Modem维护的。没有TS.25时,会在Telephony AP侧配置,spn-conf.xml中。

定制方案

无法修改网络上报的信息,客制化只能在Telphony FW中配置运营商名称期望值。

针对平台定义的运营商名称,修改在spn-conf.xml,具体看mk编译生效文件的路径,可能用:

  • /device/mediatek/system/common/
  • /device/mediatek/common/
XML 复制代码
<spnOverride numeric="72207" spn="Movistar"/>
<spnOverride numeric="722070" spn="Movistar"/>
相关推荐
he_wen_jian42 分钟前
Android 项目引入gradle Connect timed out
android
哎呦没1 小时前
企业OA管理系统:Spring Boot技术实现与案例研究
android·spring boot·后端
李新_2 小时前
一文聊聊Flutter多业务混合工程实践
android·flutter
weixin_SAG5 小时前
7天掌握SQL - 第三天:MySQL实践与索引优化
android·sql·mysql
疯狂的皮卡8 小时前
【安卓脚本】Android工程中文硬编码抽取
android
菜鸟、小高9 小时前
从0开始学PHP面向对象内容之常用设计模式(适配器,桥接,装饰器)
android·设计模式·php
找藉口是失败者的习惯10 小时前
Jetpack Compose 生命周期介绍
android·ui
测试小工匠11 小时前
移动端自动化环境搭建_Android
android·运维·自动化
二流小码农11 小时前
鸿蒙开发:自定义一个任意位置弹出的Dialog
android·ios·harmonyos
ziix13 小时前
android-sdk 安装脚本
android·android-sdk安装脚本