Repository navigation
Ommega 2.2.2
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 仅随版本号一起发布。
升级说明
- 只需更新 A 模块;KSU/Magisk 管理器可直接检查更新,
ommega-a-update.json指向本页 latest 资产。 - A 模块安装后
service.sh会重启注入器与裸服务;SOTER 开关与身份配置保留,已绑定应用(如微信指纹支付)无需重新开通。 - Server 与 B 端无需更新;若想统一版本号可一并升级,行为不变。
- 更新后刷新 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 (
getDeviceIdand 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.