jiyin004-jpg/ommega
About
Ommega three-end system: A/B-side Magisk modules, relay server, and B-side Android app
Other ProjectsMeasured star growth
- in 24h
- 0
- in 7 days
- +3
- in 15 days
- +17
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.en.md
OriginalOmmega
Ommega is a three-part remote TEE attestation system: the A side issues the requests, the B side provides real hardware TEE capability, and the server relays and schedules between them. Attestation, signing and decryption requests made by apps on the A side are forwarded through the server to the B side, executed by that machine's real hardware TEE (KeyMint / StrongBox), and returned unchanged. The B side also has a companion management app (b-app).
Current version and downloads are on the Releases page.
Components
| Part | Role | Form | Install |
|---|---|---|---|
| A side (a-side) | Request side. A keymint daemon plus an injector intercepts this machine's keystore calls and forwards them to the remote B side | Magisk module (arm64-v8a / armeabi-v7a / x86 / x86_64) | Flash the zip with Magisk / KernelSU |
| B side (b-side) | Provider side. A relay daemon long-polls the server for tasks and hands them to the local hardware TEE, then returns the result | Magisk module (arm64-v8a / x86_64) | Flash the zip with Magisk / KernelSU |
| Server | Relay and scheduling. Task queue, device management, card billing, keybox management, public status page | Standalone binary | Deploy on Linux x86_64 / Windows x86_64 |
| B-side app (b-app) | Management UI for the B side: device status, connection settings | Android APK | Install the APK directly |
Features
- Remote attestation on real hardware TEE: the B side generates the attestation certificate chain with its real KeyMint / StrongBox, so apps on the A side get genuinely hardware-backed security levels (StrongBox / TEE)
- Remote signing and decryption: key operations on the A side are forwarded in full and executed inside the B side's real TEE
- KeyMint version adaptation: detects and supports the KeyMint HAL interface of different Android versions
- StrongBox first, with a fallback policy: prefers the StrongBox security level and handles the unavailable case according to policy
- Public device status page: the server exposes a public page showing which devices are online
- Card billing: card purchase, activation and usage accounting built into the server
- Admin backend: device management, task inspection, keybox upload and automatic refresh
Quick start (official online service)
If you would rather not host anything yourself, just use the official online service — the settings below are ready to use:
| Item | Value |
|---|---|
| Online device status | http://110.40.170.96:10886/status/ |
| Config URL (same for A side / B side / app) | http://110.40.170.96:10886 |
| A-side token | aY7kRSDDR6PMmamlKwtgf7mQgr-X5uFd |
| B-side token | Mytju8b0_lhLlqTKcEUhuwSbAsAtjom0 |
| Device ID (B-side default, and the machine pre-registered on the official service) | device-b-2 |
B-side setup (on a locked device)
The B side only needs the module.
client-b-app-release.apkis a display/demo page with no real attestation role — install it or not, it makes no difference.
- Flash
ommega-b-release-<version>.zipfrom Releases and reboot (one zip carries both arm64-v8a and x86_64; the installer picks the one matching the device) - Edit
/data/adb/ommega/relay.confand fill in the official settings:
OMMEGA_RELAY_SERVER=http://110.40.170.96:10886
OMMEGA_RELAY_DEVICE_ID=device-b-2
OMMEGA_RELAY_TOKEN=Mytju8b0_lhLlqTKcEUhuwSbAsAtjom0
- Run
touch /data/adb/ommega/restart.allto restart the relay service
A-side setup (a-side module)
- Flash
ommega-a-release-<version>.zipfrom Releases and reboot (one zip carries arm64-v8a / armeabi-v7a / x86 / x86_64; the installer picks the one matching the device) - Edit
/data/adb/ommega/ommegadata/config(or use the module's WebUI) and fill in the official settings:
url: http://110.40.170.96:10886
token: aY7kRSDDR6PMmamlKwtgf7mQgr-X5uFd
device_id:
tls_insecure: true
remote: on
An empty
device_idmeans "let the server pick a B device": the default device ID configured on the server wins, otherwise the idlest online device is picked. Fill it in only when you want to pin one specific device.
Path note:
ommegadatais a symlink to/data/misc/keystore/ommega, and the daemon really reads/data/misc/keystore/ommega/config./data/adb/ommega/config— the path without theommegadatalevel — is a different file, and writing there has no effect (no restart is needed after a change; the config is watched).
After that, attestation / signing / decryption requests on the A side go through the official server and are executed by the real TEE of an online B-side device. Leaving device_id empty is the default: the server uses the default device ID from the admin console, or the idlest online device. If you do fill it in, it must be the ID of a B-side device that is currently online (check it under "online B-side devices" on the /status/ page; appearing only under "devices with certificates on file" does not mean online). When the named device is offline the server hands the task to the idlest online B-side instead (the real-device layer allows another B side to stand in) and records the actual assignment in the log — in that case the certificate chain you get is that stand-in's, so do not treat an offline ID as a target.
Self-hosting
Repository layout
ommega/
├── .github/workflows/ # CI: fmt / clippy / test gates for all three parts
├── .cargo-husky/hooks/ # pre-commit hook scripts (installed into .git/hooks by cargo-husky; format check only)
├── a-side/source/ # A-side (Magisk module) Rust sources: keymint daemon + ommega-inject payload
├── b-side/source/ # B-side (Magisk module) Rust sources: relay daemon
├── b-app/source/ # B-side Android app (Kotlin + Gradle)
├── server/source/ # server Rust sources + operations scripts
└── VERSION # version number shared by all three
The repository holds sources and documentation only; build products (module zips, APK, server binaries) are published exclusively as Release assets.
Server deployment
- Download the matching binary from Releases:
- Linux x86_64:
relay_rs-linux-x86_64-musl(static musl build, no libc dependency;chmod +xand run) - Windows x86_64:
relay_rs-windows-x86_64-msvc.exe
- Linux x86_64:
- Create and fill in
.envfollowing the format ofserver/source/.env.pay.example: RELAY_TOKEN, MySQL connection, TLS certificates, HTTP/HTTPS ports (default 10886 / 8443) - Run the binary and the deployment is done — the admin backend and the device status page are available immediately
Building the modules and the app
- A/B modules: run
python build.py --releaseundera-side/sourceandb-side/sourceto produce a zip. By default this yields a single zip carrying every supported ABI (A side: arm64-v8a / armeabi-v7a / x86 / x86_64; B side: arm64-v8a / x86_64). At install timecustomize.shchecks the device architecture and extracts the matchinglibs/<abi>/binaries; the runtime daemon scripts also pick their binary byro.product.cpu.abirather than by directory order. Use--abi <name>to include only the named ABI (still a single package, repeatable), and--splitto emit one zip per ABI. - B-side app: run
./gradlew :app:assembleReleaseunderb-app/sourceto produce the APK (gradlew.baton Windows)
After building, upload the zips / APK / server binaries as Release assets; they do not need to be committed.
Development note:
b-sidedepends onrsproperties, which only applies to Linux / Android targets, so a barecargo checkon Windows (without--target) fails and looks like broken code. Add the target:cargo check --target aarch64-linux-android(setANDROID_NDK_ROOT/ANDROID_NDK_HOMEfirst). The A side and the server have no such restriction.
Development gates
The three workspaces are independent, and CI (.github/workflows/ci.yml) runs the same set for each:
cargo clippy with -D warnings, cargo fmt --all -- --check, and the tests. The server builds for
the host target, so its tests really run; the A / B sides only build for aarch64-linux-android, so CI
merely compiles the test binaries (--no-run) and running them on a real device stays a manual step.
A light pre-commit hook additionally checks the format of whichever workspace was touched; the scripts
live in .cargo-husky/hooks/ at the repository root.
Local A-side development needs two extra things, without which it will not compile:
protoc:build.rsuses prost to generateproto/storage.protointosrc/proto/(the generated code is not committed)a-side/source/ommega-injector/assets/soter_ask.pem: the local-fallback ASK private key. It is excluded by the.gitignorerule**/*.pemand never enters the repository, but the injector'sinclude_bytes!requires it to be present. CI generates a throwaway key on the spot to satisfy the compiler; it takes no part in any release artifact
Credits
Ommega learned from and borrowed ideas from the following open-source projects (in no particular order):
| Project | Author | GitHub |
|---|---|---|
| Tricky Store | 5ec1cff | 5ec1cff/TrickyStore |
| Tricky Addon | KOWX712 | KOWX712/Tricky-Addon-Update-Target-List |
| OhMyKeymint | James Clef (qwq233) | qwq233/OhMyKeymint |
| KeyAttestation | vvb2060 | vvb2060/KeyAttestation |
| TEESimulator-RS | Enginex0 | Enginex0/TEESimulator-RS |
| PathMask | Andrea-lyz | Andrea-lyz/LKM-PathMask |
Community and support
QQ group: 2167063739
Telegram channel: https://t.me/ommega6
Explore related projects
Loading…