Android · Bluetooth · Real-Time Localization

Detect. Disrupt.
Locate Cheating.

An Android app that scans for hidden Bluetooth earbuds, disrupts wireless cheating devices, and triangulates their exact position in the exam room — in real time.

4Attack Modes
2Sync Channels
±0.5mAccuracy
2,100+Lines of Code
Live Room Map — Trilateration
● LIVE 3 TEACHERS
You (Ahmed) Other teachers Suspicious device RSSI rings
📏

RSSI → Distance

Convert signal strength to meters using a path-loss model calibrated for indoor environments.

d = 10^((-59−rssi) / 25)
⚖️

Inverse-Square Weight

Closer teachers contribute more to the estimate. Weight decays with the square of distance.

w = 1 / d²
🎯

Weighted Centroid

Each axis computed independently. The result is the most likely device position in the room.

x = Σ(tX·w) / Σ(w)
🔵

Uncertainty Radius

Drawn as a translucent ring on the map. Shrinks as more teachers see the same device.

σ = avgDist × 0.5

Exam Cheating Has Gone Wireless

Miniature Bluetooth earbuds, smartwatches, and hidden phones allow students to receive answers in real time — and traditional supervision cannot detect them.

🎧
82%

Use Wireless Earbuds

Most exam cheating incidents involve Bluetooth-connected audio devices, invisible from a distance.

👁️
0

Visual Detection Rate

Modern earbuds are smaller than a fingernail — completely invisible to proctors walking the room.

📡
10m+

Bluetooth Range

An accomplice outside the room can transmit answers directly to the student's earbud over BLE.

Four Steps to a Cheat-Free Exam

1

Scan

Simultaneously scans Classic Bluetooth and BLE. All nearby devices appear instantly with RSSI, MAC, device class and suspicious flag.

2

Detect

Device class heuristics (audio = 0x200) and name matching (Buds, AirPods, Earbud) auto-flag suspicious devices with a haptic alert.

3

Locate

RSSI readings from multiple teachers feed a weighted trilateration algorithm, placing the device on a live room map with ±0.5m accuracy.

4

Disrupt

Select an attack mode — RFCOMM flood, L2CAP SDP, BLE GATT, or BLE spam — to render the device unusable during the exam.

Everything a Proctor Needs

Built for real exam environments, tested on actual Android hardware.

📡

Dual Bluetooth Scan

Scans Classic BT (BR/EDR) and BLE simultaneously. Device class decoded from Android's CoD bitmask — icon and color per type. Haptic vibration on new suspicious device.

flutter_blue_plus EventChannel

4 Attack Modes

RFCOMM connection flood, L2CAP PSM=1 pre-auth SDP flood (Android 10+), BLE GATT characteristic storm, and BLE advertisement spam (Apple/Samsung payloads).

Kotlin Coroutines MethodChannel
🗺️

Live Room Map

CustomPainter canvas shows all teachers as labeled circles with initials, detected devices as colored dots with uncertainty rings, and RSSI distance circles per teacher.

CustomPainter Trilateration
☁️

Firebase Cloud Sync

One teacher creates a session (6-digit code). Others join. GPS auto-positions all teachers. RSSI readings sync via Firebase Realtime Database in under 200ms.

Firebase RTDB Geolocator
📶

WiFi UDP Sync

Offline fallback: UDP multicast on 239.255.43.21:5555. WifiManager.MulticastLock prevents Android battery optimization from dropping packets. No internet required.

UDP Multicast MulticastLock
📋

Session Report

Full exam report: device list, suspicious count, located positions with coordinates, teacher coverage map. Copy to clipboard for immediate sharing.

PDF-ready Clipboard
🔐

Google Sign-In

Firebase Auth with Google. Teacher's display name auto-populates as their ID on the map. Sign-out from the app menu. Works with the same keystore as other apps.

Firebase Auth Google Sign-In
🔔

Smart Alerts

Haptic feedback on suspicious device detection. NEW banner with device name. Stale BLE devices auto-pruned after 60s. Unnamed device filter toggle.

HapticFeedback Timer.periodic
💾

Room Persistence

Room dimensions, teacher name, and position saved to SharedPreferences. Auto-restored on next launch. GPS-based positioning in Cloud mode requires no manual setup.

SharedPreferences GPS

Disruption at the Protocol Level

All attack logic runs in Kotlin coroutines via MethodChannel. The Flutter UI selects the mode; native Android executes it. Based on publicly documented CVEs: BlueBorne, BIAS, KNOB, L2Fuzz, CVE-2020-0022.

🔌

RFCOMM Flood

Parallel RFCOMM connection attempts. Real SDP UUIDs used first, random UUIDs as fallback. Up to 8 threads.

Classic BT
📶

L2CAP SDP Flood

PSM=1 pre-authentication SDP flood. Works before pairing. Most universal Classic BT attack. Android 10+ only.

Pre-Auth
📊

BLE GATT Storm

Rapid characteristic read/write loop on connected BLE device. Auto-reconnects on disconnect. Exhausts BLE stack resources.

BLE
📢

BLE Adv Spam

Fake Apple AirPods and Samsung Galaxy Buds advertisement payloads. Triggers pop-ups on nearby iPhones and Galaxy devices.

Area-Wide
Attack Log — L2CAP Flood · E4:7C:F9:2A:11:BB
13:41:02 [L2CAP] Starting flood on E4:7C:F9:2A:11:BB
13:41:02 [SDP] Fetching UUIDs via SDP...
13:41:03 [SDP] Found 3 UUIDs
13:41:03 [THREAD-1] PSM=1 connect attempt #1
13:41:03 [THREAD-2] PSM=1 connect attempt #1
13:41:03 [THREAD-1] Connection refused — retrying
13:41:04 [THREAD-1] PSM=1 connect attempt #2
13:41:04 [THREAD-2] Connected! Flooding...
13:41:05 [TARGET] Device disconnected
13:41:05 [THREAD-2] Reconnecting...
13:41:06 [THREAD-1] PSM=1 connect attempt #3
13:41:06 [STATUS] 24 attempts · 3 connects · Active
Live Room Map SYNC ACTIVE
Teacher (you)
Other teachers
Suspected device

RSSI → Real Position

Multiple teachers see the same device at different signal strengths. The path-loss model converts RSSI to distance; inverse-square weighted centroid places the device on the map.

1

RSSI → Distance

Path-loss model: d = 10^((-59 - rssi) / 25)
n=2.5 (indoor), txPower=-59 dBm

2

Inverse-Square Weighting

Weight per teacher: w = 1 / d²
Closer teacher → higher confidence

3

Weighted Centroid

x = Σ(tX × w) / Σ(w)
Applied for both X and Y axes

4

Uncertainty Radius

σ = avgDist × 0.5
Drawn as a ring on the map canvas

Works On Any Network

Two sync channels — choose based on your network environment.

📶

WiFi Mode

Local Network

UDP multicast on 239.255.43.21:5555. All teacher phones must be on the same WiFi. Zero latency. No internet required. Manual position setup on room grid.

Works without internet Sub-5ms sync latency WifiManager.MulticastLock Manual room position tap
☁️

Cloud Mode

Firebase

One teacher creates a session → 6-digit code → others join. GPS auto-positions all teachers on a 30×30m virtual room. Works across different WiFi networks.

6-digit session code sharing GPS auto-positioning Works on mobile data No manual setup needed
Cloud Mode Data Flow
👤

Host Creates Session

Teacher A taps "Create Session". GPS fix taken. Code XK4-921 generated. Session node written to Firebase RTDB.

👥

Others Join

Teachers B & C enter the code. GPS positions pushed to sessions/XK4921/teachers/.

📡

BLE Scan + Broadcast

Each teacher's RSSI readings pushed to readings/{mac}/{teacherName}/ with GPS lat/lng.

🗺️

GPS → Room Coords

Host GPS = origin (15,15). Delta: x = Δlng × 111320 × cos(lat). All teachers appear on the map.

📍

Live Trilateration

Incoming readings from other teachers trigger re-computation. Device position updates on all phones simultaneously.

Built on a Solid Stack

Flutter / Dart

UI, state management (Provider pattern), BLE scanning, screen navigation.

v3.44 · Dart 3.5

Kotlin Android

All Classic BT and attack logic. MethodChannel + EventChannel bridge to Flutter. Coroutines for parallel attacks.

Kotlin 2.1.0 · AGP 8.7.3

Firebase

Realtime Database for Cloud sync. Firebase Auth for Google Sign-In. Sub-200ms latency.

firebase_core ^3.6

Geolocator

High-accuracy GPS stream. ±2–5m accuracy indoors. Powers the automatic teacher positioning in Cloud mode.

geolocator ^13.0

Provider

ChangeNotifier pattern. ScanProvider, LocalizationProvider, SessionProvider, AuthProvider — clean separation.

provider ^6.1.2

SharedPreferences

Persists room dimensions, teacher name and position between sessions. Auto-restores on launch.

^2.3.4

UDP Multicast

dart:io RawDatagramSocket. Group 239.255.43.21:5555. WifiManager.MulticastLock in Kotlin for reliability.

dart:io native

flutter_blue_plus

BLE scanning and connection. Works alongside the native Classic BT EventChannel without conflict.

^1.35.5

5-Minute Presentation Flow

A timed walkthrough of every major feature.

0:00–0:30

Start Scanning

Open app, sign in with Google. Start BLE + Classic scan. Devices appear live with NEW banner, RSSI, device class icons, and suspicious flag.

0:30–1:00

Device Intelligence

Tap a device — show MAC address, Bluetooth class (headset = 🎧), RSSI strength, first-seen timestamp, and the suspicious auto-detection reasoning.

1:00–2:00

L2CAP Attack

Tap ⚡ on a Classic BT device → select L2CAP mode → Start. Live attack log scrolls with PSM=1 connection attempts. Device becomes unresponsive.

2:00–2:30

BLE Spam

Tap the BLE Spam FAB → nearby iPhones show "AirPods detected" pop-ups, Galaxy phones show pairing prompts. Demonstrate area-wide disruption.

2:30–3:30

Multi-Teacher Map

Open Room Map. Three teachers at different corners. BLE earbud localizes between them with a colored dot, uncertainty circle, and RSSI per teacher.

3:30–4:30

Research Basis

Explain: L2Fuzz (L2CAP), CVE-2020-0022 (BlueFrag), KNOB attack (entropy reduction), BIAS (role switching), GATTacker (BLE MITM). Show it's grounded in published security research.

4:30–5:00

Q&A + Report

Export the session report to clipboard. Show located coordinates. The scan continues live in the background.