Security Forem

c_davenport795@proton.me
c_davenport795@proton.me

Posted on

I put an Air-Gapped Neural Network in my pocket (Python on Android)

The Pocket Mainframe

I shared my desktop AI defense system. Now I'm sharing the mobile unit.

This is NEXUS v9, a sovereign network intelligence tool designed to run natively on Android (via Pydroid3 or Termux).

Most "AI apps" on your phone are just wrappers sending your data to a cloud API. This is different. This is a complete, self-contained neural network running locally on my device.

The Mobile Engineering Challenge

Running a complex defense system on a phone presents unique challenges:

  1. No Root Access: I can't easily access system-level process data.
  2. Dependency Hell: Installing numpy or scipy on Android can be tricky.
  3. Battery/Resources: Spawning 50 threads kills a battery instantly.

The Architecture

To make this work, I had to rewrite the core engine:

  • AsyncIO Network Scanner: Replaced threading with asyncio. It scans hundreds of ports/hosts concurrently without locking up the UI or draining the battery.
  • Pure Python Fallbacks: I wrote a custom NeuralNetwork class that checks for numpy. If it's missing, it seamlessly degrades to a pure Python implementation of the dense layers and activation functions. It trains on-device.
  • Synthetic Baselines: Since I can't always read raw CPU/RAM on non-rooted devices, the system builds its own baseline of "normal" behavior and detects anomalies relative to its own process state.

Why do this?

Because "Personal Security" shouldn't require a server rack. I can walk into a network environment, pull out my phone, and have the same level of anomaly detection and analysis as I do at my desk—completely offline.

Repo updated with the Android Branch:
https://github.com/SovArcNeo

Top comments (0)