# abcz316/skroot-linuxkernelroot architecture

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

- Interactive diagram: https://gitdiagram.com/abcz316/skroot-linuxkernelroot
- Repository: https://github.com/abcz316/skroot-linuxkernelroot

## Overview

SKRoot is an Android-managed, kernel-patching root solution with a broader Pro edition offering authorization, kernel modules, device-hiding features, and a CVE exploit. The documented Lite workflow patches a stock kernel to produce a root key, then uses the Android app or testRoot with that key. The graph also shows Pro capabilities represented in the tree. Source excerpts are limited, so edges for capabilities documented only at product level cite the README; unverified implementation links are omitted.

Main entry points: [`Lite_version/src/patch_kernel_root/patch_kernel_root.cpp`](https://github.com/abcz316/skroot-linuxkernelroot/blob/master/Lite_version/src/patch_kernel_root/patch_kernel_root.cpp) (Kernel patcher), [`Lite_version/src/testRoot/testRoot.cpp`](https://github.com/abcz316/skroot-linuxkernelroot/blob/master/Lite_version/src/testRoot/testRoot.cpp) (Root runtime), [`Lite_version/src/PermissionManager/app/src/main/java/com/linux/permissionmanager/MainActivity.java`](https://github.com/abcz316/skroot-linuxkernelroot/blob/master/Lite_version/src/PermissionManager/app/src/main/java/com/linux/permissionmanager/MainActivity.java) (Permission Manager), [`Pro(众测开放中)/src/testModule/kernel_module_kit/include/kernel_module_kit_umbrella.h`](https://github.com/abcz316/skroot-linuxkernelroot/blob/master/Pro(%E4%BC%97%E6%B5%8B%E5%BC%80%E6%94%BE%E4%B8%AD)/src/testModule/kernel_module_kit/include/kernel_module_kit_umbrella.h) (Kernel module kit)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_lite["Lite Root Workflow"]
  node_patcher["Kernel patcher"]
  node_kernelanalysis["Kernel analysis"]
  node_rootkey["Generated root key"]
  node_rootruntime["Root runtime<br/>[testRoot.cpp]"]
  node_rootkit["Rootkit support"]
  node_asmjit["Assembler support<br/>[core.h]"]
end

subgraph group_manager["Android Management"]
  node_androidapp["Permission Manager<br/>[MainActivity.java]"]
  node_nativebridge["Native bridge<br/>[NativeBridge.java]"]
end

subgraph group_pro["Pro Capabilities"]
  node_apkengine["APK signing engine"]
  node_zygoteservice["Zygote preload service<br/>[MagicaService.java]"]
  node_ghostlockv1["GhostLock exploit v1<br/>[main.c]"]
  node_ghostlockv2["GhostLock exploit v2<br/>[main.c]"]
end

subgraph group_sdk["Kernel Module SDK"]
  node_modulekit["Kernel module kit"]
  node_diskstorage["Module disk storage"]
  node_deviceprotection["Block device protection"]
  node_persistpermissions["Persistent-dir permissions"]
  node_serialspoof["Serial spoofing module<br/>[main.cpp]"]
end

node_user(("Device operator"))
node_stockkernel["Stock kernel image"]

node_user -->|"supplies image"| node_stockkernel
node_user -->|"runs patcher"| node_patcher
node_stockkernel -->|"patches image"| node_patcher
node_patcher -.->|"analyzes kernel"| node_kernelanalysis
node_patcher -->|"generates key"| node_rootkey
node_user -->|"enters key"| node_androidapp
node_user -->|"enters key"| node_rootruntime
node_rootruntime -.->|"uses rootkit"| node_rootkit
node_androidapp -.->|"invokes native"| node_nativebridge
node_user -.->|"uses Pro signing"| node_apkengine
node_user -.->|"uses preload"| node_zygoteservice
node_user -.->|"runs exploit"| node_ghostlockv1
node_user -.->|"runs exploit"| node_ghostlockv2
node_modulekit -->|"declares storage"| node_diskstorage
node_user -.->|"runs module"| node_deviceprotection
node_user -.->|"runs module"| node_persistpermissions
node_user -.->|"runs module"| node_serialspoof
node_patcher -.->|"uses assembler"| node_asmjit

click node_patcher "https://github.com/abcz316/skroot-linuxkernelroot/blob/master/Lite_version/src/patch_kernel_root/patch_kernel_root.cpp"
click node_kernelanalysis "https://github.com/abcz316/skroot-linuxkernelroot/tree/master/Lite_version/src/patch_kernel_root/analyze"
click node_androidapp "https://github.com/abcz316/skroot-linuxkernelroot/blob/master/Lite_version/src/PermissionManager/app/src/main/java/com/linux/permissionmanager/MainActivity.java"
click node_rootruntime "https://github.com/abcz316/skroot-linuxkernelroot/blob/master/Lite_version/src/testRoot/testRoot.cpp"
click node_rootkit "https://github.com/abcz316/skroot-linuxkernelroot/tree/master/Lite_version/src/testRoot/kernel_root_kit"
click node_nativebridge "https://github.com/abcz316/skroot-linuxkernelroot/blob/master/Lite_version/src/PermissionManager/app/src/main/java/com/linux/permissionmanager/bridge/NativeBridge.java"
click node_apkengine "https://github.com/abcz316/skroot-linuxkernelroot/blob/master/Pro(%E4%BC%97%E6%B5%8B%E5%BC%80%E6%94%BE%E4%B8%AD)/src/PermissionManager/apksig-local/src/main/java/com/android/apksig/DefaultApkSignerEngine.java"
click node_zygoteservice "https://github.com/abcz316/skroot-linuxkernelroot/blob/master/Pro(%E4%BC%97%E6%B5%8B%E5%BC%80%E6%94%BE%E4%B8%AD)/src/PermissionManager/ZygotePreloadTools/app/src/main/java/com/android/zygotepreloadtools/MagicaService.java"
click node_ghostlockv1 "https://github.com/abcz316/skroot-linuxkernelroot/blob/master/Pro(%E4%BC%97%E6%B5%8B%E5%BC%80%E6%94%BE%E4%B8%AD)/src/PermissionManager/cve2026_43499_ghostlock_src_v1/src/core/main.c"
click node_ghostlockv2 "https://github.com/abcz316/skroot-linuxkernelroot/blob/master/Pro(%E4%BC%97%E6%B5%8B%E5%BC%80%E6%94%BE%E4%B8%AD)/src/PermissionManager/cve2026_43499_ghostlock_src_v2/src/main.c"
click node_modulekit "https://github.com/abcz316/skroot-linuxkernelroot/blob/master/Pro(%E4%BC%97%E6%B5%8B%E5%BC%80%E6%94%BE%E4%B8%AD)/src/testModule/kernel_module_kit/include/kernel_module_kit_umbrella.h"
click node_diskstorage "https://github.com/abcz316/skroot-linuxkernelroot/blob/master/Pro(%E4%BC%97%E6%B5%8B%E5%BC%80%E6%94%BE%E4%B8%AD)/src/testModule/kernel_module_kit/include/module_base_disk_storage.h"
click node_deviceprotection "https://github.com/abcz316/skroot-linuxkernelroot/blob/master/Pro(%E4%BC%97%E6%B5%8B%E5%BC%80%E6%94%BE%E4%B8%AD)/src/testModule/module_protect_device/block_device_manager.cpp"
click node_persistpermissions "https://github.com/abcz316/skroot-linuxkernelroot/blob/master/Pro(%E4%BC%97%E6%B5%8B%E5%BC%80%E6%94%BE%E4%B8%AD)/src/testModule/module_fake_device/%E9%98%B2%E8%AE%BE%E5%A4%87%E6%A0%87%E8%AE%B0%E4%B8%8E%E8%87%AA%E5%8A%A8%E6%B8%85%E7%90%86/persist_dir_perm_manager.cpp"
click node_serialspoof "https://github.com/abcz316/skroot-linuxkernelroot/blob/master/Pro(%E4%BC%97%E6%B5%8B%E5%BC%80%E6%94%BE%E4%B8%AD)/src/testModule/module_fake_device/%E9%9A%8F%E6%9C%BA%E8%AE%BE%E5%A4%87%E5%BA%8F%E5%88%97%E5%8F%B7/main.cpp"
click node_asmjit "https://github.com/abcz316/skroot-linuxkernelroot/blob/master/Lite_version/src/patch_kernel_root/3rdparty/asmjit2-src/src/asmjit/core.h"

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_patcher,node_kernelanalysis,node_rootkey,node_rootruntime,node_rootkit,node_asmjit toneBlue
class node_androidapp,node_nativebridge toneAmber
class node_apkengine,node_zygoteservice,node_ghostlockv1,node_ghostlockv2 toneMint
class node_modulekit,node_diskstorage,node_deviceprotection,node_persistpermissions,node_serialspoof toneRose
class node_user,node_stockkernel toneIndigo
```

## Components

### Lite Root Workflow

- [Kernel patcher](https://github.com/abcz316/skroot-linuxkernelroot/blob/master/Lite_version/src/patch_kernel_root/patch_kernel_root.cpp): `Lite_version/src/patch_kernel_root/patch_kernel_root.cpp`
- [Kernel analysis](https://github.com/abcz316/skroot-linuxkernelroot/tree/master/Lite_version/src/patch_kernel_root/analyze): `Lite_version/src/patch_kernel_root/analyze`
- **Generated root key**
- [Root runtime](https://github.com/abcz316/skroot-linuxkernelroot/blob/master/Lite_version/src/testRoot/testRoot.cpp): `Lite_version/src/testRoot/testRoot.cpp`
- [Rootkit support](https://github.com/abcz316/skroot-linuxkernelroot/tree/master/Lite_version/src/testRoot/kernel_root_kit): `Lite_version/src/testRoot/kernel_root_kit`
- [Assembler support](https://github.com/abcz316/skroot-linuxkernelroot/blob/master/Lite_version/src/patch_kernel_root/3rdparty/asmjit2-src/src/asmjit/core.h): `Lite_version/src/patch_kernel_root/3rdparty/asmjit2-src/src/asmjit/core.h`

### Android Management

- [Permission Manager](https://github.com/abcz316/skroot-linuxkernelroot/blob/master/Lite_version/src/PermissionManager/app/src/main/java/com/linux/permissionmanager/MainActivity.java): `Lite_version/src/PermissionManager/app/src/main/java/com/linux/permissionmanager/MainActivity.java`
- [Native bridge](https://github.com/abcz316/skroot-linuxkernelroot/blob/master/Lite_version/src/PermissionManager/app/src/main/java/com/linux/permissionmanager/bridge/NativeBridge.java): `Lite_version/src/PermissionManager/app/src/main/java/com/linux/permissionmanager/bridge/NativeBridge.java`

### Pro Capabilities

- [APK signing engine](https://github.com/abcz316/skroot-linuxkernelroot/blob/master/Pro(%E4%BC%97%E6%B5%8B%E5%BC%80%E6%94%BE%E4%B8%AD)/src/PermissionManager/apksig-local/src/main/java/com/android/apksig/DefaultApkSignerEngine.java): `Pro(众测开放中)/src/PermissionManager/apksig-local/src/main/java/com/android/apksig/DefaultApkSignerEngine.java`
- [Zygote preload service](https://github.com/abcz316/skroot-linuxkernelroot/blob/master/Pro(%E4%BC%97%E6%B5%8B%E5%BC%80%E6%94%BE%E4%B8%AD)/src/PermissionManager/ZygotePreloadTools/app/src/main/java/com/android/zygotepreloadtools/MagicaService.java): `Pro(众测开放中)/src/PermissionManager/ZygotePreloadTools/app/src/main/java/com/android/zygotepreloadtools/MagicaService.java`
- [GhostLock exploit v1](https://github.com/abcz316/skroot-linuxkernelroot/blob/master/Pro(%E4%BC%97%E6%B5%8B%E5%BC%80%E6%94%BE%E4%B8%AD)/src/PermissionManager/cve2026_43499_ghostlock_src_v1/src/core/main.c): `Pro(众测开放中)/src/PermissionManager/cve2026_43499_ghostlock_src_v1/src/core/main.c`
- [GhostLock exploit v2](https://github.com/abcz316/skroot-linuxkernelroot/blob/master/Pro(%E4%BC%97%E6%B5%8B%E5%BC%80%E6%94%BE%E4%B8%AD)/src/PermissionManager/cve2026_43499_ghostlock_src_v2/src/main.c): `Pro(众测开放中)/src/PermissionManager/cve2026_43499_ghostlock_src_v2/src/main.c`

### Kernel Module SDK

- [Kernel module kit](https://github.com/abcz316/skroot-linuxkernelroot/blob/master/Pro(%E4%BC%97%E6%B5%8B%E5%BC%80%E6%94%BE%E4%B8%AD)/src/testModule/kernel_module_kit/include/kernel_module_kit_umbrella.h): `Pro(众测开放中)/src/testModule/kernel_module_kit/include/kernel_module_kit_umbrella.h`
- [Module disk storage](https://github.com/abcz316/skroot-linuxkernelroot/blob/master/Pro(%E4%BC%97%E6%B5%8B%E5%BC%80%E6%94%BE%E4%B8%AD)/src/testModule/kernel_module_kit/include/module_base_disk_storage.h): `Pro(众测开放中)/src/testModule/kernel_module_kit/include/module_base_disk_storage.h`
- [Block device protection](https://github.com/abcz316/skroot-linuxkernelroot/blob/master/Pro(%E4%BC%97%E6%B5%8B%E5%BC%80%E6%94%BE%E4%B8%AD)/src/testModule/module_protect_device/block_device_manager.cpp): `Pro(众测开放中)/src/testModule/module_protect_device/block_device_manager.cpp`
- [Persistent-dir permissions](https://github.com/abcz316/skroot-linuxkernelroot/blob/master/Pro(%E4%BC%97%E6%B5%8B%E5%BC%80%E6%94%BE%E4%B8%AD)/src/testModule/module_fake_device/%E9%98%B2%E8%AE%BE%E5%A4%87%E6%A0%87%E8%AE%B0%E4%B8%8E%E8%87%AA%E5%8A%A8%E6%B8%85%E7%90%86/persist_dir_perm_manager.cpp): `Pro(众测开放中)/src/testModule/module_fake_device/防设备标记与自动清理/persist_dir_perm_manager.cpp`
- [Serial spoofing module](https://github.com/abcz316/skroot-linuxkernelroot/blob/master/Pro(%E4%BC%97%E6%B5%8B%E5%BC%80%E6%94%BE%E4%B8%AD)/src/testModule/module_fake_device/%E9%9A%8F%E6%9C%BA%E8%AE%BE%E5%A4%87%E5%BA%8F%E5%88%97%E5%8F%B7/main.cpp): `Pro(众测开放中)/src/testModule/module_fake_device/随机设备序列号/main.cpp`

### Other components

- **Device operator**
- **Stock kernel image**

## Connections

- Device operator → Stock kernel image: supplies image
- Device operator → Kernel patcher: runs patcher
- Stock kernel image → Kernel patcher: patches image
- Kernel patcher → Kernel analysis: analyzes kernel
- Kernel patcher → Generated root key: generates key
- Device operator → Permission Manager: enters key
- Device operator → Root runtime: enters key
- Root runtime → Rootkit support: uses rootkit
- Permission Manager → Native bridge: invokes native
- Device operator → APK signing engine: uses Pro signing
- Device operator → Zygote preload service: uses preload
- Device operator → GhostLock exploit v1: runs exploit
- Device operator → GhostLock exploit v2: runs exploit
- Kernel module kit → Module disk storage: declares storage (evidence: `Pro(众测开放中)/src/testModule/kernel_module_kit/include/kernel_module_kit_umbrella.h`)
- Device operator → Block device protection: runs module
- Device operator → Persistent-dir permissions: runs module
- Device operator → Serial spoofing module: runs module
- Kernel patcher → Assembler support: uses assembler
