OpenEuiccService: Don't ignore the only removable eUICC #358
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "Macktherealonereally/OpenEUICC:fix-removable-euicc-ignored"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
shouldIgnoreSlot()returns true for slots to ignore. On devices without an internal eUICC, its own comment says it should expose the first removable eUICC to the system:The comparison is inverted, so exactly that slot is ignored. Every
EuiccServicecall on it (onGetEid,onGetDownloadableSubscriptionMetadata,onDownloadSubscription,onSwitchToSubscription…) returnsRESULT_FIRST_USERwithin a few milliseconds.How it showed up: on a Samsung Galaxy S21 (SM-G991B, LineageOS 23.2, OpenEUICC as system LPA), the Samsung RIL reports the built-in eUICC as removable (
isRemovable=true), sohasInternalEuiccis false.EuiccManagerdownloads from carrier apps failed immediately. The log showedOpenEuiccService: onGetDownloadableSubscriptionMetadata slotId=1 portIndex=0 ..., and 11 ms later the call returned an error to EuiccController without a single APDU being sent (the app showed its generic install error). Meanwhile the same eUICC worked fine inside the OpenEUICC UI, which doesn't go throughshouldIgnoreSlot().Fix:
==→!=.Testing: with the fix, the platform download flow reaches the eUICC (metadata → carrier-privilege check → download). On 2026-09-27 a travel-eSIM provider's app installed its profile end to end through
EuiccManageron that phone (the app-side changes are in a separate PR).🤖 Generated with Claude Code
This is may by design, If use Removable eUICC cards, please use unprivileged build (EasyEUICC).
This is a LineageOS bug. You need the device overlay XML to claim that the internal eUICC is, in fact, internal. Report with upstream.
On second thought, that logic is indeed broken in this case. I'll merge this, HOWEVER this is STILL A BUG OF THE LINEAGEOS BUILD. Without marking the internal eUICC properly as internal we cannot decide correctly which one to expose to system when there are multiple. Please fix your LineageOS overlay.
Thanks for merging! You're right, the device tree is missing non_removable_euicc_slots. I'll fix that in the exy2100 overlay.