How unicorn369/hookeuicc works
Purpose and delivery
HookEuicc is an Android Xposed module that bypasses eSIM requirements imposed by other apps and can capture eSIM activation codes by copying them to the clipboard. It also provides an OMAPI bypass for Secure Element access where ARA/ARF rules would normally deny access.
The Android application primarily hosts module configuration; its runtime behavior is injected into other processes by the Xposed framework.
Paths: app/src/main/AndroidManifest.xml, app/src/main/assets/xposed_init, app/build.gradle
Entry points and process model
xposed_init registers the Xposed entry class. Xposed loads that class into selected target application or system processes, rather than invoking it through normal Android activity startup.
XposedInit is the module’s behavioral entry point and hook coordinator. It must distinguish loaded packages/processes and install the applicable eSIM or OMAPI hooks without making the host UI process responsible for interception.
Paths: app/src/main/assets/xposed_init, app/src/main/java/cn/unicorn369/HookEuicc/XposedInit.java
Configuration UI and persistence boundary
SettingsActivity is the user-facing Android entry point for enabling/configuring target behavior. Its preference screen defines persisted choices, including the package selection relevant to OMAPI bypass (com.android.se per README).
The settings UI writes Android preference-backed state; injected hook code reads that state when running in target processes. This is an important cross-process boundary, since the configuration app and hooked processes do not share normal in-memory state.
Paths: app/src/main/java/cn/unicorn369/HookEuicc/SettingsActivity.java, app/src/main/res/xml/prefs.xml, app/src/main/res/layout/activity_settings.xml
eSIM requirement bypass and code extraction
The module’s core hook stage intercepts eSIM-related checks in third-party software, altering or bypassing decisions that would otherwise require eSIM availability. A related interception path observes activation-code handling in apps that do not directly expose the code, then sends the extracted value to the Android clipboard.
This functionality depends on Xposed APIs and target-app implementation details; it is not an eSIM provisioning service and does not own carrier/network activation flows.
Paths: app/src/main/java/cn/unicorn369/HookEuicc/XposedInit.java, app/src/main/assets/xposed_init
OMAPI / Secure Element bypass
A separate system-facing hook path targets Android Secure Element infrastructure, specifically com.android.se. It bypasses access-control enforcement associated with ARA and ARF, enabling OMAPI access for cards lacking the required ARA configuration.
Operational activation requires selecting com.android.se and restarting the device or killing that service, so the process reloads and receives the hooks.
Paths: app/src/main/java/cn/unicorn369/HookEuicc/XposedInit.java, app/src/main/res/xml/prefs.xml
Runtime, platform, and localization
The project is a Gradle-built Android application packaged as an Xposed module. Material runtime dependencies are Android framework APIs, the Xposed/LSPosed-compatible injection runtime, target applications, Android clipboard services, and the system Secure Element service for OMAPI behavior.
Resource-driven preferences and strings support default, Simplified Chinese, and Japanese UI variants.
Paths: build.gradle, app/build.gradle, app/src/main/res/values/strings.xml, app/src/main/res/values-zh-rCN/strings.xml, app/src/main/res/values-ja/strings.xml
Main entry points: SettingsActivity.java Settings activity · XposedInit.java XposedInit · AndroidManifest.xml Module manifest · prefs.xml Preference definitions
Components 15
Android Xposed Module
Packaged Android app and Xposed registration.
- Gradle build
app/build.gradle - Module manifest
app/src/main/AndroidManifest.xml - Xposed registration
app/src/main/assets/xposed_init
Configuration
UI-owned preferences shared with injected runtimes.
- Settings activity · Configures module behavior in the host app process.
app/src/main/java/cn/unicorn369/HookEuicc/SettingsActivity.java - Preference definitions
app/src/main/res/xml/prefs.xml - Preference-backed state · Read by hooks after target processes load.
- Localized UI strings · Default, Simplified Chinese, and Japanese variants.
app/src/main/res/values/strings.xml
Injected Hook Runtime
Runs inside selected target processes.
- Xposed / LSPosed · Loads the module entry class into target processes.
- XposedInit · Selects process-specific eSIM and OMAPI hooks.
app/src/main/java/cn/unicorn369/HookEuicc/XposedInit.java - eSIM hooks · Bypasses eSIM availability requirements and observes activation codes.
app/src/main/java/cn/unicorn369/HookEuicc/XposedInit.java - OMAPI access hooks · Bypasses ARA/ARF access-control enforcement.
app/src/main/java/cn/unicorn369/HookEuicc/XposedInit.java
Other components
- Target applications
- Android clipboard · Receives extracted activation codes.
- Secure Element service · Must reload after selection to receive OMAPI hooks.
- OMAPI clients
Connections 15
- Gradle build → Module manifest: packages
- Module manifest → Settings activity: launches
- Xposed registration → Xposed / LSPosed: registers entry class
- Xposed / LSPosed → XposedInit: injects into loaded process
- Settings activity → Preference definitions: renders
- Preference definitions → Preference-backed state: defines
- Settings activity → Preference-backed state: writes
- Localized UI strings → Settings activity: localizes
- Preference-backed state → XposedInit: reads across process boundary
- XposedInit → eSIM hooks: installs for app processes
- XposedInit → OMAPI access hooks: installs for com.android.se
- eSIM hooks → Target applications: intercepts checks and codes
- eSIM hooks → Android clipboard: copies activation code
- OMAPI access hooks → Secure Element service: intercepts access control
- Secure Element service → OMAPI clients: serves OMAPI access