Skip to content

Releases

Ommega 2.4.5

Choose a tag to compare

@github-actions github-actions released this 21 Nov 16:08

中文

本版涉及 A、B 和 Server;B-app 与 StrongBoxCapabilityMask 仅同步产品版本号。随包 AProbe 更新到 1.9.4-review。

  • StrongBox 功能声明隐藏后,所有应用都看不到 StrongBox(#110)。 当 android.hardware.strongbox_keystore 被全局隐藏(A 的「屏蔽 StrongBox」开关或其他全局屏蔽模块)时,keystore2 对所有调用者——包括不在作用域内的应用——的 StrongBox 请求都返回 HARDWARE_TYPE_UNAVAILABLE(StrongBoxUnavailableException),与 PackageManager 的声明一致;单应用「StrongBox」模式和 use_native_strongbox 在屏蔽期间不生效。屏蔽期间已有的 StrongBox 密钥不可用(读取返回 SYSTEM_ERROR),关闭屏蔽并重启后恢复。系统 StrongBox HAL 进程保持运行。普通 TEE 请求不受影响。
  • 删除中继密钥时同步删除 B / Server 上的会话(#109)。 App 删除密钥、清除数据或卸载后,A 在最后一个引用该别名的密钥块被回收时排队删除,后台调用 Server 新增的 /api/delete/;physical 模式由 B 删除会话文件(不调用 TEE),server_keybox 模式删除 Server 上的会话。失败按 1 分钟起、最长 6 小时重试,30 天后放弃。本版之前创建、之后从未使用过的远端密钥不会被登记,删除后仍会留在 B 上。
  • KeyMint 行为对齐(#108)。 建钥接受并执行 MIN_SECONDS_BETWEEN_OPS(原来返回 INVALID_ARGUMENT),窗口内再次使用返回 KEY_RATE_LIMIT_EXCEEDED;earlyBootEnded 在 boot-level 缓存初始化失败时仍会通知 KeyMint。
  • 其他修复。 屏蔽开启后删除旧 StrongBox 密钥不再导致 keymint 进程中止;注入后首个请求不再可能绕过拦截;getHardwareInfo 出错返回错误码而不是崩溃;删除无用的旧权限函数。

升级:A 请整包更新,使 KeyMint 与注入器同版生效。中继密钥删除需要 A、B、Server 都更新到 2.4.5;只更新 A 时删除请求会持续重试,不影响其他功能。使用「屏蔽 StrongBox」的设备在更新后,所有应用的 StrongBox 请求都会失败,依赖 StrongBox 的应用可能需要重新建钥或退回 TEE。

验证:三个 PR 均通过 A/B Android 目标的 fmt、clippy 与测试编译,Server 单元测试和 WebUI 测试;A 端相关测试二进制在 A 设备上执行通过,release 版热更新到 A 后实测 MIN_SECONDS_BETWEEN_OPS 限流、StrongBox 屏蔽(作用域内外均返回 -68)和中继密钥登记与排队。B 与 Server 的删除接口只有单元测试,未在线上部署验证;屏蔽期间读取旧 StrongBox 密钥返回 SYSTEM_ERROR 只有单元测试覆盖。

English

This release changes A, B and Server. B-app and StrongBoxCapabilityMask only receive the synchronized product version. The bundled AProbe is updated to 1.9.4-review.

  • A hidden StrongBox declaration now hides StrongBox from every app (#110). While android.hardware.strongbox_keystore is globally hidden (A's "Mask StrongBox" switch or another global mask module), keystore2 rejects StrongBox requests from every caller, including apps outside the scope, with HARDWARE_TYPE_UNAVAILABLE (StrongBoxUnavailableException), matching PackageManager. Per-app "StrongBox" mode and use_native_strongbox do not apply while the mask is active. Existing StrongBox keys are unusable while masked (reading them returns SYSTEM_ERROR) and become usable again after the mask is turned off and the device restarts. The system StrongBox HAL keeps running, and ordinary TEE requests are unaffected.
  • Deleting a relayed key also deletes its session on B / Server (#109). When an app deletes a key, clears its data or is uninstalled, A queues a deletion once the last keyblob referencing that alias is collected and calls the Server's new /api/delete/ in the background. In physical mode B removes the session file (no TEE call); in server_keybox mode the Server removes its session. Failures retry from 1 minute up to every 6 hours and are dropped after 30 days. Remote keys created before this release and never used afterwards are not registered and stay on B after deletion.
  • KeyMint behavior alignment (#108). Key generation accepts and enforces MIN_SECONDS_BETWEEN_OPS (it used to return INVALID_ARGUMENT); a second use inside the window returns KEY_RATE_LIMIT_EXCEEDED. earlyBootEnded still notifies KeyMint when the boot-level cache setup fails.
  • Other fixes. Deleting an old StrongBox key while the mask is active no longer aborts keymint; the first request after injection can no longer bypass interception; getHardwareInfo returns an error code instead of crashing; unused legacy permission helpers are removed.

Upgrade: update A as a complete module so KeyMint and the injector stay in sync. Relayed-key deletion needs A, B and Server on 2.4.5; with only A updated, deletions keep retrying without affecting anything else. On devices using "Mask StrongBox", StrongBox requests fail for every app after the update, so apps relying on StrongBox may need to recreate keys or fall back to TEE.

Validation: all three PRs passed fmt, clippy and test compilation for the A/B Android targets, Server unit tests and the WebUI tests. The relevant A test binaries ran on an A device, and a release hot update on A confirmed MIN_SECONDS_BETWEEN_OPS rate limiting, the StrongBox mask (-68 inside and outside the scope) and relayed-key registration and queuing. The B and Server deletion endpoints have unit tests only and were not deployed to production; SYSTEM_ERROR for old StrongBox keys while masked is covered by unit tests only.

Ommega 2.4.4

Choose a tag to compare

@github-actions github-actions released this 19 Nov 08:42
0ae4a41

热更新(同版本 2.4.4,A 模块 versionCode 360 → 361): 修复 KeyMint 降权到 keystore 后缺少 inet 组,导致修改中继配置热加载后中继 DNS 解析失败(#107)。已安装 2.4.4 的 A 端可直接覆盖刷入。

Hotfix (same version 2.4.4, A module versionCode 360 → 361): KeyMint now keeps the inet group after dropping to keystore, so relay DNS keeps working after a relay config hot reload (#107). Flash over an existing 2.4.4 A install.

中文

本版涉及 A、B、Server 和 B-app,均为安全加固与稳定性修复;StrongBoxCapabilityMask 仅同步产品版本号,随包 AProbe 未更新。

  • 中继 TLS 默认校验证书并支持公钥固定(#102)。 A 端 tls_insecure 默认改为 false,配置锁异常时报错而不是退回不校验;B 端 relay 不再一律接受任意证书。两端新增 SPKI SHA-256 固定:A 为 remote.tls_pin_sha256,B 为 OMMEGA_RELAY_TLS_PIN_SHA256;B 另有 OMMEGA_RELAY_TLS_INSECURE(默认 false)。设置了固定值时只接受持有该公钥的服务器;固定值格式错误直接报配置错误,不会降级为不校验。A WebUI 中继设置新增固定值输入框,「关闭 TLS 校验」在无配置时默认不勾选。
  • B token 绑定设备,联系方式查询不再返回完整 token(#101)。 /api/card/query/ 只返回打码的订单号和 token,完整 token 只能凭随机订单号领取。数据库签发的 B token 只能服务管理员绑定的 device_id(api_token.allowed_device_ids,首次使用时自动加列),否则 b_poll、b_result、身份上传与撤销均返回 403;静态 RELAY_TOKEN 不受影响。b_poll 要求非空 machine_id,同一设备第二台机器返回 409;B relay 在未配置时使用内核 boot_id,B-app 在服务启动时即使用 ANDROID_ID。管理后台可在签发时或之后为 token 绑定设备。
  • Server 限流与抽奖加固(#99、#100)。 抽奖每客户端每天 3 次,IPv6 按 /64 合并计数,全站每天最多 5 次中奖。五个滑动窗口限流表统一实现,每表最多 4096 个键,超长键以哈希保存;登录同时按 IP(每分钟 20 次)和 IP+用户名(每分钟 5 次)限流,匿名请求无法再无限撑大内存。
  • 管理后台与 A WebUI 的注入修复(#97、#98)。 管理后台按钮改用 data-* 属性和事件委托,不再把 DeviceID 拼进内联脚本;上传 keybox 时 DeviceID 只接受 [A-Za-z0-9._-],长度 1–128。A WebUI 对应用名、keybox 文件选择器中的文件名、目录名和路径做转义,进入目录和读取文件的 root shell 命令改为单引号转义,共享存储中的恶意文件名不能再执行命令。
  • KeyMint 中继请求移出 TA 互斥锁(#105)。 keyblob 版本检查只读缓存的中继 profile,缓存在加锁前单次预取,失败按 2 秒起、最长 30 秒退避;带 challenge 的远程 generateKey 在锁外完成中继证明后再加锁封装。中继不可达时,同一安全级别的其他 KeyMint 调用不再排队等待网络超时。路由、错误映射和 auth-bound 密钥存储不变。
  • cpu-mask App 内日志跟随调试开关(#104、#106)。 目标 App 进程内的 MaskCPU logcat 只在「诊断 → 启用调试日志」开启时写入,release 与 debug 构建一致;开关由 root companion 在每次目标 App 启动时读取,改动后需重启目标 App。关闭时被伪装的 App 读不到这些痕迹;root companion 的 MaskCPU 日志照常写,WebUI「设备属性视图」诊断依据 companion 日志判断。keymint 默认 log_level 改为 info,新安装时调试日志默认关闭。
  • 文档(#103)。 README 与 Server README 补充上述行为与数值。

升级:中继模式请成套更新 A、B、Server 和 B-app。使用自签名证书的 Server 必须在 A、B 两端配置公钥固定值(或明确开启不校验),否则请求会因证书校验失败;已显式保存 tls_insecure = true 的 A 配置保持原行为。数据库签发的 B token 升级后默认未绑定,需在管理后台绑定 device_id 后才能继续服务。上传 keybox 时 DeviceID 含其他字符会被拒绝。已有设备保存的 log_level = "debug" 不会被改写,调试日志仍保持开启,需要时请在 WebUI 手动关闭。A 端请使用整包更新,使同版 KeyMint 与注入器一同生效,再刷新 WebUI。

验证:各 PR 在主机上通过 A/B Android 目标的 fmt、clippy 与测试编译,Server 单元测试,WebUI 与 UI 测试;#97、#101 另在本地 Server 与数据库上做了端到端检查。本次发版未在设备上执行验收;中继 TLS、B 设备绑定和 KeyMint 锁外请求仍需实机验证。

English

This release changes A, B, Server and B-app with security hardening and stability fixes. StrongBoxCapabilityMask only receives the synchronized product version, and the bundled AProbe is unchanged.

  • Relay TLS is verified by default, with public-key pinning (#102). A now defaults tls_insecure to false and reports an error on a config-lock failure instead of falling back to no verification. The B relay no longer accepts every certificate. Both sides gain SPKI SHA-256 pinning: remote.tls_pin_sha256 on A and OMMEGA_RELAY_TLS_PIN_SHA256 on B, plus OMMEGA_RELAY_TLS_INSECURE on B (default false). With a pin set, only a server holding that key is accepted; a malformed pin is a configuration error and never downgrades to no check. The A WebUI relay dialog gains a pin field, and "Disable TLS verification" is unchecked when no config exists.
  • B tokens are bound to devices, and contact lookups no longer return full tokens (#101). /api/card/query/ returns only masked order ids and tokens; a full token is redeemed only with the random order id. A DB-issued B token serves only the device_ids an admin bound to it (api_token.allowed_device_ids, added automatically on first use); otherwise b_poll, b_result, identity upload and revoke return 403. The static RELAY_TOKEN is unaffected. b_poll requires a non-empty machine_id, and a second machine for the same device gets 409; the B relay falls back to the kernel boot_id, and B-app uses ANDROID_ID from service start. The admin console can bind devices when issuing a token or later.
  • Server rate limits and lottery hardening (#99, #100). The lottery allows 3 draws per client per day, counts an IPv6 /64 as one client, and caps wins at 5 per day across the site. The five sliding-window limiters share one implementation, hold at most 4096 keys per map and store over-long keys as hashes. Login is limited per IP (20 per minute) and per IP and username (5 per minute), so anonymous requests can no longer grow memory without bound.
  • Injection fixes in the admin console and the A WebUI (#97, #98). Admin console buttons use data-* attributes and delegated listeners instead of inline scripts built from the DeviceID, and keybox upload accepts only DeviceIDs matching [A-Za-z0-9._-] of 1–128 bytes. The A WebUI escapes app names and the keybox picker's file names, folder names and paths, and single-quotes the paths in its root shell commands, so a crafted file name in shared storage can no longer run commands.
  • KeyMint relay requests leave the TA mutex (#105). Keyblob version checks read only the cached relay profile, which is prefetched once before the lock is taken and backs off from 2 s up to 30 s after failures. A challenged remote generateKey finishes relay attestation outside the lock and then re-locks to seal the keyblob. When the relay is unreachable, other KeyMint calls at the same security level no longer queue behind network timeouts. Routing, error mapping and auth-bound key storage are unchanged.
  • cpu-mask in-app logs follow the debug switch (#104, #106). MaskCPU logcat lines inside the target app are written only while Diagnostics → Enable debug logging is on, in release and debug builds alike. The root companion reads the switch at each target-app launch, so restart the target app after changing it. With the switch off a masked app cannot read these traces; the root companion's MaskCPU lines are always written, and the WebUI "Device property view" diagnostic relies on them. KeyMint's default log_level is now info, so debug logging starts off on new installs.
  • Documentation (#103). The READMEs and the Server README describe the behavior and limits above.

Upgrade: for relay mode, update A, B, Server and B-app together. A Server with a self-signed certificate needs its public-key pin on both A and B (or an explicit opt-in to no verification); otherwise requests fail certificate verification. An A config that already saved tls_insecure = true keeps its behavior. Existing DB-issued B tokens start unbound after the upgrade and serve nothing until an admin binds their device_ids. Keybox uploads with other characters in the DeviceID are rejected. A saved log_level = "debug" on existing devices is not rewritten, so debug logging stays on until you turn it off in WebUI. Update A as a complete module so KeyMint and the injector stay in sync, then refresh WebUI.

Validation: each PR passed host-side fmt, clippy and test compilation for the A/B Android targets, Server unit tests, and the WebUI and UI tests; #97 and #101 were also checked end to end against a local Server and database. This release was not tested on a device; relay TLS, B device binding and the out-of-lock KeyMint requests still need on-device acceptance.

完整提交对比 / Full changelog · Release build

Ommega 2.4.3

Choose a tag to compare

@github-actions github-actions released this 19 Nov 00:53

中文

本版涉及 A、B 和 Server。B-app 与 StrongBoxCapabilityMask 仅同步产品版本号。

  • A 端 SPL 只读化(#91、#92)。 A 端以启动时读取的原生固件版本为依据,移除 SPL 写入入口,不再重放旧的覆盖配置;应用属性视图也保留本机 SPL。「设置 → 诊断与支持 → SPL 来源与差异」只展示已发布的来源和状态,不触发中继或 HAL 请求。
  • 中继出证准入(#91、#93)。 物理 B 端在硬件调用前核对版本快照及其修订号。A、B 的 OS 版本、System SPL、Vendor SPL 必须一致;Boot SPL 的差异仅供诊断,B 缺少 Boot 字段不再单独导致拒绝。返回证书仍按 B 的版本快照校验,Server 不用本机 keybox 替代受保护的物理 B 路径。
  • 区分暂时断连和验证失败(#94)。 取不到中继 profile 时按「暂不可用」处理;已确认的版本或证书不匹配仍拒绝。只有配置明确允许且不要求远端硬件链的新建请求才可本地回退,默认不变。
  • 单应用认证签名策略(#95)。 默认「自动」;符合条件的新密钥选「支付兼容」时在 A 端认证并签名、由本地 keybox 签发证书,选「保持认证要求」时由 B 端保留认证要求并签名。全局作用域下的普通应用和已手动加入且通过身份检查的系统应用均可显式覆盖。WebUI 区分继承与手选,安装 AProbe 不再改写认证策略。已有密钥不变。
  • 随包 AProbe(#96)。 从 1.8.8-paytm(versionCode 19)更新至 1.8.9-paytm(versionCode 20),签名证书未变。成对 dAtt 诊断会把受本地密钥生成时序整形影响、无法可靠比较的结果标为「无法判定」,不再报成命中。

升级:本地模式只需更新 A 端;中继模式请成套使用本版 A、B、Server。A 端需使用整包使同版 KeyMint 与注入器一同生效,再刷新 WebUI。旧的显式 SPL/OS 覆盖会报告 migration-required;不自动改写原配置或密钥,也不要降补丁级别、清除 Keystore 或凭据数据来处理。

验证:发布流水线校验 A/B Android 模块、两种 Linux 架构的 Server、APK、WebUI 及完整资产清单。本次发版未部署或在设备上执行验收;中继与认证签名的实机行为仍需使用各自正常业务流程验证。

English

This release changes A, B and Server. B-app and StrongBoxCapabilityMask only receive the synchronized product version.

  • Read-only A-side SPL (#91, #92). A uses its native firmware version snapshot from startup. SPL editors and legacy override replay are removed, and the application property view retains the host SPL. Settings → Diagnostics and support → SPL sources and differences shows published sources and status without requesting a relay profile or calling a HAL.
  • Guarded relay attestation (#91, #93). Physical B checks its version snapshot and revision before hardware key creation. A and B must agree on OS version, System SPL and Vendor SPL. Boot SPL differences are informational, and a missing Boot field on B is not by itself a rejection. Returned certificates are still checked against B's snapshot. Server-side keybox fulfilment does not substitute for the guarded physical-B path.
  • Transient unavailability is distinct from failed verification (#94). An unreachable relay profile is treated as unavailable rather than as a mismatch. Confirmed version or certificate mismatches still fail. Local fallback remains opt-in and is limited to new requests that do not require a remote hardware chain.
  • Per-app authentication signing (#95). Auto remains the default. For eligible new keys, Payment compatibility authenticates and signs on A with local keybox issuance; Preserve authentication keeps the requirements and signs on B. Overrides apply to ordinary apps in global scope and to manually added system apps that pass the existing identity checks. WebUI distinguishes inheritance from an explicit choice, and AProbe installation no longer changes these choices. Existing keys are unchanged.
  • Bundled AProbe (#96). Updates from 1.8.8-paytm (versionCode 19) to 1.8.9-paytm (versionCode 20) with the same signing certificate. The paired dAtt diagnostic reports an inconclusive result instead of a false hit when local key-generation timing shaping makes the comparison unreliable.

Upgrade: local mode only needs the A update; use matching A, B and Server builds for relay mode. Update A as a complete module so KeyMint and the injector stay in sync, then refresh WebUI. Existing explicit OS/SPL overrides report migration-required with the original configuration and keys preserved. Do not lower patch levels or clear Keystore or credential data as a workaround.

Validation: the release pipeline checks the A/B Android modules, Server for both Linux architectures, the APKs, WebUI and the complete asset manifest. This release was not deployed or tested on a device; relay and authentication signing still require normal on-device acceptance.

完整提交对比 / Full changelog · Release build

Ommega 2.4.2

Choose a tag to compare

@Andrea-lyz Andrea-lyz released this 12 Nov 20:40

2.4.2 — 2026-11-12

A 端自动续签、本地出证时序与 WebUI 暗色显示(仅 A 端;B、Server 无改动,无需单独更新 Server)。

自动续签的三个独立缺陷

  • 会漏签。 续签线程原先用相对的 thread::sleep 等待,在 Android 上该等待基于不计入深度
    休眠的时钟。于是「7 个清醒小时后到期」的等待会跨过整夜休眠继续挂着:TEE 证书进入续签窗口、
    甚至越过到期时间,也从未开始签发,页面与日志都显示健康——因为根本没有发起过尝试。现在改为在
    绝对墙钟截止时间上等待(clock_nanosleep 配 CLOCK_REALTIME 与 TIMER_ABSTIME):
    休眠经过的时间与系统校时都计入,信号中断后沿用同一截止时间而不是重新计时,其他内核错误记录后
    回退两分钟、不会忙循环。等待仍限制在 2 分钟到 1 天之间。它不会唤醒休眠中的设备,到期的
    截止时间会在设备恢复运行时立即处理。
  • 自己把自己锁死。 auto-run 先取签发锁,随后调用的 issue() 又对同一个文件加锁;flock
    按打开的文件描述持有,同一进程内第二次必然失败。于是每一次无人值守续签都报「已有签发在进行中」
    而从不真正签发,6 小时退避又把重试推到更后面。现在拆成调用方持锁的 issue_locked() 与自行
    取锁的 issue()。
  • 失败不显示。 无人值守的失败原先只写进 feedback.json,而它在下一次状态读取时就被覆盖;
    policy.json 的 last_error 一直是空,页面因此长期显示健康的卡片。现在把原因和尝试时间一起
    持久化,在 status 中暴露并渲染到 RKP 卡片上。

本地出证时序

  • 本地出证(attested)的 generateKey 与未校验的一次消耗相同的 secure-world 时间片,成对比较
    两者的校验方因此测得接近零的增量:10 组配对里有 4~6 组差值为非正,dAtt/initSign 停在 0.1
    附近。普通 Operation 延迟补不上这个差,因为两条路径都要付。
  • 新增 RetrieveCertSigningInfo 钩子,在本地叶证书成功编码之后、密钥可被封存或被观察到之前,
    计入一次采样自 24–40 ms 的证书开销。覆盖热 keybox 缓存、调用方指定的本地签发者、本地出证的
    认证兼容密钥与允许的远程回退;自签名叶、生成失败与远程返回的链不计入。
  • A 端实测:dAtt 2.0/−2.2/−2.9 ms 变为 32.9/39.2/35.0 ms,非正配对 4/6/5 变为 0/0/0。

WebUI 暗色

  • 诊断页日志框在暗色下不可读。两个缺陷叠加:底色引用 --om-surface-alt,而这个变量从未被任何
    主题定义,永远落到浅色字面兜底;唯一的暗色覆盖又挂在 .om-modern[data-theme=dark] 上,但主题
    实际写在 :root,那条规则不可能命中。实测暗色对比度仅约 1.04。现在浅色与两条暗色主题路径都
    定义了该变量,日志框只引用 token,实测为 rgb(27,30,39) 底配 rgb(240,239,247) 字,满足
    WCAG AA。

随包组件

  • 模块内置的 AProbe 从 1.6(versionCode 7)更新到 1.8.8-paytm(versionCode 19),带聚焦的时序
    诊断。签名身份不变(CN=Ommega AProbe),可直接覆盖升级。

升级说明:只更新 A 端模块 ZIP 即可,B 端与 Server 无需改动。

  • 自动续签修复位于 keymint 守护进程内,必须通过模块部署流程重载,仅替换 ommega-rkp 工具
    不会生效
    。安装后原有用例、已导入的种子与已签发的 keybox 全部保留。
  • 出证时序改动在 KeyMint 与 TA 两侧,同样需要重载守护进程生效。
  • WebUI 修复需要模块重新打包后刷新页面;建议同时强制刷新一次以避开 WebView 缓存。
  • 若你的 TEE 证书已经临近或越过到期时间,本次更新不会追溯补签:部署后请在「设置 → 自动化」
    确认状态,必要时手动签发一次。手动签发会消耗一次注册身份,属于设备侧操作。

验证:CI 全绿(A、B、Server、APK、UI)。新增 7 项续签计时回归、3 项主题对比度回归与出证时序的
配对断言,均在本地通过;把实现改回相对等待、恢复字面兜底或去掉时序计入时对应回归会失败。暗色
日志框经桌面 Chromium 以同一份 CSS 实测计算颜色确认;出证时序在 A 端实测(见上)。尚未在真机
WebView 内验证,也未在设备上验证自动续签能按时触发
,这两项仍需实机验收。


2.4.2 — 2026-11-12

A-side automatic renewal, local attestation timing and a dark-mode WebUI fix
(A only; B and Server are unchanged, no Server update is required).

Three independent defects in automatic renewal

  • It could silently skip issuance. The renewal thread waited with a relative
    thread::sleep, which on Android runs on a clock that excludes deep sleep. A
    wait of "seven awake hours" therefore stayed pending across a full night of
    suspension: a TEE chain could enter its renewal window, pass its due time, and
    never be re-issued, while the page and logs still looked healthy — because no
    attempt had started at all. That is the reported case: policy enabled, seed
    decryptable, TEE already due, and the thread still holding the wait it
    scheduled that morning. The thread now waits on an absolute wall-clock
    deadline
    (clock_nanosleep with CLOCK_REALTIME and TIMER_ABSTIME), so
    suspended time and clock corrections both count. An interrupted wait reuses the
    same deadline instead of restarting a delay, and an unexpected kernel error logs
    and backs off two minutes rather than busy-looping. The wait stays clamped
    between two minutes and one day. It does not wake a suspended device; an
    elapsed deadline is handled as soon as the device resumes.
  • It deadlocked on its own lock. auto-run took the issuance lock and then
    called issue(), which took the same file lock again. flock is held per open
    file description, so the second acquisition inside one process always failed:
    every unattended renewal reported "an issuance is already in progress" and never
    issued, while the six-hour backoff pushed the retry even further out. It is now
    split into caller-locked issue_locked() and self-locking issue().
  • It hid its failures. An unattended failure was only written to
    feedback.json, which the next status read replaces, and policy.json kept an
    empty last_error, so the page showed a healthy card for days. The reason is
    now persisted next to the attempt time, exposed in status and rendered on the
    RKP card.

Local attestation timing

  • A local attested generateKey spent the same secure-world band as an
    unchallenged one, so a validator pairing the two generations measured a
    near-zero increment: 4–6 of 10 paired deltas were non-positive and
    dAtt/initSign stayed near 0.1. Ordinary Operation latency cannot close that,
    because both paths pay it.
  • A RetrieveCertSigningInfo hook now accounts one sampled 24–40 ms of
    certificate work after a local leaf is encoded and before the key can be sealed
    or observed. It covers a warm keybox cache, a caller-selected local issuer,
    locally certified authentication-compatible keys and permitted remote fallback;
    self-signed leaves, failed generation and remotely returned chains do not pay it.
  • Measured on the A device: dAtt 2.0/−2.2/−2.9 ms became 32.9/39.2/35.0 ms, and
    non-positive pairs 4/6/5 became 0/0/0.

WebUI dark mode

  • Diagnostics log boxes were unreadable in dark mode. Two mistakes compounded: the
    background referenced --om-surface-alt, which no theme block ever defined, so
    it always took a light literal fallback; and the only dark override was scoped to
    .om-modern[data-theme=dark] while the theme is written to :root, so it could
    never match. The measured dark contrast was about 1.04. The token is now defined
    for light and both dark paths, the box references the token alone, and the
    measured dark result is rgb(240,239,247) on rgb(27,30,39), meeting WCAG AA.

Bundled component

  • The bundled AProbe moves from 1.6 (versionCode 7) to 1.8.8-paytm
    (versionCode 19), carrying the focused timing diagnostics. The signing identity
    is unchanged (CN=Ommega AProbe), so it upgrades in place.

Upgrade notes: update the A-side module ZIP only; B and Server need no change.

  • The renewal fixes live inside the keymint daemon, so they require the module
    deployment flow to reload the daemon — replacing the ommega-rkp tool alone has
    no effect
    . Existing policy, the imported seed and every issued keybox are kept.
  • The attestation-timing change spans KeyMint and the TA and likewise needs the
    daemon reloaded.
  • The WebUI fix needs the module to be repackaged and the page refreshed; a forced
    refresh avoids a stale WebView cache.
  • If your TEE chain is already near or past expiry, this update does not
    retroactively renew it: check Settings → Automation after deploying and issue
    manually if needed. A manual issuance spends one registration identity and is a
    device-side operation.

Validation: CI is green (A, B, Server, APKs, UI). Seven renewal-timing
regressions, three theme-contrast regressions and the paired timing assertions
pass locally; reverting to the relative wait, restoring the literal fallback or
dropping the timing charge makes the matching regression fail. The dark log box
was measured with computed colours in desktop Chromium using the same CSS, and the
attestation timing was measured on the A device. It has not been verified inside
a real-device WebView, and automatic renewal was not observed firing on a
device
; both still need on-device acceptance.

Full Changelog: v2.4.1...v2.4.2

Ommega 2.4.1

Choose a tag to compare

@Andrea-lyz Andrea-lyz released this 09 Nov 03:41

2.4.1 — 2026-11-09

本地模式下的诊断修正。

  • 修复本地模式下诊断页误报「当前模式:中继」:模式改为读取守护进程的 data/relay-mode。
  • 修复调试日志总阀切换后「已完成复现,解锁诊断」按钮不立即出现(状态刷新被节流)。
  • 请求异常把 keystore 代理(uid 1017)上的失败归因到真正发起请求的应用,不再被当作系统身份隐藏。
  • 共享 uid 的应用(例如 Google Play 服务 10120 / 99910120)能正确解析包名。
  • 受管列表之外的应用通过 KernelSU 桥接读取真实应用名(如「融合搜索服务」「Google Play 服务」)。
  • 诊断测试增至 10 项,覆盖失败归因与共享 uid 解析。

2.4.1 — 2026-11-09

Diagnostics accuracy in local mode.

  • The KeyMint page no longer reports relay mode while the daemon runs locally; the mode now comes from data/relay-mode.
  • Toggling the debug-logging switch updates the unlock button immediately instead of waiting for the throttled refresh.
  • Failures reported against the keystore proxy (uid 1017) are attributed to the requesting app instead of being hidden as a system identity.
  • Shared-uid packages such as Google Play services (10120 / 99910120) resolve to their package name.
  • Packages outside the managed list get their real label through the KernelSU bridge.
  • Diagnostics tests grew to 10 cases covering failure attribution and shared-uid parsing.

Full Changelog: v2.4.0...v2.4.1

Ommega 2.4.0

Choose a tag to compare

@Andrea-lyz Andrea-lyz released this 09 Nov 02:54

2.4.0 — 2026-11-09

A 端诊断重构、指纹签名可选签发链与设备属性视图修复。

诊断

  • 设置里的诊断改为分级页面:一个调试日志总阀、复现问题后解锁、七个功能子页(请求异常、设备体检、KeyMint、注入器、中继连接、设备属性视图、SOTER)。
  • 请求异常按应用聚合,显示应用名称、包名、原因、发生次数与最后时间;系统身份(keystore 等)默认隐藏;概览页同步展示。
  • 设备体检在 WebUI 内原生执行,不依赖外部应用;AProbe 作为可选组件打包(发布签名),一键安装并自动加入属性视图与自动授权策略。
  • 总阀同时接管本地与中继的 KeyMint / 注入器等级;新增清除日志、日志轮转上限(2/4/10/20 MB)与 SOTER 详细叙述。

指纹签名

  • 本地签发的认证绑定密钥新增签发 keybox 选择:TEE 或 StrongBox 槽位二选一,可直接导入 Samsung StrongBox keybox;槽位缺失时回退并明确记录。
  • 认证绑定的指纹签名改由 A 端本地出证,中继模式下不再出现 KEY_USER_NOT_AUTHENTICATED。

修复

  • 设备属性视图:向 *_for_attestation 发布目标身份、跳过无法改写的长属性、宿主缺失属性不再中断视图,解决部分应用的 -66。
  • keybox 槽位与签发 keybox 选择文件的属主统一为 keystore:keystore 0600;导入与启动时自动归一化;TA 改读规范路径。

性能

  • 诊断数据缓存与节流、日志有界读取、应用列表离屏渲染,页面切换约 30–50 ms。

2.4.0 — 2026-11-09

A-side diagnostics rework, selectable fingerprint certificate issuer, and device-property view fixes.

Diagnostics

  • Staged diagnostics area: one debug-logging switch, unlock after reproducing, and seven feature pages (request failures, device probe, KeyMint, injector, relay, device-property view, SOTER).
  • Request failures aggregate per app with name, package, reason, count and last time; system identities are hidden by default; the overview shows the same summary.
  • The device probe runs natively in the WebUI. AProbe ships as an optional release-signed component that can be installed from the page and is registered for property view and the automatic auth policy.
  • The master switch now covers KeyMint and injector levels in both local and relay mode, with log clearing, rotation limits (2/4/10/20 MB) and SOTER narration.

Fingerprint signing

  • Locally certified authentication-bound keys can be issued from the TEE or the StrongBox keybox slot, including an imported Samsung StrongBox keybox; a missing slot falls back with an explicit log.
  • Authentication-bound fingerprint signing is certified on A, so relay mode no longer returns KEY_USER_NOT_AUTHENTICATED.

Fixes

  • Device-property view publishes the target identity to *_for_attestation, skips long values it cannot rewrite, and keeps host-absent properties from aborting the view, fixing -66 for affected apps.
  • Keybox slots and the issuer-selection file are owned by keystore:keystore at 0600; imports and boot normalize them, and the TA reads the canonical path.

Performance

  • Diagnostics cache and throttling, bounded log reads and offscreen app-card rendering keep page switches around 30–50 ms.

Full Changelog: v2.3.1...v2.4.0

Ommega 2.3.1

Choose a tag to compare

@github-actions github-actions released this 02 Nov 21:56

2.3.1 — 2026-11-02

修复 2.3.0 安装包缺少 ommega-rkp。

  • 2.3.0 的模块 ZIP 内包含 ommega-rkp,但安装脚本逐个解压二进制,没有把新工具加进列表,安装后
    「设置 → 自动化」整页状态显示不可用(工具不存在)。
  • 现在安装脚本按 ABI 解压并校验 ommega-rkp,缺失时安装会直接失败而不是静默留空。
  • CI 新增门禁:prepare 会核对 build.py 打包的每个二进制都出现在安装脚本里。
  • 本版仅安装脚本变化,A 端功能与 2.3.0 相同;已装 2.3.0 的设备直接覆盖安装 2.3.1 即可,数据与已签发
    的 keybox 全部保留。

2.3.1 — 2026-11-02

Fixes the missing ommega-rkp in the 2.3.0 package.

  • The 2.3.0 ZIP contained ommega-rkp, but the installer extracts binaries by
    name and the new tool was never added to that list, so after installation the
    whole Settings → Automation page reported its backend as unavailable.
  • The installer now extracts and verifies ommega-rkp per ABI and aborts instead
    of silently leaving it out.
  • CI now checks in prepare that every binary packaged by build.py also appears
    in the installer list.
  • Only the installer changed; A-side behaviour is identical to 2.3.0. Devices on
    2.3.0 can install 2.3.1 over it and keep all data and issued keyboxes.

Full Changelog: v2.3.0...v2.3.1

Ommega 2.3.0

Choose a tag to compare

@github-actions github-actions released this 02 Nov 20:19

本版安装包缺少 ommega-rkp,安装后「设置 -> 自动化」不可用;请使用 2.3.1。

2.3.0 — 2026-11-02 A 端自动化页与 RKP 签发(仅 A 端;B、Server 无改动,无需单独更新 Server)。 - 「设置 → 自动化」由浮窗改为完整二级页面,移除原有的四项 keybox 下载来源:改为导入用户自备的 CDI 材料包与 keybox,TEE 与 StrongBox 各自一个槽位,互不复用。 - 材料包沿用 RKP 工作台的 version 1 约定(dice_chain_hex / signing / device / issuance)。内容以 AES-256-GCM 加密保存于 data/rkp/seed.enc,密钥是每台设备随机生成的 data/rkp/master.key(均 0600);从其它设备拷回的密文会显示「无法解密」,而不是等到签发时才 失败。模块不内置任何种子或证书。 - 移植 Duck ToolBox 的 RKP 引擎(MIT,a-side/source/rkp-engine):每次签发取新 challenge、 生成新的 P-256 证明密钥、用导入的叶身份签 CSR v3,校验返回链后导出 keybox。签发结果与手工导入 走同一套槽位校验,链的级别与 O= 必须和所选槽位一致。 - 新增 ommega-rkp 工具:status / due / seed-import / seed-remove / keybox-import / policy / issue / auto-run。签发前会按目标槽位自动改写材料包里的 security_level,避免用为 TEE 捕获的材料去签 StrongBox。 - 自动续签:按服务器下发的 time_to_refresh_hours 计算临期。keymint 守护进程启动 5 分钟后首次 检查,之后睡到下一个临期时刻(上限 1 天,空闲时每天一次),失败后 6 小时内不重试;与手动 签发共用文件锁,网络与 keybox 写入都在子进程,不会阻塞 TA。 - 应用策略页在本地模式下自动隐藏「认证签名策略」「本地 keygen 时序整形(EWMA)」「CPU 与设备 属性」三张卡片,远程模式照常显示。 - 修复本地模式下顶部刷新总是提示「部分状态无法读取,请重试」。 - 修复 keybox 到期时间解析把 UTCTime 的两位年当成四位年,导致显示成 2611 年。 升级说明:只更新 A 端模块 ZIP 即可,B 端与 Server 无需改动。更新后刷新 WebUI 生效;keymint 由 部署流程重载,无需重启设备。 验证:CI 全绿(A、B、Server、APK、UI)。真机 PJZ110 上验证了 TEE 与 StrongBox 两级签发并安装 到对应槽位(链为 O=TEE / O=StrongBox,各 4 张证书)、引擎 29 项单元测试在设备通过、自动 续签首轮判定「未临期」且未消耗请求。 --- ## 2.3.0 — 2026-11-02 A-side automation page and RKP issuance (A only; B and Server are unchanged, no Server update is required). - Settings → Automation is a full page instead of a sheet. The four keybox download sources are gone: the page imports the user's own CDI material bundle and keybox files, one slot each for TEE and StrongBox, never shared. - The bundle keeps the RKP workbench version 1 contract (dice_chain_hex, signing, device, issuance). It is stored AES-256-GCM encrypted at data/rkp/seed.enc with a per-install key at data/rkp/master.key (both 0600); a blob copied from another device reports as undecryptable instead of failing at issue time. The module ships no seed and no keybox. - The RKP engine is ported from Duck ToolBox (MIT, a-side/source/rkp-engine): each issuance requests a fresh challenge, generates a new P-256 attestation key, signs CSR v3 with the imported leaf identity and exports the verified chain. An issued keybox passes the same slot checks as an imported one: the chain level and O= must match the slot. - New ommega-rkp tool: status, due, seed-import, seed-remove, keybox-import, policy, issue, auto-run. Issuance rewrites security_level in the stored bundle to the target slot, so material captured for TEE cannot be spent on a StrongBox request. - Automatic renewal follows the server-provided time_to_refresh_hours. The keymint daemon checks five minutes after start and then sleeps to the next renewal instant (capped at one day, so one check per day while idle); a failed attempt is not retried for six hours. It shares an flock with the manual path, and the network and keybox work run in a child process, never in the TA. - The per-app policy page hides the authentication-signing, local-keygen EWMA and CPU/device-property cards in local mode; remote mode is unchanged. - Fixed the top refresh reporting "some status could not be read" in local mode. - Fixed keybox expiry parsing treating a two-digit UTCTime year as four digits, which displayed 2611. Upgrade: update the A module ZIP only. B and Server need no change. Refresh the WebUI afterwards; the deploy flow reloads keymint, no reboot needed. Verified: CI green (A, B, Server, APKs, UI). On a PJZ110 device both TEE and StrongBox issuance completed and installed into their slots (chains O=TEE / O=StrongBox, four certificates each), the 29 engine unit tests pass on the device, and the first automatic check reported "not due" without spending a request. Full Changelog: v2.2.2...v2.3.0

Ommega 2.2.2

Choose a tag to compare

@github-actions github-actions released this 01 Nov 16:33

Ommega 2.2.2

本次发布把 A 端 SOTER 从「一套全局身份」扩展为「按应用分配身份」,并补齐身份管理界面与请求计数。B 端与 Server 没有代码改动,版本号随发布统一。

A 端

按应用的 SOTER 身份

  • 三类身份:本地随机(软件 TA 自己生成设备 ID 与密钥)、导入私钥(真机 ATTK 派生的身份,导入时在设备端校验 RSA-2048 / e=65537 并做自签名自检)、远程中继(使用自己的 URL、token、设备 ID)。
  • 身份存储:/data/misc/keystore/ommega/data/soter/identities.json(0600)。三类记录都启用 deny_unknown_fields;解析失败或规范文件消失时拒绝服务,不静默回落到旧配置。
  • 无 UID 的 getDeviceId 与 ATTK 三件套按「默认身份」应答且不经中继,客户端拿它与自己 ASK 的 cpu_id 比对时保持一致。
  • 签名会话绑定 UID、身份版本、后端、厂商 handle 与 AuthKey 代次;改身份或换材料会作废旧会话,不会串签。

SOTER 总控

  • 身份页顶部开关只写看门狗标志,接管与回滚由看门狗执行;关闭后所有应用回落到原厂 HAL,身份与分配关系保留。
  • 移除「重启软件 TA」:无法与用户意图绑定的重启是共享 TA 不稳定的来源,总控的「先关再开」已覆盖合法场景。

应用列表

  • 新增「SOTER N 次」角标:TA 按 uid 计数,soter-read 以包名映射一次返回,仅在总控开启时渲染。
  • 与「证书 N 次」同款胶囊、绿色区分;短名称与徽章同行,长名称整组换行,名称不截断。

管理接口

  • ommega-auth-policy 新增 soter-read / soter-write / soter-import:目录锁、比较-替换、原子替换 + fsync + 读回校验。
  • 私钥由 Rust 按设备路径读取并校验,不经过 WebUI,也不进 shell 命令行;读接口不返回私钥或账本原始字节。

修复

  • 反回滚计数器:每应用只增不减,带时钟下限 max(账本+1, 当前秒)。此前「换新 ASK 从 1 重新开始」在真机被服务端以 counter is not greater than that in server 拒绝。
  • 自动认证签名的兼容性回归。
  • 看门狗状态备注改为按发布状态推导:停用后不再残留旧的启动失败原因。
  • 应用列表在无计数卡片上反复创建/删除徽章容器导致的界面卡死。

B 端 / Server / APK

  • 无代码改动:B 模块、relay_rs、两个 APK 仅随版本号一起发布。

升级说明

  1. 只需更新 A 模块;KSU/Magisk 管理器可直接检查更新,ommega-a-update.json 指向本页 latest 资产。
  2. A 模块安装后 service.sh 会重启注入器与裸服务;SOTER 开关与身份配置保留,已绑定应用(如微信指纹支付)无需重新开通。
  3. Server 与 B 端无需更新;若想统一版本号可一并升级,行为不变。
  4. 更新后刷新 WebUI;若管理器缓存了旧页面,强制刷新一次。

验证

  • 本地:cargo fmt --check、clippy -D warnings、Android --no-run、52 个 SOTER 单测、148 项界面/胶水测试、隔离浏览器三组语言与尺寸。
  • A 实机:微信指纹支付开通成功(判词 a1=0 a2=0)、SoterChecker 全项通过、按应用中继以回环地址验证命中、总控与应用策略卡联动、SOTER 计数随调用增长。
  • B:本版无 B 端改动,未做新的实机复测。

已知限制

  • getDeviceId / ATTK 事务没有 UID 参数,只能代表默认身份;显式分配其他身份的应用天然对不上。
  • 反回滚计数器按设备/账号只增不减,换身份不会把计数改小。
  • 具名中继失败不回落到本地(fail-closed),这是有意设计。

资产

文件 说明
ommega-a-release-arm64-v8a-2.2.2-*.zip / ommega-a-latest.zip A 模块(arm64-v8a)
ommegaclient-b-release-arm64-v8a-2.2.2-*.zip / ommega-b-latest.zip B 模块(arm64-v8a)
relay_rs-linux-x86_64-musl、relay_rs-linux-aarch64-static 中继服务端二进制
Ommega-B-app-2.2.2-debug-signed.apk 可选 B 端 APK
StrongBoxCapabilityMask-2.2.2-debug-signed.apk 可选能力检测 APK
ommega-a-update.json、ommega-b-update.json、SHA256SUMS、build-info.json 更新元数据与校验

校验方式:下载 SHA256SUMS 后 sha256sum -c SHA256SUMS。


English

2.2.2 turns SOTER on A from one global identity into per-application identities, with the matching management UI and request counters. B and Server have no code changes; versions stay in step.

What changed on A

  • Per-app identities. Local random (the TA mints its own device id and key), imported private key (validated on device: RSA-2048, e=65537, self-test), and remote relay (its own URL, token and device id). The store lives at /data/misc/keystore/ommega/data/soter/identities.json (0600) and fails closed on any parse error instead of falling back to stale configuration.
  • UID-less metadata (getDeviceId and the ATTK trio) answers from the default identity without relaying, so a client comparing it with its own ASK stays consistent. Sign sessions bind UID, identity revision, backend, vendor handle and AuthKey generation; changing an identity or its material revokes them.
  • Master switch on the identity page writes only the watchdog flag; turning SOTER off keeps assignments and falls back to the stock HAL for every app. The separate "restart software TA" action is gone.
  • Application list shows a "SOTER N" pill next to the certificate counter, in green, rendered only while SOTER is on; a long name wraps both pills together and is never ellipsised.
  • Management uses the Rust writer (soter-read / soter-write / soter-import) with a directory lock, compare-and-swap, atomic replace, fsync and readback. Private keys are read on device by path and never enter the page or a shell command line.
  • Fixes: the anti-rollback counter is monotonic per application with a clock floor (registering WeChat previously failed with counter is not greater than that in server); an automatic authentication signing regression; the watchdog status note is derived from the published state; and a freeze caused by the app list recreating an empty badge container.

Upgrade: update the A module only. Installing it restarts the injector and the bare service; SOTER state and assignments persist, so bound applications such as WeChat do not need to register again. Server and B need no update. Refresh the WebUI afterwards.

Validated: local Rust gate (fmt, clippy -D warnings, 52 tests), 148 UI/glue tests, a packaged browser run at three languages and widths, and on device A: WeChat fingerprint payment registration, SoterChecker, a loopback relay probe for one application, and the counter badge. B was not re-tested because it does not change.

Known limits: UID-less calls can only represent the default identity; the anti-rollback counter never decreases per device/account; a named relay fails closed instead of signing locally.

Ommega 2.2.1

Choose a tag to compare

@github-actions github-actions released this 31 Oct 14:23
ddf356d

What's Changed

Full Changelog: v2.2.0...v2.2.1