# cursedhardware/euicc-probe architecture

> Architecture diagram of the GitHub repository cursedhardware/euicc-probe, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-06-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/cursedhardware/euicc-probe
- Repository: https://github.com/cursedhardware/euicc-probe

## Overview

1. **What this repo is**
   - `eUICC Probe` is a single Android app whose job is to inspect whether the device appears to support eUICC/eSIM-related capabilities and to expose related system information.
   - There is no server-side component, database, or network backend in the repo; the architecture is entirely on-device.

2. **Top-level application shape**
   - The code lives in one Android application module: `app/`.
   - The app is Kotlin-based and built with Gradle Kotlin DSL.
   - The runtime boundary is the Android OS: all meaningful data comes from local system APIs, package metadata, framework services, and an embedded Open Mobile API jar.

3. **Entry point and screen hosting**
   - `ui/activity/MainActivity.kt` is the main UI entry point.
   - It appears to act as the host for the app’s screens/fragments, so the activity is the top-level container while the feature logic is split into fragments below it.

4. **Primary feature screens**
   - `ui/fragment/OpenMobileFragment.kt` focuses on Open Mobile API / secure-element / eUICC-related probing.
   - `ui/fragment/SystemFragment.kt` focuses on device/system inspection, such as features, system properties, or privileged app state.
   - These fragments are the main architectural split in the UI: one screen for eUICC/Open Mobile API probing, one for system capability inspection.

5. **Probe and utility layer**
   - The `tool/` package is the app’s non-UI logic layer.
   - Key helpers include:
     - `OpenMobileAPI.kt` for interacting with the Open Mobile API library and related secure-element checks.
     - `SystemProperties.kt` for reading Android system properties.
     - `SystemService.kt` for accessing OS services.
     - `SystemApps.kt` for inspecting installed/system apps.
     - `PrivAppPermissionParser.kt` for parsing privileged app permission data.
     - `Version.kt` and `CustomTextUtil.kt` for formatting/version/text handling.
   - This layer is where raw Android/platform data is converted into app-consumable models or display strings.

6. **Data flow from OS to UI**
   - The app reads data from Android system sources first.
   - That data is transformed in the `tool/` layer.
   - The fragments then render it through adapters and custom views.
   - In architectural terms: OS/platform sources → probe/util classes → fragment state → adapter/custom view rendering.

7. **Rendering and list composition**
   - `ui/adapter/SystemFeaturesAdapter.kt` and `ui/adapter/SystemPropertiesAdapter.kt` suggest list-based presentation for feature/property records.
   - `ui/widget/BasicInfoView.kt` and `ui/widget/ListItemView.kt` are reusable custom views used to present key-value or summary items consistently.
   - The UI looks componentized rather than using only stock widgets, which helps when drawing the diagram: fragments depend on shared presentation widgets and adapters.

8. **Resources as configuration and UI contract**
   - The layouts in `res/layout/` define the fragment screens and reusable custom views.
   - `values/strings.xml`, `colors.xml`, `themes.xml`, `dimens.xml`, `attrs.xml`, and `ids.xml` define the app’s presentation contract.
   - `values/system-props.xml` likely enumerates system property keys or display labels, meaning some of the app’s “data model” is resource-driven rather than hardcoded.

9. **External library boundary**
   - `app/libs/org.simalliance.openmobileapi.jar` is a bundled third-party dependency.
   - This is the key non-Android-framework integration point and likely enables the app’s secure-element/Open Mobile API probing.
   - For an architecture diagram, this should be shown as an external library boundary used by the `OpenMobileAPI` helper and the Open Mobile fragment.

10. **Android platform and permissions context**
   - The manifest and privileged-app parsing utilities indicate the app is sensitive to Android permission/state boundaries.
   - The app likely needs to observe device capabilities, installed package state, and system-level properties rather than user-generated content.
   - That means its behavior is tightly coupled to platform version and OEM/device configuration.

11. **Build and packaging**
   - The project is built with Gradle, using the standard Android app structure and ProGuard rules.
   - CI is present via `.github/workflows/ci.yaml`, so the repo includes automated build/validation but not deployment infrastructure.
   - The build artifacts are a standalone Android APK/AAB, not a multi-service system.

12. **Non-functional/documentation boundaries**
   - `docs/PRIVACY-POLICY.md` and `docs/TERMS.md` suggest the app has explicit user-facing policy/legal docs, but no obvious telemetry or backend collection stack is present.
   - The overall system is a privacy-conscious local inspection tool: it reads device state and displays results on-device.

Main entry points: [`app/src/main/java/app/septs/euiccprobe/ui/fragment/SystemFragment.kt`](https://github.com/cursedhardware/euicc-probe/blob/main/app/src/main/java/app/septs/euiccprobe/ui/fragment/SystemFragment.kt) (System), [`app/src/main/java/app/septs/euiccprobe/ui/fragment/OpenMobileFragment.kt`](https://github.com/cursedhardware/euicc-probe/blob/main/app/src/main/java/app/septs/euiccprobe/ui/fragment/OpenMobileFragment.kt) (Open Mobile), [`app/src/main/java/app/septs/euiccprobe/ui/widget/ListItemView.kt`](https://github.com/cursedhardware/euicc-probe/blob/main/app/src/main/java/app/septs/euiccprobe/ui/widget/ListItemView.kt) (List item), [`app/src/main/java/app/septs/euiccprobe/tool/OpenMobileAPI.kt`](https://github.com/cursedhardware/euicc-probe/blob/main/app/src/main/java/app/septs/euiccprobe/tool/OpenMobileAPI.kt) (OpenMobileAPI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_group_app["Android app"]
end

subgraph group_group_ui["UI layer"]
  node_node_main_activity["MainActivity<br/>[MainActivity.kt]"]
  node_node_open_fragment["Open Mobile<br/>fragment"]
  node_node_system_fragment["System<br/>fragment<br/>[SystemFragment.kt]"]
  node_node_features_adapter["Features adapter"]
  node_node_props_adapter["Props adapter"]
  node_node_basic_info_view["Basic info<br/>custom view<br/>[BasicInfoView.kt]"]
  node_node_list_item_view["List item<br/>custom view<br/>[ListItemView.kt]"]
end

subgraph group_group_tool["Probe tools"]
  node_node_openmobile_api["OpenMobileAPI<br/>probe helper<br/>[OpenMobileAPI.kt]"]
  node_node_sysprops["System props<br/>platform helper"]
  node_node_sysservice["System service<br/>platform helper<br/>[SystemService.kt]"]
  node_node_sysapps["System apps<br/>package inspector<br/>[SystemApps.kt]"]
  node_node_priv_parser["Priv app parser"]
  node_node_version["Version<br/>formatting<br/>[Version.kt]"]
  node_node_textutil["Text util<br/>formatting<br/>[CustomTextUtil.kt]"]
end

subgraph group_group_resources["Resources"]
  node_node_activity_layout["Activity layout<br/>[activity_main.xml]"]
  node_node_fragment_layouts["Fragment layouts"]
  node_node_value_contract["Value contract<br/>resources<br/>[strings.xml]"]
end

subgraph group_group_external["External boundary"]
  node_node_openmobile_jar[("OMAPI jar<br/>third-party library")]
end

subgraph group_group_build["Build & docs"]
  node_node_build_ci["Build & CI<br/>build config<br/>[build.gradle.kts]"]
  node_node_docs["Docs<br/>[PRIVACY-POLICY.md]"]
end

node_node_main_activity -->|"hosts"| node_node_open_fragment
node_node_main_activity -->|"hosts"| node_node_system_fragment
node_node_open_fragment -->|"uses"| node_node_openmobile_api
node_node_open_fragment -->|"renders"| node_node_basic_info_view
node_node_open_fragment -->|"renders"| node_node_list_item_view
node_node_system_fragment -->|"uses"| node_node_sysprops
node_node_system_fragment -->|"uses"| node_node_sysservice
node_node_system_fragment -->|"uses"| node_node_sysapps
node_node_system_fragment -->|"uses"| node_node_priv_parser
node_node_system_fragment -->|"uses"| node_node_features_adapter
node_node_system_fragment -->|"uses"| node_node_props_adapter
node_node_features_adapter -->|"renders"| node_node_list_item_view
node_node_props_adapter -->|"renders"| node_node_list_item_view
node_node_openmobile_api -->|"wraps"| node_node_openmobile_jar
node_node_openmobile_api -->|"formats"| node_node_textutil
node_node_sysprops -->|"driven by"| node_node_value_contract
node_node_sysapps -->|"formats"| node_node_version
node_node_basic_info_view -->|"included in"| node_node_activity_layout
node_node_list_item_view -->|"included in"| node_node_fragment_layouts
node_node_build_ci -->|"builds"| node_node_main_activity
node_node_build_ci -->|"packages"| node_node_openmobile_jar
node_node_docs -.->|"documents"| node_node_build_ci

click node_node_main_activity "https://github.com/cursedhardware/euicc-probe/blob/main/app/src/main/java/app/septs/euiccprobe/ui/activity/MainActivity.kt"
click node_node_open_fragment "https://github.com/cursedhardware/euicc-probe/blob/main/app/src/main/java/app/septs/euiccprobe/ui/fragment/OpenMobileFragment.kt"
click node_node_system_fragment "https://github.com/cursedhardware/euicc-probe/blob/main/app/src/main/java/app/septs/euiccprobe/ui/fragment/SystemFragment.kt"
click node_node_features_adapter "https://github.com/cursedhardware/euicc-probe/blob/main/app/src/main/java/app/septs/euiccprobe/ui/adapter/SystemFeaturesAdapter.kt"
click node_node_props_adapter "https://github.com/cursedhardware/euicc-probe/blob/main/app/src/main/java/app/septs/euiccprobe/ui/adapter/SystemPropertiesAdapter.kt"
click node_node_basic_info_view "https://github.com/cursedhardware/euicc-probe/blob/main/app/src/main/java/app/septs/euiccprobe/ui/widget/BasicInfoView.kt"
click node_node_list_item_view "https://github.com/cursedhardware/euicc-probe/blob/main/app/src/main/java/app/septs/euiccprobe/ui/widget/ListItemView.kt"
click node_node_openmobile_api "https://github.com/cursedhardware/euicc-probe/blob/main/app/src/main/java/app/septs/euiccprobe/tool/OpenMobileAPI.kt"
click node_node_sysprops "https://github.com/cursedhardware/euicc-probe/blob/main/app/src/main/java/app/septs/euiccprobe/tool/SystemProperties.kt"
click node_node_sysservice "https://github.com/cursedhardware/euicc-probe/blob/main/app/src/main/java/app/septs/euiccprobe/tool/SystemService.kt"
click node_node_sysapps "https://github.com/cursedhardware/euicc-probe/blob/main/app/src/main/java/app/septs/euiccprobe/tool/SystemApps.kt"
click node_node_priv_parser "https://github.com/cursedhardware/euicc-probe/blob/main/app/src/main/java/app/septs/euiccprobe/tool/PrivAppPermissionParser.kt"
click node_node_version "https://github.com/cursedhardware/euicc-probe/blob/main/app/src/main/java/app/septs/euiccprobe/tool/Version.kt"
click node_node_textutil "https://github.com/cursedhardware/euicc-probe/blob/main/app/src/main/java/app/septs/euiccprobe/tool/CustomTextUtil.kt"
click node_node_activity_layout "https://github.com/cursedhardware/euicc-probe/blob/main/app/src/main/res/layout/activity_main.xml"
click node_node_fragment_layouts "https://github.com/cursedhardware/euicc-probe/blob/main/app/src/main/res/layout/fragment_open_mobile.xml"
click node_node_value_contract "https://github.com/cursedhardware/euicc-probe/blob/main/app/src/main/res/values/strings.xml"
click node_node_openmobile_jar "https://github.com/cursedhardware/euicc-probe/blob/main/app/libs/org.simalliance.openmobileapi.jar"
click node_node_build_ci "https://github.com/cursedhardware/euicc-probe/blob/main/app/build.gradle.kts"
click node_node_docs "https://github.com/cursedhardware/euicc-probe/blob/main/docs/PRIVACY-POLICY.md"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_node_main_activity,node_node_open_fragment,node_node_system_fragment,node_node_features_adapter,node_node_props_adapter,node_node_basic_info_view,node_node_list_item_view toneAmber
class node_node_openmobile_api,node_node_sysprops,node_node_sysservice,node_node_sysapps,node_node_priv_parser,node_node_version,node_node_textutil toneMint
class node_node_activity_layout,node_node_fragment_layouts,node_node_value_contract toneRose
class node_node_openmobile_jar toneIndigo
class node_node_build_ci,node_node_docs toneTeal
```

## Components

### UI layer

Activity, fragments, adapters, and reusable views.

- [MainActivity](https://github.com/cursedhardware/euicc-probe/blob/main/app/src/main/java/app/septs/euiccprobe/ui/activity/MainActivity.kt): activity · Top-level Android entry point and screen host. · `app/src/main/java/app/septs/euiccprobe/ui/activity/MainActivity.kt`
- [Open Mobile](https://github.com/cursedhardware/euicc-probe/blob/main/app/src/main/java/app/septs/euiccprobe/ui/fragment/OpenMobileFragment.kt): fragment · UI for Open Mobile API and eUICC / secure-element probing. · `app/src/main/java/app/septs/euiccprobe/ui/fragment/OpenMobileFragment.kt`
- [System](https://github.com/cursedhardware/euicc-probe/blob/main/app/src/main/java/app/septs/euiccprobe/ui/fragment/SystemFragment.kt): fragment · UI for device and system capability inspection. · `app/src/main/java/app/septs/euiccprobe/ui/fragment/SystemFragment.kt`
- [Features adapter](https://github.com/cursedhardware/euicc-probe/blob/main/app/src/main/java/app/septs/euiccprobe/ui/adapter/SystemFeaturesAdapter.kt): adapter · List presentation for system feature records. · `app/src/main/java/app/septs/euiccprobe/ui/adapter/SystemFeaturesAdapter.kt`
- [Props adapter](https://github.com/cursedhardware/euicc-probe/blob/main/app/src/main/java/app/septs/euiccprobe/ui/adapter/SystemPropertiesAdapter.kt): adapter · List presentation for system property records. · `app/src/main/java/app/septs/euiccprobe/ui/adapter/SystemPropertiesAdapter.kt`
- [Basic info](https://github.com/cursedhardware/euicc-probe/blob/main/app/src/main/java/app/septs/euiccprobe/ui/widget/BasicInfoView.kt): custom view · Reusable summary/key-value display component. · `app/src/main/java/app/septs/euiccprobe/ui/widget/BasicInfoView.kt`
- [List item](https://github.com/cursedhardware/euicc-probe/blob/main/app/src/main/java/app/septs/euiccprobe/ui/widget/ListItemView.kt): custom view · Reusable row component for list-style rendering. · `app/src/main/java/app/septs/euiccprobe/ui/widget/ListItemView.kt`

### Probe tools

Non-UI logic that queries Android and formats probe results.

- [OpenMobileAPI](https://github.com/cursedhardware/euicc-probe/blob/main/app/src/main/java/app/septs/euiccprobe/tool/OpenMobileAPI.kt): probe helper · Wrapper around secure-element and Open Mobile API access. · `app/src/main/java/app/septs/euiccprobe/tool/OpenMobileAPI.kt`
- [System props](https://github.com/cursedhardware/euicc-probe/blob/main/app/src/main/java/app/septs/euiccprobe/tool/SystemProperties.kt): platform helper · Reads Android system properties for inspection and display. · `app/src/main/java/app/septs/euiccprobe/tool/SystemProperties.kt`
- [System service](https://github.com/cursedhardware/euicc-probe/blob/main/app/src/main/java/app/septs/euiccprobe/tool/SystemService.kt): platform helper · Accesses Android framework services used by the probes. · `app/src/main/java/app/septs/euiccprobe/tool/SystemService.kt`
- [System apps](https://github.com/cursedhardware/euicc-probe/blob/main/app/src/main/java/app/septs/euiccprobe/tool/SystemApps.kt): package inspector · Inspects installed and system app state. · `app/src/main/java/app/septs/euiccprobe/tool/SystemApps.kt`
- [Priv app parser](https://github.com/cursedhardware/euicc-probe/blob/main/app/src/main/java/app/septs/euiccprobe/tool/PrivAppPermissionParser.kt): parser · Parses privileged app permission information. · `app/src/main/java/app/septs/euiccprobe/tool/PrivAppPermissionParser.kt`
- [Version](https://github.com/cursedhardware/euicc-probe/blob/main/app/src/main/java/app/septs/euiccprobe/tool/Version.kt): formatting · Formats version-related values for display. · `app/src/main/java/app/septs/euiccprobe/tool/Version.kt`
- [Text util](https://github.com/cursedhardware/euicc-probe/blob/main/app/src/main/java/app/septs/euiccprobe/tool/CustomTextUtil.kt): formatting · Text conversion and presentation helpers. · `app/src/main/java/app/septs/euiccprobe/tool/CustomTextUtil.kt`

### Resources

Layouts, values, and XML contracts that shape the UI and labels.

- [Activity layout](https://github.com/cursedhardware/euicc-probe/blob/main/app/src/main/res/layout/activity_main.xml): layout · XML contract for the main host screen. · `app/src/main/res/layout/activity_main.xml`
- [Fragment layouts](https://github.com/cursedhardware/euicc-probe/blob/main/app/src/main/res/layout/fragment_open_mobile.xml): layout · XML screens for Open Mobile and System fragments. · `app/src/main/res/layout/fragment_open_mobile.xml`
- [Value contract](https://github.com/cursedhardware/euicc-probe/blob/main/app/src/main/res/values/strings.xml): resources · Strings, colors, dimensions, IDs, attrs, themes, and system-props resource definitions. · `app/src/main/res/values/strings.xml`

### External boundary

Bundled third-party library used for Open Mobile API access.

- [OMAPI jar](https://github.com/cursedhardware/euicc-probe/blob/main/app/libs/org.simalliance.openmobileapi.jar): third-party library · Bundled Open Mobile API dependency used for secure-element probing. · `app/libs/org.simalliance.openmobileapi.jar`

### Build & docs

Gradle, CI, and repository documentation supporting the app.

- [Build & CI](https://github.com/cursedhardware/euicc-probe/blob/main/app/build.gradle.kts): build config · Gradle build, wrapper, ProGuard, and CI workflow. · `app/build.gradle.kts`
- [Docs](https://github.com/cursedhardware/euicc-probe/blob/main/docs/PRIVACY-POLICY.md): policy docs · Privacy policy and terms for the app. · `docs/PRIVACY-POLICY.md`

## Connections

- MainActivity → Open Mobile: hosts · Main activity hosts the Open Mobile screen.
- MainActivity → System: hosts · Main activity hosts the system inspection screen.
- Open Mobile → OpenMobileAPI: uses · Fragment delegates secure-element probing to the helper.
- Open Mobile → Basic info: renders · Uses reusable summary widgets for probe output.
- Open Mobile → List item: renders · Uses reusable list rows for detailed results.
- System → System props: uses · Reads platform properties for device inspection.
- System → System service: uses · Queries Android services and framework state.
- System → System apps: uses · Inspects installed and system apps.
- System → Priv app parser: uses · Parses privileged app permission data.
- System → Features adapter: uses · Feeds feature lists into adapter presentation.
- System → Props adapter: uses · Feeds property lists into adapter presentation.
- Features adapter → List item: renders · Adapter composes list item views.
- Props adapter → List item: renders · Adapter composes list item views.
- OpenMobileAPI → OMAPI jar: wraps · Helper wraps the bundled OMAPI library boundary.
- OpenMobileAPI → Text util: formats · Converts probe values into display text.
- System props → Value contract: driven by · Uses resource-defined property keys and labels.
- System apps → Version: formats · Uses version helpers for package/system output.
- Basic info → Activity layout: included in · Reusable widget is embedded by XML layouts.
- List item → Fragment layouts: included in · Reusable row widget is embedded by fragment layouts.
- Build & CI → MainActivity: builds · Gradle compiles the Android app entry point.
- Build & CI → OMAPI jar: packages · Build bundles the third-party OMAPI jar.
- Docs → Build & CI: documents · Repository docs sit alongside the build and CI setup.
