安卓eSim激活流程

5
我尝试按照https://source.android.com/devices/tech/connect/esim-overview#lpa-flow的说明,从我的应用程序中启动LPA激活流程。
我的应用程序可以托管多个运营商(每个运营商都有专用的eSim)。
我是否必须为每个运营商签署我的应用程序,或者可以通过发送“ACTION_START_EUICC_ACTIVATION”意图来启动激活流程?在这种情况下,如何通过“ICarrierEuiccProvisioningService.Stub”发送激活代码?
在我的测试中,我尝试创建一个带有action =“android.telephony.euicc.action.START_EUICC_ACTIVATION”和extra =“android.telephony.euicc.extra.USE_QR_SCANNER”的意图,将其设置为布尔值(测试了真和假但是行为相同)。响应始终为“RESULT_CANCELED”。
启动激活流程的代码:
val startLPAIntent = Intent().apply {
            action = EuiccManager.ACTION_START_EUICC_ACTIVATION
            putExtra(EuiccManager.EXTRA_USE_QR_SCANNER, false)
        }
        startLPALauncher.launch(startLPAIntent)

我已经实现了请求AIDL接口

附上logcat输出:

2022-07-26 18:01:04.817 30500-30500/it.fbl.momovoice D/ESimViewModel: ** clicked on MomoESim(name=ESIM_NAME, profileName=ESIM_PROFILE_NAME, iccId=ESIM_ICCID, matchingId=ESIM_MATCHING_ID, activationCode=ESIM_ACTIVATION_CODE)
2022-07-26 18:01:04.818 30500-30500/it.fbl.momovoice D/MainActivity: ** INTENT -> android.telephony.euicc.action.START_EUICC_ACTIVATION, null, Bundle[{android.telephony.euicc.extra.USE_QR_SCANNER=false}]
2022-07-26 18:01:04.820 1800-8483/? I/ActivityTaskManager: START u0 {act=android.telephony.euicc.action.START_EUICC_ACTIVATION cmp=com.android.phone/.euicc.EuiccPublicActionUiDispatcherActivity (has extras)} from uid 10362
2022-07-26 18:01:04.839 1800-8337/? W/ActivityTaskManager: Tried to set launchTime (0) < mLastActivityLaunchTime (509354090)
2022-07-26 18:01:04.847 1800-8337/? I/DefaultPermGrantPolicy: Revoke permissions from LUI apps for user:0
2022-07-26 18:01:04.848 1800-8337/? I/DefaultPermGrantPolicy: Granting permissions to active LUI app for user:0
2022-07-26 18:01:04.849 1800-8337/? W/DefaultPermGrantPolicy: Permission not found: com.android.permission.WRITE_EMBEDDED_SUBSCRIPTIONS
2022-07-26 18:01:04.853 1800-8337/? I/ActivityTaskManager: START u0 {act=android.service.euicc.action.START_EUICC_ACTIVATION flg=0x2000000 cmp=com.google.android.euicc/com.android.euicc.ui.suw.CarrierAppInitActivity (has extras)} from uid 1001
2022-07-26 18:01:04.870 1800-8483/? W/ActivityTaskManager: Tried to set launchTime (0) < mLastActivityLaunchTime (509354116)
2022-07-26 18:01:04.876 3244-3244/? W/ProxyAndroidLoggerBackend: Too many Flogger logs received before configuration. Dropping old logs.
2022-07-26 18:01:04.878 3244-3244/? I/EuiccGoogle: [2] CurrentCarrierAppInitActivity.getCallingCarrierInfo: Calling package = it.fbl.momovoice
2022-07-26 18:01:04.878 3244-3244/? I/EuiccGoogle: [2] CarrierInfoStore.initCarrierInfoStore: initCarrierInfoStore
2022-07-26 18:01:04.879 3244-3244/? I/EuiccGoogle: [2] CarrierInfoStore.initCountryCarrierList: initCarrierCountryCarrierList
2022-07-26 18:01:04.879 3244-3244/? I/EuiccGoogle: [2] CarrierInfoStore.initCountryCarrierList: ca contains carriers: carrier_bell,carrier_fido,carrier_freedom,carrier_koodo,carrier_lucky_mobile,carrier_rogers,carrier_telus,carrier_virgin_mobile,carrier_videotron
2022-07-26 18:01:04.879 3244-3244/? I/EuiccGoogle: [2] CarrierInfoStore.initCountryCarrierList: Found carrier config for: carrier_bell
2022-07-26 18:01:04.879 3244-3244/? I/EuiccGoogle: [2] CarrierInfoStore.initCountryCarrierList: Found carrier config for: carrier_fido
2022-07-26 18:01:04.879 3244-3244/? I/EuiccGoogle: [2] CarrierInfoStore.initCountryCarrierList: Found carrier config for: carrier_freedom
2022-07-26 18:01:04.879 3244-3244/? I/EuiccGoogle: [2] CarrierInfoStore.initCountryCarrierList: Found carrier config for: carrier_koodo
2022-07-26 18:01:04.880 3244-3244/? I/EuiccGoogle: [2] CarrierInfoStore.initCountryCarrierList: Found carrier config for: carrier_lucky_mobile
2022-07-26 18:01:04.880 3244-3244/? I/EuiccGoogle: [2] CarrierInfoStore.initCountryCarrierList: Found carrier config for: carrier_rogers
2022-07-26 18:01:04.880 3244-3244/? I/EuiccGoogle: [2] CarrierInfoStore.initCountryCarrierList: Found carrier config for: carrier_telus
2022-07-26 18:01:04.880 3244-3244/? I/EuiccGoogle: [2] CarrierInfoStore.initCountryCarrierList: Found carrier config for: carrier_virgin_mobile
2022-07-26 18:01:04.880 3244-3244/? I/EuiccGoogle: [2] CarrierInfoStore.initCountryCarrierList: Found carrier config for: carrier_videotron
2022-07-26 18:01:04.880 3244-3244/? I/EuiccGoogle: [2] CarrierInfoStore.initCountryCarrierList: us contains carriers: carrier_att,carrier_google_fi,carrier_sprint,carrier_tmobile,carrier_verizon
2022-07-26 18:01:04.880 3244-3244/? I/EuiccGoogle: [2] CarrierInfoStore.initCountryCarrierList: Found carrier config for: carrier_att
2022-07-26 18:01:04.880 3244-3244/? I/EuiccGoogle: [2] CarrierInfoStore.initCountryCarrierList: Found carrier config for: carrier_google_fi
2022-07-26 18:01:04.880 3244-3244/? I/EuiccGoogle: [2] CarrierInfoStore.initCountryCarrierList: Found carrier config for: carrier_sprint
2022-07-26 18:01:04.880 3244-3244/? I/EuiccGoogle: [2] CarrierInfoStore.initCountryCarrierList: Found carrier config for: carrier_tmobile
2022-07-26 18:01:04.880 3244-3244/? I/EuiccGoogle: [2] CarrierInfoStore.initCountryCarrierList: Found carrier config for: carrier_verizon
2022-07-26 18:01:04.880 3244-3244/? I/EuiccGoogle: [2] CurrentCarrierAppInitActivity.getCallingCarrierInfo: No matching carrier info in config
2022-07-26 18:01:04.881 3244-3244/? W/EuiccGoogle: [2] CurrentCarrierAppInitActivity.onCreate: Package it.fbl.momovoice does not match carrier config.
2022-07-26 18:01:04.883 13438-13513/? I/AssistantForeground: (REDACTED) Get launcher package: %s
2022-07-26 18:01:04.902 30500-30500/it.fbl.momovoice D/MainActivity: ** DOWNLOAD SUBSCRIPTION RESPONSE -> ActivityResult{resultCode=RESULT_CANCELED, data=null}, null, 0

2
请问您是否解决了自己的问题,更重要的是,您是否已经能够安装来自不同运营商的eSIM? - Marco Maisto
1个回答

0

您的应用程序已添加到支持的运营商列表中吗? 只有在白名单中的应用程序才能调用此功能并成功完成完整的eSIM流程。 通常OEM会将包名、SHA1和SHA256密钥添加到支持的运营商配置JSON文件中。

调用的包名为it.fbl.momovoice,看不到该应用程序在运营商白名单应用中。

请联系OEM并要求他们将配置添加到支持的运营商列表中。

对于未预装的应用程序,此功能将无法工作,因为Google eSIM APK甚至不会尝试连接SM-DP+下载eSIM配置文件。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接