# lokeshpoudyal10/clone_and_fake_app_detection architecture

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

- Interactive diagram: https://gitdiagram.com/lokeshpoudyal10/clone_and_fake_app_detection
- Repository: https://github.com/lokeshpoudyal10/clone_and_fake_app_detection

## Overview

This is a desktop Android APK clone/fake-app detector. A user selects an APK and starts a scan; the GUI hashes it, extracts package and certificate metadata, checks local suspicious indicators, queries VirusTotal, presents a report, and saves scan data to CSV. The README also describes static manifest, permission, and bytecode analysis; the sampled implementation shows Androguard-backed metadata extraction, but not a separate bytecode-analysis stage. The two GUI files appear to contain overlapping implementations. Connections are limited to relationships shown in excerpts, the source index, or README.

Main entry points: [`ui.py`](https://github.com/lokeshpoudyal10/clone_and_fake_app_detection/blob/master/ui.py) (Scan GUI), [`VirusTotal.py`](https://github.com/lokeshpoudyal10/clone_and_fake_app_detection/blob/master/VirusTotal.py) (VirusTotal client), [`main.py`](https://github.com/lokeshpoudyal10/clone_and_fake_app_detection/blob/master/main.py) (Application entry), [`hashes.py`](https://github.com/lokeshpoudyal10/clone_and_fake_app_detection/blob/master/hashes.py) (APK metadata)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Desktop interface"]
  node_entry["Application entry<br/>[main.py]"]
  node_gui["Scan GUI<br/>[ui.py]"]
  node_gui_alt["Alternate GUI"]
  node_store_search["App-store search<br/>[ui.py]"]
end

subgraph group_analysis["APK analysis"]
  node_hashing["APK hashing<br/>[hashes.py]"]
  node_metadata["APK metadata<br/>[hashes.py]"]
  node_indicators["Clone indicators<br/>[ui.py]"]
  node_report["Result report<br/>[ui.py]"]
end

subgraph group_intelligence["Threat intelligence"]
  node_vt_client["VirusTotal client<br/>[VirusTotal.py]"]
end

subgraph group_records["Scan records"]
  node_csv_writer["Scan CSV writer<br/>[csvFiles.py]"]
  node_csv_store[("CSV scan file<br/>[csvFiles.py]")]
end

subgraph group_configuration["Configuration"]
  node_logger["Logging setup<br/>[log.py]"]
  node_config["API key and log path<br/>[key.py]"]
end

node_user(("Analyst"))
node_stores["App stores"]
node_androguard["Androguard"]
node_vt_service["VirusTotal API"]

node_user -->|"starts app"| node_entry
node_entry -->|"creates and runs"| node_gui
node_user -->|"selects and scans"| node_gui
node_gui -->|"hashes APK"| node_hashing
node_gui -->|"extracts metadata"| node_metadata
node_metadata -->|"analyzes APK"| node_androguard
node_gui -.->|"checks metadata"| node_indicators
node_gui -->|"checks hash"| node_vt_client
node_vt_client -->|"requests hash report"| node_vt_service
node_vt_client -->|"reads API key"| node_config
node_gui -->|"formats and displays"| node_report
node_gui -->|"saves scan data"| node_csv_writer
node_csv_writer -->|"appends scan row"| node_csv_store
node_gui_alt -->|"logs scan errors"| node_logger
node_logger -->|"reads log path"| node_config
node_user -->|"searches app name"| node_store_search
node_store_search -->|"opens store searches"| node_stores

click node_entry "https://github.com/lokeshpoudyal10/clone_and_fake_app_detection/blob/master/main.py"
click node_gui "https://github.com/lokeshpoudyal10/clone_and_fake_app_detection/blob/master/ui.py"
click node_gui_alt "https://github.com/lokeshpoudyal10/clone_and_fake_app_detection/blob/master/import%20customtkinter%20as%20ctk.py"
click node_store_search "https://github.com/lokeshpoudyal10/clone_and_fake_app_detection/blob/master/ui.py"
click node_hashing "https://github.com/lokeshpoudyal10/clone_and_fake_app_detection/blob/master/hashes.py"
click node_metadata "https://github.com/lokeshpoudyal10/clone_and_fake_app_detection/blob/master/hashes.py"
click node_indicators "https://github.com/lokeshpoudyal10/clone_and_fake_app_detection/blob/master/ui.py"
click node_report "https://github.com/lokeshpoudyal10/clone_and_fake_app_detection/blob/master/ui.py"
click node_vt_client "https://github.com/lokeshpoudyal10/clone_and_fake_app_detection/blob/master/VirusTotal.py"
click node_csv_writer "https://github.com/lokeshpoudyal10/clone_and_fake_app_detection/blob/master/csvFiles.py"
click node_csv_store "https://github.com/lokeshpoudyal10/clone_and_fake_app_detection/blob/master/csvFiles.py"
click node_logger "https://github.com/lokeshpoudyal10/clone_and_fake_app_detection/blob/master/log.py"
click node_config "https://github.com/lokeshpoudyal10/clone_and_fake_app_detection/blob/master/key.py"

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_entry,node_gui,node_gui_alt,node_store_search toneBlue
class node_hashing,node_metadata,node_indicators,node_report toneAmber
class node_vt_client,node_vt_service toneMint
class node_csv_writer,node_csv_store toneRose
class node_logger,node_config,node_user,node_stores,node_androguard toneIndigo
```

## Components

### Desktop interface

- [Application entry](https://github.com/lokeshpoudyal10/clone_and_fake_app_detection/blob/master/main.py): `main.py`
- [Scan GUI](https://github.com/lokeshpoudyal10/clone_and_fake_app_detection/blob/master/ui.py): `ui.py`
- [Alternate GUI](https://github.com/lokeshpoudyal10/clone_and_fake_app_detection/blob/master/import%20customtkinter%20as%20ctk.py): `import customtkinter as ctk.py`
- [App-store search](https://github.com/lokeshpoudyal10/clone_and_fake_app_detection/blob/master/ui.py): `ui.py`

### APK analysis

- [APK hashing](https://github.com/lokeshpoudyal10/clone_and_fake_app_detection/blob/master/hashes.py): `hashes.py`
- [APK metadata](https://github.com/lokeshpoudyal10/clone_and_fake_app_detection/blob/master/hashes.py): `hashes.py`
- [Clone indicators](https://github.com/lokeshpoudyal10/clone_and_fake_app_detection/blob/master/ui.py): `ui.py`
- [Result report](https://github.com/lokeshpoudyal10/clone_and_fake_app_detection/blob/master/ui.py): `ui.py`

### Threat intelligence

- [VirusTotal client](https://github.com/lokeshpoudyal10/clone_and_fake_app_detection/blob/master/VirusTotal.py): `VirusTotal.py`

### Scan records

- [Scan CSV writer](https://github.com/lokeshpoudyal10/clone_and_fake_app_detection/blob/master/csvFiles.py): `csvFiles.py`
- [CSV scan file](https://github.com/lokeshpoudyal10/clone_and_fake_app_detection/blob/master/csvFiles.py): `csvFiles.py`

### Configuration

- [Logging setup](https://github.com/lokeshpoudyal10/clone_and_fake_app_detection/blob/master/log.py): `log.py`
- [API key and log path](https://github.com/lokeshpoudyal10/clone_and_fake_app_detection/blob/master/key.py): `key.py`

### Other components

- **Analyst**
- **App stores**
- **Androguard**
- **VirusTotal API**

## Connections

- Analyst → Application entry: starts app (evidence: `main.py`)
- Application entry → Scan GUI: creates and runs (evidence: `main.py`)
- Analyst → Scan GUI: selects and scans (evidence: `ui.py`)
- Scan GUI → APK hashing: hashes APK (evidence: `ui.py`)
- Scan GUI → APK metadata: extracts metadata (evidence: `ui.py`)
- APK metadata → Androguard: analyzes APK (evidence: `hashes.py`)
- Scan GUI → Clone indicators: checks metadata (evidence: `ui.py`)
- Scan GUI → VirusTotal client: checks hash (evidence: `ui.py`)
- VirusTotal client → VirusTotal API: requests hash report (evidence: `VirusTotal.py`)
- VirusTotal client → API key and log path: reads API key (evidence: `VirusTotal.py`)
- Scan GUI → Result report: formats and displays (evidence: `ui.py`)
- Scan GUI → Scan CSV writer: saves scan data (evidence: `ui.py`)
- Scan CSV writer → CSV scan file: appends scan row (evidence: `csvFiles.py`)
- Alternate GUI → Logging setup: logs scan errors (evidence: `import customtkinter as ctk.py`)
- Logging setup → API key and log path: reads log path (evidence: `log.py`)
- Analyst → App-store search: searches app name (evidence: `ui.py`)
- App-store search → App stores: opens store searches (evidence: `ui.py`)
