Skip to content
KernelSU Modules

Oh My Keymint

Immutable release Synced

Custom keystore implementation for Android Keystore Spoofer

Description

Oh My Keymint

Telegram CI Build

Custom keystore implementation for Android Keystore Spoofer

What is this?

This is a complete implementation of the keystore, which fully implements the AOSP AIDL interface, referencing the official AOSP implementation.

In theory, this would make it harder for detectors to identify behavior inconsistent with AOSP, thus achieving greater stealth than the FOSS branch of TrickyStore or other TrickyStore-based module like TEESimulator.

Install and configure

Android 13 or above required.

  1. Install this module.

  2. Configure OMK if needed.

  3. Replace template keybox.xml (if you need)

The keybox file should be a valid XML file with at least the EC chain; when no RSA entry is present, attestation for RSA keys is signed with the EC key and its certificate chain. There should be no extra content in it like watermark or invisible characters.

The active files are /data/misc/keystore/omk/config.toml and /data/misc/keystore/omk/injector.toml. Read the Configuration Guide for complete annotated examples, field-by-field explanations, safety notes, and restart requirements.

Restarting keymint and injector

The module ships two background daemons: one for keymint, one for injector. You can restart them by following commands.

touch /data/adb/omk/restart.keymint
touch /data/adb/omk/restart.injector
touch /data/adb/omk/restart.all

See the Configuration Guide for which changes need a component restart or a full device reboot.

How do i submit issue report?

Use an Issue form and complete every required field and checkbox. Non-template issues are automatically closed. Write issues yourself; do not use an LLM to create them or copy LLM-generated descriptions or phrasing. Read the Issue rules and AI policy first.

License

YOU MUST AGREE TO BOTH OF THE LICENSE BEFORE USING THIS SOFTWARE.

General License Agreement

OhMyKeymint - Custom keymint implementation for Android Keystore Spoofer
Copyright (C) 2026 James Clef <[email protected]>

This program is open source software: you can redistribute it and/or 
modify it under the terms of the General License Agreement as
published by James Clef, either version 4 of the
License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
General License Agreement for more details.

You should have received a copy of the General License Agreement
along with this program.  If not, see <https://github.com/qwq233/license/>.

Oh My Keymint License

1. 除经本软件作者书面许可外,不得将本软件名称或与其近似的名称用于修改版、衍生作
   品或相关服务的命名、宣传;法律允许的指名性使用除外。本软件的修改版或衍生作品
   如与本软件存在明显区别,须使用其他名称。例如,包含不属于本软件原版的功能或附
   属资源,或使用本软件名称可能导致公众误认为该修改版由原项目作者发布、认可或存
   在关联,即属于此类情形。上述作品须保留本软件的著作权声明、作者署名及许可证文
   件并以显著方式标注该作品为本软件的衍生作品,且不得暗示本软件作者对其承担任何
   责任。即使不属于上述须更名情形的修改版或衍生作品,本软件作者认为有必要时,仍
   有权要求其更名。

2. 除非您所在的司法管辖区的适用法律另行规定,您同意将纠纷或争议提交至中国大陆境
   内有管辖权的人民法院管辖。

3. 本协议与General License Agreement共同发挥效力。

Credit

Some code from AOSP

License: Apache-2.0

Copyright 2022, The Android Open Source Project

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Releases

1.3.0-7742865

Latest

Version code 182 1.3.0-7742865

Download

What's changed

This release migrates OMK and the injector from rsbinder to Android's native Binder runtime. Binder objects, Parcels, and private Unix-socket RPC now use the device's Binder libraries, with shared interfaces generated by the official Android SDK Rust AIDL backend. Android 13 or above is now required.

Keystore interception now runs through native Binder callbacks and generated AIDL dispatchers. The ioctl hook redirects validated local receivers and tracks transaction lifetimes, replacing the previous manual Parcel parsing, reply rewriting, and operation-publication machinery. Caller UID, PID, and SELinux identity, transaction flags, interface metadata, and one-way calls follow the native dispatch path, with version-specific handling for older framework layouts and KeyMint parameter decoding.

Live security-level handles now follow the current caller filter and per-method intercept settings, returning to System when interception is disabled or the caller is no longer selected. Existing OMK operations remain bound to the RPC session that created them. RPC connection recovery now runs in the background and publishes the main, auth-token, and lifecycle connections together. Ordinary requests remain on System while connections are unavailable or confirmed stale, and OMK routing resumes after recovery. Calls already dispatched to OMK preserve its business errors and actual Binder failures without synthetic middleware error codes.

Authentication tokens now retain their original System MAC when received and cached. Before an OMK operation uses a token, System KeyMint verifies the MAC and OMK translates it for its own KeyMint. Successful translation is cached per operation for subsequent AAD, update, and finish calls, and translation failures trigger operation cleanup. The existing force_skip_system_biometric_hat_verification switch remains the explicit MAC-verification bypass.

System HAT verification now supports KeyMint devices exposed through android.security.compat, explicitly requests SHA-256 for HMAC verifier operations, and preserves authentication failures instead of collapsing them into a generic system error. Cached verifier keys are regenerated only when invalid or requiring an upgrade.

Payload fd handoff and remote-call cleanup were tightened, dependencies were updated, and builds now require Android SDK Build Tools 37.0.0 for AIDL generation.

Attestation

Full Changelog: https://github.com/qwq233/OhMyKeymint/compare/1.2.6-9069c6c...1.3.0-7742865

Assets 1

OhMyKeymint-release-arm64-v8a-1.3.0-7742865.zip 4.3 MiB

SHA-256 8991387df497c2b0feb1a61f101d1cfc5513a859c54633358a45ef65a642d8c8 · Attestations

Version code 180 1.2.6-9069c6c

Download

What's changed

This is a minor fix so i will keep old changelog.

These commit might fix some issue and align AOSP behavior.

1.2.5 changes

This release updates the KeyMint and Keystore implementation to Android 17, including KeyMint v5 and ML-DSA support on the TEE path. Compatibility with older Android releases has also been improved through corrected transaction layouts and attestation application-ID resolution. VINTF manifest assembly now follows libvintf more closely, and StrongBox is only exposed when the corresponding system KeyMint HAL is present.

The injector now backs its OMK security-level and operation handles with native Binder objects, and the hooking backend has switched from lsplt-rs to omhook. Binder replies, interface metadata, one-way transactions, empty key descriptors, and operation cleanup have been corrected. Hook initialization failures no longer panic inside keystore2. The injected payload also connects to OMK RPC directly, with separate authentication-token and lifecycle sessions and cached connections to reduce contention and request overhead.

Scoop routing now consistently follows the current caller, filter decision, and per-method intercept settings. Historical KEY_ID or GRANT ownership no longer overrides that decision, and disabled methods remain on System. OMK business errors are returned unchanged, while transport and reply-boundary failures are normalized to AOSP-compatible errors such as SYSTEM_ERROR instead of being hidden by a successful System reply.

Key derivation and compatibility with legacy OMK key and super-key formats were corrected. Stored legacy OS-version metadata is migrated to AOSP encoding, and lowering configured OS or patch levels no longer rejects existing OMK keys solely for carrying newer values. Failed localization discards only the affected mirrored auth token, and the existing force_skip_system_biometric_hat_verification switch takes effect correctly.

Attestation trust settings now include independent OS, vendor, and boot patch levels. os_version = "auto" follows the current Android major at KeyMint startup, and automatic boot patch detection reads AVB metadata or the boot image header before property fallbacks. Patch-level-only edits can update active TAs without rebuilding them, preserving in-flight operations and per-boot state. When automatic verified-boot key or hash discovery has no usable source, the generated fallback is pinned in config.toml so it stays stable across restarts.

Device-ID discovery now runs on demand through the privileged Binder helper with the correct system UID and Android-version-specific telephony transactions. It retries while required services are not registered and shares the resolved snapshot between TEE and StrongBox. Single-IMEI devices, absent MEID or IMEI2, partial probe success, and explicit empty overrides are handled without invalidating unrelated attestation IDs.

Keyboxes containing only a valid EC entry are now supported; RSA-key attestations use the EC signing key and certificate chain when the RSA entry is absent. Keybox rotation only retires keys actually attested by the previous keybox. The new main.retire_stale_keybox_bound_keys setting can preserve those client keys when required; retirement remains enabled by default.

Valid older configurations are migrated at startup to config.toml version 3 and injector.toml version 1. Migration from unversioned or version 1 KeyMint configs resets os_version to "auto"; keep all generated [crypto] values unchanged. The injector is now the only runtime backend, with legacy backend = "omk" accepted as an alias for "injector". Malformed files are no longer overwritten with defaults: an invalid KeyMint config prevents startup, an invalid injector config disables routing at startup, and failed live reloads retain the last valid configuration. Log levels now apply correctly, and logs are written under /data/misc/keystore/omk/logs/.

Additionally, injector and KeyMint overhead was reduced, module updates no longer create an omkdata symlink loop, and the daemon prefers /system/lib64 over /vendor/lib64 in its library search path. Dependencies were updated, formatting, Android-targeted Clippy, and cargo-deny checks were added to CI, and configuration and troubleshooting documentation was expanded. The project now uses the General License Agreement together with the updated Oh My Keymint License; read both before using or redistributing this release.

Attestation

Full Changelog: https://github.com/qwq233/OhMyKeymint/compare/1.2.5-17b0eb6...1.2.6-9069c6c

Assets 1

OhMyKeymint-release-arm64-v8a-1.2.6-9069c6c.zip 4.7 MiB

SHA-256 045d72dd0e5804001e3f227611e74df1eb0ac466747ff2aa0e8af8948f2e0d07 · Attestations

Version code 174 1.2.5-17b0eb6

Download

What's changed

This release updates the KeyMint and Keystore implementation to Android 17, including KeyMint v5 and ML-DSA support on the TEE path. Compatibility with older Android releases has also been improved through corrected transaction layouts and attestation application-ID resolution. VINTF manifest assembly now follows libvintf more closely, and StrongBox is only exposed when the corresponding system KeyMint HAL is present.

The injector now backs its OMK security-level and operation handles with native Binder objects, and the hooking backend has switched from lsplt-rs to omhook. Binder replies, interface metadata, one-way transactions, empty key descriptors, and operation cleanup have been corrected. Hook initialization failures no longer panic inside keystore2. The injected payload also connects to OMK RPC directly, with separate authentication-token and lifecycle sessions and cached connections to reduce contention and request overhead.

Scoop routing now consistently follows the current caller, filter decision, and per-method intercept settings. Historical KEY_ID or GRANT ownership no longer overrides that decision, and disabled methods remain on System. OMK business errors are returned unchanged, while transport and reply-boundary failures are normalized to AOSP-compatible errors such as SYSTEM_ERROR instead of being hidden by a successful System reply.

Key derivation and compatibility with legacy OMK key and super-key formats were corrected. Stored legacy OS-version metadata is migrated to AOSP encoding, and lowering configured OS or patch levels no longer rejects existing OMK keys solely for carrying newer values. Failed localization discards only the affected mirrored auth token, and the existing force_skip_system_biometric_hat_verification switch takes effect correctly.

Attestation trust settings now include independent OS, vendor, and boot patch levels. os_version = "auto" follows the current Android major at KeyMint startup, and automatic boot patch detection reads AVB metadata or the boot image header before property fallbacks. Patch-level-only edits can update active TAs without rebuilding them, preserving in-flight operations and per-boot state. When automatic verified-boot key or hash discovery has no usable source, the generated fallback is pinned in config.toml so it stays stable across restarts.

Device-ID discovery now runs on demand through the privileged Binder helper with the correct system UID and Android-version-specific telephony transactions. It retries while required services are not registered and shares the resolved snapshot between TEE and StrongBox. Single-IMEI devices, absent MEID or IMEI2, partial probe success, and explicit empty overrides are handled without invalidating unrelated attestation IDs.

Keyboxes containing only a valid EC entry are now supported; RSA-key attestations use the EC signing key and certificate chain when the RSA entry is absent. Keybox rotation only retires keys actually attested by the previous keybox. The new main.retire_stale_keybox_bound_keys setting can preserve those client keys when required; retirement remains enabled by default.

Valid older configurations are migrated at startup to config.toml version 3 and injector.toml version 1. Migration from unversioned or version 1 KeyMint configs resets os_version to "auto"; keep all generated [crypto] values unchanged. The injector is now the only runtime backend, with legacy backend = "omk" accepted as an alias for "injector". Malformed files are no longer overwritten with defaults: an invalid KeyMint config prevents startup, an invalid injector config disables routing at startup, and failed live reloads retain the last valid configuration. Log levels now apply correctly, and logs are written under /data/misc/keystore/omk/logs/.

Additionally, injector and KeyMint overhead was reduced, module updates no longer create an omkdata symlink loop, and the daemon prefers /system/lib64 over /vendor/lib64 in its library search path. Dependencies were updated, formatting, Android-targeted Clippy, and cargo-deny checks were added to CI, and configuration and troubleshooting documentation was expanded. The project now uses the General License Agreement together with the updated Oh My Keymint License; read both before using or redistributing this release.

Attestation

Full Changelog: https://github.com/qwq233/OhMyKeymint/compare/v1.2.0-67dc5e7...1.2.5-17b0eb6

Assets 1

OhMyKeymint-release-arm64-v8a-1.2.5-17b0eb6.zip 4.7 MiB

SHA-256 b033deb03a69be95e4d2c0b5a8c335b76f54b009ba8d7d0cb7edc1add2b53a84 · Attestations

Version code 155 1.2.0-preview-a1f3241

Download

This is a preview version and it's NOT stable

This preview release primarily switches the hooking backend; I am not entirely confident in its stability, so I am holding off on pushing the code for now to ensure everything is working correctly.

If you insist on using only packages that are FOSS and verified via attestation, you may want to skip this version.

If you encounter any issues, please open an issue or leave comments on discussion zone.


Update 1: fix some issues for newer kernel.

Assets 1

OhMyKeymint-release-arm64-v8a-1.2.0-a1f3241.zip 4.6 MiB

SHA-256 0d672020b1e20b88636af4afcde65cd18ff5294813b7f7d007bcdee5ee6cd9ac · Attestations

Transparency

Repository
qwq233/OhMyKeymint
Tag
1.3.0-7742865 Immutable release
Tag commit
7742865b4064
Content commit
e1b5e67856a2
SHA-256
8991387df497c2b0feb1a61f101d1cfc5513a859c54633358a45ef65a642d8c8
Last change synced

Verify it yourself

KernelSU Modules does not sign or audit modules. The SHA-256 only proves the download matches this index. Verify the release yourself with the GitHub CLI:

gh release verify 1.3.0-7742865 -R qwq233/OhMyKeymint
gh release verify-asset 1.3.0-7742865 OhMyKeymint-release-arm64-v8a-1.3.0-7742865.zip -R qwq233/OhMyKeymint