All my homies hate signature verification https://git.reseam.app/reseam-community/identity-crisis
  • C 61.8%
  • C++ 27.9%
  • Kotlin 7.1%
  • Assembly 2%
  • CMake 1.1%
  • Other 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
semantic-release-bot 6b77a7e526 chore(release): 1.1.0 [skip ci]
## [1.1.0](https://git.reseam.app/reseam-community/identity-crisis/compare/v1.0.0...v1.1.0) (2026-12-04)

### Features

* keep the Pairip VM running on the original APK ([b00855b](b00855bda1))
2026-12-04 18:20:48 +00:00
.github feat!: init 2026-12-04 11:41:03 +01:00
.husky feat!: init 2026-12-04 11:41:03 +01:00
apps/universal feat: keep the Pairip VM running on the original APK 2026-12-04 23:49:21 +05:30
gradle/wrapper feat!: init 2026-12-04 11:41:03 +01:00
LICENSES feat!: init 2026-12-04 11:41:03 +01:00
.commitlintrc.json feat!: init 2026-12-04 11:41:03 +01:00
.editorconfig feat!: init 2026-12-04 11:41:03 +01:00
.gitattributes feat!: init 2026-12-04 11:41:03 +01:00
.gitignore feat!: init 2026-12-04 11:41:03 +01:00
.releaserc.cjs fix(ci): read breaking changes from commit headers 2026-12-04 11:44:51 +01:00
build.gradle.kts feat!: init 2026-12-04 11:41:03 +01:00
bun.lock fix(ci): use a preset the release notes generator supports 2026-12-04 11:46:58 +01:00
gradlew feat!: init 2026-12-04 11:41:03 +01:00
gradlew.bat feat!: init 2026-12-04 11:41:03 +01:00
justfile feat!: init 2026-12-04 11:41:03 +01:00
LICENSE feat!: init 2026-12-04 11:41:03 +01:00
manifest.toml feat!: init 2026-12-04 11:41:03 +01:00
NOTICE chore: update licensing 2026-12-04 11:55:28 +01:00
package.json chore(release): 1.1.0 [skip ci] 2026-12-04 18:20:48 +00:00
README.md feat: keep the Pairip VM running on the original APK 2026-12-04 23:49:21 +05:30
REUSE.toml chore: update licensing 2026-12-04 11:55:28 +01:00
settings.gradle.kts feat!: init 2026-12-04 11:41:03 +01:00

Identity Crisis

A Reseam patch bundle that shows re-signed apps their original signature and removes Pairip.

Add to Reseam

Patches

  • Identity Crisis: shows the app its original signature, so checks for a modified app pass. Options: diagnostics (log to logcat under the IdentityCrisis tag) and processWideChecks (also spoof checks made through reflection, JNI, or code a packer decrypts).
  • Identity Crisis (APK file access): also embeds the original APK files and redirects the app's reads of its APK to them. Patch the APKs as the store distributes them: merged or re-signed APKs are rejected, because their signature no longer matches their contents.
  • Remove Pairip: removes Google Play's automatic integrity protection. Options: killVM (stop the Pairip VM, only for apps whose VM does nothing but check the license) and spoofInstaller (make leftover installer checks report Google Play).
  • Keep the Pairip VM: for an app that runs its own code in the Pairip VM, so stopping the VM breaks it. Keeps the VM running and feeds it the original APK files, so it passes its integrity check after re-signing. Depends on Remove Pairip and Identity Crisis (APK file access). Option: afterFork (redirect only in processes forked after the Pairip library loads, so the watchdog that traces its own syscalls is left alone; on by default).

Patch a Pairip-protected app by enabling Remove Pairip and Identity Crisis (APK file access). When stopping the VM breaks the app, enable Keep the Pairip VM instead of Remove Pairip's killVM.

Use it from another bundle

Copy this into a new file in your bundle, with your package line below @file:Suppress, to depend on the patches and call the extension. Users must load this bundle too; the engine links the extension classes from it. Only patches that depend on identityCrisis or spoofApkFileAccess may call the extension.

@file:Suppress("unused")

import app.reseam.patch.ExtClass
import app.reseam.patch.ExternalPatch
import app.reseam.patch.Type

private const val IDENTITY_CRISIS_BUNDLE = "identity-crisis"

val identityCrisis =
    ExternalPatch(IDENTITY_CRISIS_BUNDLE, "top.madkarma.patches.universal.signature.identityCrisis")

val spoofApkFileAccess =
    ExternalPatch(
        IDENTITY_CRISIS_BUNDLE,
        "top.madkarma.patches.universal.signature.spoofApkFileAccess",
    )

val removePairip =
    ExternalPatch(IDENTITY_CRISIS_BUNDLE, "top.madkarma.patches.universal.pairip.removePairip")

private const val CONTEXT = "android.content.Context"
private const val FILE = "java.io.File"
private const val PACKAGE_INFO_CREATOR = $$"android.os.Parcelable$Creator"

object IdentityCrisis : ExtClass("top.madkarma.universal.signature.IdentityCrisis") {
    // packageName, encodedCertificate, originalApkFileAccess, diagnostics
    val initialize by static(CONTEXT, Type.String, Type.String, Type.Boolean, Type.Boolean)
    val initializeEarly by static(Type.String, Type.String, Type.Boolean, Type.Boolean)

    // packageName, encodedCertificate, libraryName, diagnostics
    val initializeBeforeNativeLibrary by static(Type.String, Type.String, Type.String, Type.Boolean)
    val initializeNativeFileAccess by static(Type.String, Type.String, Type.Boolean)

    val spoofSignature by static(Type.String, Type.String)
    val startApkFileAccess by static(CONTEXT, Type.String)
    val wrapPackageCreator by
        static(PACKAGE_INFO_CREATOR, Type.String, Type.String, returns = PACKAGE_INFO_CREATOR)

    // For programs run outside the app process, such as from adb shell.
    val extractOriginalApk by static(Type.String, Type.String, returns = Type.String)
    val launchWithOriginalApk by
        static(Type.String, Type.String, Type.String, Type.Boolean, returns = Type.String)
    val launchFileWithOriginalApk by
        static(FILE, Type.String, Type.String, Type.Boolean, returns = FILE)

    // libraryName
    val redirectRawApkOpens by static(Type.String)
    val redirectRawApkOpensAfterFork by static(Type.String)
    val redirectApkFilesOnLibraryLoad by static(Type.String)
}

object NativeCreatorView : ExtClass("top.madkarma.universal.signature.NativeCreatorView") {
    // packageName, encodedCertificate, libraryName
    val initializeBeforeNativeLibrary by static(Type.String, Type.String, Type.String)
}

encodedCertificate is the original signing certificate, Base64-encoded.

Build

You need JDK 17, the Android SDK in ANDROID_HOME, the reseam CLI matching the plugin version in settings.gradle.kts, and a signing key from reseam bundle keygen --out ~/.reseam/bundle-signing.key.

./gradlew build bundle

The build writes build/reseam/identity-crisis.reseam. The native library ships prebuilt; apps/universal/patch/build.gradle.kts explains how to rebuild it.

License

Project-owned code is licensed under AGPL-3.0-or-later. NOTICE lists the inherited Reseam section 7 terms and third-party notices. Vendored code keeps the licenses recorded in REUSE.toml.