eSIM profile disabling issues on Galaxy S20 since Android 13

Hello,

We are developing an application that downloads and manage eSIM profiles. Since Android 13, we have an issue on Samsung S20 when compiling the app to API level 33.

From Android 13, the switchToSubscription method has a portIndex parameter.
[EuiccManager  |  Android Developers]

Getting the port index and verifying that we have the entitlement to manage the eSIM works fine.
The profile was downloaded using the same app, so it has carrier privileges.

It works from the system obviously, but we are doing it from an application.

The error we are getting:

FATAL EXCEPTION: main
[...], PID: 22231
java.lang.SecurityException: Must have carrier privileges to use switchToSubscription with portIndex
at android.telephony.evicc.EviccManager.switchToSubscription(EuiccManager.java:1297)

As said, the SubscriptionManager.canManageSubscription(subscriptionInfo) answers true.

Would anyone knows a way to make this work?

Thanks,
Johann

Hey @Johann,

Have you tested your app on any other non-Samsung phone, Android 13? If so, then please share your experience with us.

Hello @yasin.hosain,

Yes, this is also reproduced on Google Pixel 7.

Hey @Johann,

Seems it’s an Android issue.
We suggest you report this issue to the Google Issue tracker.

Hi,

This was reported to Android: Google Issue Tracker
Still, if anyone here has a way to handle this situation, feel free to share.

Thanks