# pangeran-droid/android-ransomware-simulation architecture

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

- Interactive diagram: https://gitdiagram.com/pangeran-droid/android-ransomware-simulation
- Repository: https://github.com/pangeran-droid/android-ransomware-simulation

## Overview

This is an educational Android lock-screen ransomware simulation: the user encounters a Flutter lock screen, enters a password before leaving, and sees a payment-deadline countdown. Android-specific behavior uses a method-channel bridge for Lock Task Mode and a boot receiver for relaunch after reboot. The README documents the product flow and responsibilities; the Dart and Kotlin implementations were not excerpted, so internal details beyond those statements are not inferred.

Main entry points: [`lib/main.dart`](https://github.com/pangeran-droid/android-ransomware-simulation/blob/main/lib/main.dart) (Lock screen, password, timer), [`android/app/src/main/kotlin/com/example/ransim/MainActivity.kt`](https://github.com/pangeran-droid/android-ransomware-simulation/blob/main/android/app/src/main/kotlin/com/example/ransim/MainActivity.kt) (Lock-task bridge), [`android/app/src/main/kotlin/com/example/ransim/BootReceiver.kt`](https://github.com/pangeran-droid/android-ransomware-simulation/blob/main/android/app/src/main/kotlin/com/example/ransim/BootReceiver.kt) (Boot receiver), [`android/app/src/main/AndroidManifest.xml`](https://github.com/pangeran-droid/android-ransomware-simulation/blob/main/android/app/src/main/AndroidManifest.xml) (Android Lock Task Mode)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_flutter["Flutter lock screen"]
  node_lock_ui["Lock screen, password, timer<br/>[main.dart]"]
end

subgraph group_android["Android controls"]
  node_native_bridge["Lock-task bridge<br/>[MainActivity.kt]"]
  node_lock_task["Android Lock Task Mode"]
end

subgraph group_device["Device lifecycle"]
  node_boot_receiver["Boot receiver<br/>[BootReceiver.kt]"]
end

node_user(("Device user"))
node_android_os(("Android system"))

node_user -->|"uses"| node_lock_ui
node_lock_ui -->|"calls channel"| node_native_bridge
node_native_bridge -->|"controls kiosk"| node_lock_task
node_android_os -->|"signals reboot"| node_boot_receiver
node_boot_receiver -->|"relaunches app"| node_lock_ui

click node_lock_ui "https://github.com/pangeran-droid/android-ransomware-simulation/blob/main/lib/main.dart"
click node_native_bridge "https://github.com/pangeran-droid/android-ransomware-simulation/blob/main/android/app/src/main/kotlin/com/example/ransim/MainActivity.kt"
click node_lock_task "https://github.com/pangeran-droid/android-ransomware-simulation/blob/main/android/app/src/main/AndroidManifest.xml"
click node_boot_receiver "https://github.com/pangeran-droid/android-ransomware-simulation/blob/main/android/app/src/main/kotlin/com/example/ransim/BootReceiver.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_lock_ui,node_user toneBlue
class node_native_bridge,node_lock_task toneAmber
class node_boot_receiver toneMint
class node_android_os toneIndigo
```

## Components

### Flutter lock screen

- [Lock screen, password, timer](https://github.com/pangeran-droid/android-ransomware-simulation/blob/main/lib/main.dart): `lib/main.dart`

### Android controls

- [Lock-task bridge](https://github.com/pangeran-droid/android-ransomware-simulation/blob/main/android/app/src/main/kotlin/com/example/ransim/MainActivity.kt): `android/app/src/main/kotlin/com/example/ransim/MainActivity.kt`
- [Android Lock Task Mode](https://github.com/pangeran-droid/android-ransomware-simulation/blob/main/android/app/src/main/AndroidManifest.xml): `android/app/src/main/AndroidManifest.xml`

### Device lifecycle

- [Boot receiver](https://github.com/pangeran-droid/android-ransomware-simulation/blob/main/android/app/src/main/kotlin/com/example/ransim/BootReceiver.kt): `android/app/src/main/kotlin/com/example/ransim/BootReceiver.kt`

### Other components

- **Device user**
- **Android system**

## Connections

- Device user → Lock screen, password, timer: uses (evidence: `README.md`)
- Lock screen, password, timer → Lock-task bridge: calls channel (evidence: `README.md`)
- Lock-task bridge → Android Lock Task Mode: controls kiosk (evidence: `README.md`)
- Android system → Boot receiver: signals reboot (evidence: `README.md`)
- Boot receiver → Lock screen, password, timer: relaunches app (evidence: `README.md`)
