DEV Community

Cover image for I Turned an Old $60 Android Phone into a 24/7 Edge AI and S3 Server (4.2W Draw)
Soham Pal
Soham Pal

Posted on

I Turned an Old $60 Android Phone into a 24/7 Edge AI and S3 Server (4.2W Draw)

instead of buying another raspberry pi or letting an old xiaomi redmi 9i rot in a drawer, i turned it into a 24/7 edge ai node and local s3/sqlite storage server running on about 1.2w idle and 4.2w peak.

hardware:

  • mediatek helio g25 (8x cortex-a53 cores)

  • 4gb lpddr4x ram

  • emmc 5.1 internal flash + microsd

  • built-in 5000mah battery acting as a zero-cost ups

the software stack:

  • rooted android base running a linux chroot with partial wakelocks so android's aggressive lowmemorykiller daemon and doze mode don't quietly murder background processes.

  • speech-to-text: whisper.cpp (base.en) compiled with arm neon simd vector instructions on the a53 cores.

  • llm: llama.cpp running quantized qwen 2.5 (0.5b instruct q4_k_m).

  • memory governor: an in-process jit governor that automatically evicts idle models back to disk after 75 seconds so the 4gb ram never gets oom-killed.

  • storage & db: project-isolated sqlite in wal mode plus an s3-compatible blob store with an in-memory hot ram index.

the real headache: grid outages & zombie tunnels

the power cuts out roughly once a day here. the phone’s battery means the node itself never shuts down, but downstream chaos was the real killer: the router dies, wi-fi drops, and temporary cloudflare quick tunnels would instantly get killed with http 530s or freeze on stale tcp sockets once the connection returned.

to make it genuinely self-healing, i moved to a named tunnel with a persistent domain and wrote a background supervisor watchdog. the second wi-fi comes back up post-outage, it flushes dead socket states, tears down zombie listeners, and resyncs the cloudflare edge worker so the database, storage, and inference endpoints recover without me ever touching the phone.

actual numbers:

  • qwen 2.5: ~7 tok/sec

  • local sqlite / s3: sub-millisecond on lan

  • thermals: sits around 32-34°c with no active cooling
    Testing Qwen Locally On Edge Server

Top comments (1)

Collapse
 
reidmarlow profile image
Reid Marlow

The battery acting as a zero-cost UPS is great until the charging circuit swells the pouch after six months pinned at 10%. If the kernel exposes charging control via sysfs or an ACC daemon, capping the charge limit at 7% saves the hardware from turning into a spicy pillow while keeping enough buffer for grid drops.