Open Mobile API

Introduction #

OMAPI (Open Mobile API) is an API by which android applications can access SE (Secure Elements), including SIM cards and eUICCS. It provides APDU level access and hence works at a similar level of abstraction to what PC/SC provides on Windows/OS-X/Linux.

This feature is available in Android 9 (API level 28) or later.

If you use org.simalliance.openmobileapi, then can downgrade to Android 5 (API level 21).

Checkpoints #

Android Security feature #

SecurityException: If the calling application cannot be granted access to this AID or the default Applet on this session.

Compatibility can therefore be tested by turning on each ISD-R logical channel (eSIM.me and 5ber.eSIM app use this method)

See android.se.omapi.Session#openLogicalChannel (source code)
See org.simalliance.openmobileapi.Session#openLogicalChannel (source code)

Device-specific Caveats #

Mainland China Manufacturer #

China Mobile Super SIM card is also based on OMAPI to access SE

China Mobile considers SIM Slot 1 to be generally available, so it can be assumed that card slots in mobile phones manufactured in Mainland China are generally available.

see Sustainability Report (2022)
see mp.weixin.qq.com/s/jH_Gi82yHed22mY2XipUDw (Chinese)
see wap.js.10086.cn/vw/HK/pages/XLK (Chinese)

Xiaomi Manufacturer #

The MIUI (now HyperOS) on Snapdragon by Qualcomm, will seize ISD-R logical channel, resulting in unavailability.

There is no userspace solution to this problem, which requires the eUICC slave side to implement ISD-R non-exclusive access.

Samsung Manufacturer #

Switching profiles in OneUI 6.1+ will cause com.android.se to continue to load high.

FOSS Applications #

Specifications #

References #