# xposed-modules-repo/io.github.khalil212002.unmockgps architecture

> Architecture diagram of the GitHub repository xposed-modules-repo/io.github.khalil212002.unmockgps, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/xposed-modules-repo/io.github.khalil212002.unmockgps
- Repository: https://github.com/xposed-modules-repo/io.github.khalil212002.unmockgps

## Overview

UnmockGPS is a small Xposed/LSPatch module that hooks Android location methods in a target app and alters the values those methods expose. The documented workflow is to activate the module, launch the target app, and optionally set a mock location in a separate GPS app. The sampled implementation shows hook registration and the sanitization behavior; it does not show the framework’s package-loading internals. The README also mentions altitude injection, but the sampled source does not implement it.

Main entry points: [`app/src/main/java/io/github/khalil212002/unmockgps/UnMockGPS.kt`](https://github.com/xposed-modules-repo/io.github.khalil212002.unmockgps/blob/main/app/src/main/java/io/github/khalil212002/unmockgps/UnMockGPS.kt) (UnMockGPS module)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_module["UnMockGPS module<br/>[UnMockGPS.kt]"]
node_location["Android Location API"]
node_mock_flags["Mock flag suppression<br/>[UnMockGPS.kt]"]
node_accuracy["Accuracy overrides<br/>[UnMockGPS.kt]"]
node_extras["Extras scrubbing<br/>[UnMockGPS.kt]"]
node_target(("Target app"))
node_activator(("LSPosed / LSPatch"))
node_fake_gps(("Fake GPS app"))

node_activator -->|"activates"| node_module
node_target -.->|"uses"| node_location
node_module -->|"registers hooks"| node_location
node_location -->|"hooked calls"| node_mock_flags
node_location -->|"hooked calls"| node_accuracy
node_location -->|"hooked calls"| node_extras
node_fake_gps -.->|"sets location"| node_location

click node_module "https://github.com/xposed-modules-repo/io.github.khalil212002.unmockgps/blob/main/app/src/main/java/io/github/khalil212002/unmockgps/UnMockGPS.kt"
click node_mock_flags "https://github.com/xposed-modules-repo/io.github.khalil212002.unmockgps/blob/main/app/src/main/java/io/github/khalil212002/unmockgps/UnMockGPS.kt"
click node_accuracy "https://github.com/xposed-modules-repo/io.github.khalil212002.unmockgps/blob/main/app/src/main/java/io/github/khalil212002/unmockgps/UnMockGPS.kt"
click node_extras "https://github.com/xposed-modules-repo/io.github.khalil212002.unmockgps/blob/main/app/src/main/java/io/github/khalil212002/unmockgps/UnMockGPS.kt"

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_module,node_mock_flags,node_accuracy,node_extras toneTeal
class node_location toneMint
class node_target,node_activator,node_fake_gps toneIndigo
```

## Components

### Other components

- [UnMockGPS module](https://github.com/xposed-modules-repo/io.github.khalil212002.unmockgps/blob/main/app/src/main/java/io/github/khalil212002/unmockgps/UnMockGPS.kt): `app/src/main/java/io/github/khalil212002/unmockgps/UnMockGPS.kt`
- **Android Location API**
- [Mock flag suppression](https://github.com/xposed-modules-repo/io.github.khalil212002.unmockgps/blob/main/app/src/main/java/io/github/khalil212002/unmockgps/UnMockGPS.kt): `app/src/main/java/io/github/khalil212002/unmockgps/UnMockGPS.kt`
- [Accuracy overrides](https://github.com/xposed-modules-repo/io.github.khalil212002.unmockgps/blob/main/app/src/main/java/io/github/khalil212002/unmockgps/UnMockGPS.kt): `app/src/main/java/io/github/khalil212002/unmockgps/UnMockGPS.kt`
- [Extras scrubbing](https://github.com/xposed-modules-repo/io.github.khalil212002.unmockgps/blob/main/app/src/main/java/io/github/khalil212002/unmockgps/UnMockGPS.kt): `app/src/main/java/io/github/khalil212002/unmockgps/UnMockGPS.kt`
- **Target app**
- **LSPosed / LSPatch**
- **Fake GPS app**

## Connections

- LSPosed / LSPatch → UnMockGPS module: activates (evidence: `README.md`)
- Target app → Android Location API: uses
- UnMockGPS module → Android Location API: registers hooks (evidence: `app/src/main/java/io/github/khalil212002/unmockgps/UnMockGPS.kt`)
- Android Location API → Mock flag suppression: hooked calls (evidence: `app/src/main/java/io/github/khalil212002/unmockgps/UnMockGPS.kt`)
- Android Location API → Accuracy overrides: hooked calls (evidence: `app/src/main/java/io/github/khalil212002/unmockgps/UnMockGPS.kt`)
- Android Location API → Extras scrubbing: hooked calls (evidence: `app/src/main/java/io/github/khalil212002/unmockgps/UnMockGPS.kt`)
- Fake GPS app → Android Location API: sets location (evidence: `README.md`)
