You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repo hosts Android-side utilities for drone rotor detection.
4
-
Binary assets (TensorFlow Lite model and icons) are stored in base64 to
5
-
keep the repo lean for air-gapped deployments.
3
+
Android-side utilities for rotor detection and Wi‑Fi reconnaissance. Assets ship as base64 to keep the repo lean for air-gapped deployments and are restored automatically during Gradle builds.
6
4
7
5
## Bootstrap
8
6
9
-
After cloning, restore the binary assets:
7
+
After cloning, restore the binary assets (TensorFlow Lite model and PNG drawables):
10
8
11
9
```bash
12
10
python3 scripts/bootstrap_assets.py
13
11
```
14
12
15
-
This will recreate the `rotor_v1.tflite` model and the required PNG
16
-
drawables under `app/src/main/...`.
13
+
Gradle also depends on this script via the `preBuild` hook, so IDE and CI builds will automatically decode assets into `app/src/main/...` if Python is available.
17
14
18
15
## Pipeline
19
16
20
-
1.**Asset bootstrap** – Decode the model and icons from `assets/*.b64` using the script above. Generated files land under `app/src/main/...`.
21
-
2.**Runtime wiring** – `MainActivity` creates a `DroneSignalDetector`, which launches a coroutine to fetch flight data and schedule Wi‑Fi scans.
22
-
3.**Scan handling** – `WifiScanReceiver` receives scan results. Future work will feed the TFLite model for rotor classification.
17
+
1.**Asset bootstrap** – Decode the model and icons from `assets/*.b64` using the script above (or let Gradle call it).
18
+
2.**Runtime wiring** – `MainActivity` requests Wi‑Fi/location permissions, wires a simple UI, and calls `DroneSignalDetector.startScan()`.
19
+
3.**Scan handling** – `DroneSignalDetector` schedules repeated `WifiManager.startScan()` calls, ingests stub flight data, and surfaces scan results plus the last telemetry snapshot to the UI via callbacks.
20
+
21
+
## Building
22
+
23
+
This repo ships a minimal Gradle wrapper script for offline/air-gapped work. Supply a compatible `gradle/wrapper/gradle-wrapper.jar` (from Gradle 8.2.1) in your environment, then run:
24
+
25
+
```bash
26
+
./gradlew assembleDebug
27
+
```
28
+
29
+
If you prefer a hosted toolchain, open the project in Android Studio (Giraffe+), accept SDK prompts, and build the `app` module. Remember to run the asset bootstrap script if Python is missing from your build host.
23
30
24
31
## Testing
25
32
26
-
Verify the asset bootstrap step restores the binaries:
33
+
To validate the asset bootstrap step:
27
34
28
35
```bash
29
36
python3 scripts/bootstrap_assets.py
30
37
```
31
38
32
-
Each asset should report a `decoded` message. Remove the generated `app/src/main/assets` and `app/src/main/res` directories after testing to keep the repo text‑only.
39
+
Each asset should report a `decoded` message. Remove the generated `app/src/main/assets` and `app/src/main/res/drawable` contents after testing to keep the repo text‑only.
0 commit comments