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

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 https://freewechat.com/a/Mzg4NzAzMDA3NQ==/100003909/1 (Chinese)
see https://web.archive.org/web/20240614135550/https://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 Xiaomi to fix it.

Solution: If the card side provides the supplementary logical channel supports, then it can be accessed.

OnePlus Manufacturer #

Some OnePlus smartphones cannot access the standard ISD-R AID.

There is no userspace solution to this problem, which is a RIL limitation.

Solution: If the card side provides the modified ISD-R AID, then it can be accessed.

Samsung Manufacturer #

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

There is no userspace solution to this problem, which requires Samsung to fix it.

FOSS Applications #

Specifications #

References #