I tried to launch the LPA activation flow from my app following this https://source.android.com/devices/tech/connect/esim-overview#lpa-flow.
My app can host multiple carriers (every carrier with dedicated eSim).
Must i sign my app for every carrier or can i launch activation flow sending "ACTION_START_EUICC_ACTIVATION" intent? In this case how can i send activation code through "ICarrierEuiccProvisioningService.Stub"?
In my tests i tried to create an intent with action="android.telephony.euicc.action.START_EUICC_ACTIVATION" and extra="android.telephony.euicc.extra.USE_QR_SCANNER" set to boolean value (tested with true and false but same behaviour). The response was always "RESULT_CANCELED".
Code to start activation flow
val startLPAIntent = Intent().apply {
action = EuiccManager.ACTION_START_EUICC_ACTIVATION
putExtra(EuiccManager.EXTRA_USE_QR_SCANNER, false)
}
startLPALauncher.launch(startLPAIntent)
I've already implemented the request AIDL interfaces
Attached logcat output:
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
Did your application added into supported carrier list? Only whiteliested apps can invoke this and get the complete esim flow success. Normally OEMs add package name, SHA1 and SHA256 keys in supported carrierconfig JSON file.
Calling package = it.fbl.momovoice Dont see this application in carrier whitelisted app.
Please contact OEM and ask them to add the configuration in the supported carrier list.
For non-preloaded apps this feature will not work, as google esim apk will not even attempt to reach SM-DP+ to download the esim profile.