# l-jinbin/apksignaturekillerex architecture

> Architecture diagram of the GitHub repository l-jinbin/apksignaturekillerex, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/l-jinbin/apksignaturekillerex
- Repository: https://github.com/l-jinbin/apksignaturekillerex

## Overview

ApkSignatureKillerEx is an Android demonstration of removing APK signature checks and a countermeasure. Its apparent workflow is to launch the demo, initialize native hooking, find loaded ELF objects, and patch selected symbol relocations; the README establishes the demonstration goal but provides little workflow detail. The hook engine’s ELF and utility dependencies are supported by the source index. Java-to-native wiring and the app’s use of openAt are not shown in the excerpts, so those links are omitted or marked unverified.

Main entry points: [`killer/src/main/c/xh_core.c`](https://github.com/l-jinbin/apksignaturekillerex/blob/main/killer/src/main/c/xh_core.c) (Hook core), [`app/src/main/java/bin/mt/test/MainActivity.java`](https://github.com/l-jinbin/apksignaturekillerex/blob/main/app/src/main/java/bin/mt/test/MainActivity.java) (Demo activity), [`killer/src/main/java/bin/mt/signature/KillerApplication.java`](https://github.com/l-jinbin/apksignaturekillerex/blob/main/killer/src/main/java/bin/mt/signature/KillerApplication.java) (Killer application), [`killer/src/main/c/mt_jni.c`](https://github.com/l-jinbin/apksignaturekillerex/blob/main/killer/src/main/c/mt_jni.c) (JNI bridge)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_demo["Android demo"]
  node_demo_activity["Demo activity<br/>[MainActivity.java]"]
  node_openat["openAt helper<br/>[openat.c]"]
  node_killer_app["Killer application"]
  node_apk_asset["Bundled origin APK<br/>[origin.apk]"]
end

subgraph group_hook["Native hook engine"]
  node_native_bridge["JNI bridge<br/>[mt_jni.c]"]
  node_xhook_api["Hook API<br/>[xhook.c]"]
  node_hook_core["Hook core<br/>[xh_core.c]"]
  node_elf_parser["ELF parser and patcher<br/>[xh_elf.c]"]
end

subgraph group_support["Native support"]
  node_queue_macros["Queue structures<br/>[queue.h]"]
  node_tree_macros["Tree structures<br/>[tree.h]"]
  node_memory_utils["Memory utilities<br/>[xh_util.c]"]
  node_logging["Logging<br/>[xh_log.c]"]
  node_version_info["Version info<br/>[xh_version.c]"]
end

node_user(("Demo user"))
node_signature_check["Signature-check target"]

node_user -->|"launches"| node_demo_activity
node_killer_app -->|"demonstrates countermeasure"| node_signature_check
node_native_bridge -->|"uses hook API"| node_xhook_api
node_xhook_api -->|"delegates to"| node_hook_core
node_hook_core -->|"calls ELF routines"| node_elf_parser
node_hook_core -->|"uses queues"| node_queue_macros
node_hook_core -->|"uses tree"| node_tree_macros
node_elf_parser -->|"uses memory helpers"| node_memory_utils
node_native_bridge -->|"uses logging"| node_logging
node_killer_app -.->|"native integration"| node_native_bridge
node_demo_activity -.->|"starts demonstration"| node_killer_app
node_demo_activity -.->|"may use helper"| node_openat

click node_demo_activity "https://github.com/l-jinbin/apksignaturekillerex/blob/main/app/src/main/java/bin/mt/test/MainActivity.java"
click node_openat "https://github.com/l-jinbin/apksignaturekillerex/blob/main/app/src/main/c/openat.c"
click node_killer_app "https://github.com/l-jinbin/apksignaturekillerex/blob/main/killer/src/main/java/bin/mt/signature/KillerApplication.java"
click node_native_bridge "https://github.com/l-jinbin/apksignaturekillerex/blob/main/killer/src/main/c/mt_jni.c"
click node_xhook_api "https://github.com/l-jinbin/apksignaturekillerex/blob/main/killer/src/main/c/xhook.c"
click node_hook_core "https://github.com/l-jinbin/apksignaturekillerex/blob/main/killer/src/main/c/xh_core.c"
click node_elf_parser "https://github.com/l-jinbin/apksignaturekillerex/blob/main/killer/src/main/c/xh_elf.c"
click node_queue_macros "https://github.com/l-jinbin/apksignaturekillerex/blob/main/killer/src/main/c/queue.h"
click node_tree_macros "https://github.com/l-jinbin/apksignaturekillerex/blob/main/killer/src/main/c/tree.h"
click node_memory_utils "https://github.com/l-jinbin/apksignaturekillerex/blob/main/killer/src/main/c/xh_util.c"
click node_logging "https://github.com/l-jinbin/apksignaturekillerex/blob/main/killer/src/main/c/xh_log.c"
click node_version_info "https://github.com/l-jinbin/apksignaturekillerex/blob/main/killer/src/main/c/xh_version.c"
click node_apk_asset "https://github.com/l-jinbin/apksignaturekillerex/blob/main/killer/src/main/assets/SignatureKiller/origin.apk"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_demo_activity,node_openat,node_killer_app,node_apk_asset,node_user toneBlue
class node_native_bridge,node_xhook_api,node_hook_core,node_elf_parser toneAmber
class node_queue_macros,node_tree_macros,node_memory_utils,node_logging,node_version_info toneMint
class node_signature_check toneIndigo
```

## Components

### Android demo

- [Demo activity](https://github.com/l-jinbin/apksignaturekillerex/blob/main/app/src/main/java/bin/mt/test/MainActivity.java): `app/src/main/java/bin/mt/test/MainActivity.java`
- [openAt helper](https://github.com/l-jinbin/apksignaturekillerex/blob/main/app/src/main/c/openat.c): `app/src/main/c/openat.c`
- [Killer application](https://github.com/l-jinbin/apksignaturekillerex/blob/main/killer/src/main/java/bin/mt/signature/KillerApplication.java): `killer/src/main/java/bin/mt/signature/KillerApplication.java`
- [Bundled origin APK](https://github.com/l-jinbin/apksignaturekillerex/blob/main/killer/src/main/assets/SignatureKiller/origin.apk): `killer/src/main/assets/SignatureKiller/origin.apk`

### Native hook engine

- [JNI bridge](https://github.com/l-jinbin/apksignaturekillerex/blob/main/killer/src/main/c/mt_jni.c): `killer/src/main/c/mt_jni.c`
- [Hook API](https://github.com/l-jinbin/apksignaturekillerex/blob/main/killer/src/main/c/xhook.c): `killer/src/main/c/xhook.c`
- [Hook core](https://github.com/l-jinbin/apksignaturekillerex/blob/main/killer/src/main/c/xh_core.c): `killer/src/main/c/xh_core.c`
- [ELF parser and patcher](https://github.com/l-jinbin/apksignaturekillerex/blob/main/killer/src/main/c/xh_elf.c): `killer/src/main/c/xh_elf.c`

### Native support

- [Queue structures](https://github.com/l-jinbin/apksignaturekillerex/blob/main/killer/src/main/c/queue.h): `killer/src/main/c/queue.h`
- [Tree structures](https://github.com/l-jinbin/apksignaturekillerex/blob/main/killer/src/main/c/tree.h): `killer/src/main/c/tree.h`
- [Memory utilities](https://github.com/l-jinbin/apksignaturekillerex/blob/main/killer/src/main/c/xh_util.c): `killer/src/main/c/xh_util.c`
- [Logging](https://github.com/l-jinbin/apksignaturekillerex/blob/main/killer/src/main/c/xh_log.c): `killer/src/main/c/xh_log.c`
- [Version info](https://github.com/l-jinbin/apksignaturekillerex/blob/main/killer/src/main/c/xh_version.c): `killer/src/main/c/xh_version.c`

### Other components

- **Demo user**
- **Signature-check target**

## Connections

- Demo user → Demo activity: launches (evidence: `README.MD`)
- Killer application → Signature-check target: demonstrates countermeasure (evidence: `README.MD`)
- JNI bridge → Hook API: uses hook API (evidence: `killer/src/main/c/mt_jni.c`)
- Hook API → Hook core: delegates to (evidence: `killer/src/main/c/xhook.c`)
- Hook core → ELF parser and patcher: calls ELF routines (evidence: `killer/src/main/c/xh_core.c`)
- Hook core → Queue structures: uses queues (evidence: `killer/src/main/c/xh_core.c`)
- Hook core → Tree structures: uses tree (evidence: `killer/src/main/c/xh_core.c`)
- ELF parser and patcher → Memory utilities: uses memory helpers (evidence: `killer/src/main/c/xh_elf.c`)
- JNI bridge → Logging: uses logging (evidence: `killer/src/main/c/mt_jni.c`)
- Killer application → JNI bridge: native integration
- Demo activity → Killer application: starts demonstration
- Demo activity → openAt helper: may use helper
