← Blog

Engineering · Chapter 9 of 16·1 min read

The Native Module We Almost Lost

For a while, real work on Nia's Android app existed on one laptop and nowhere else — git had never actually seen it, because of one overly broad line in a config file.

Listen to this story

0:00
Nia

Building a real Android module

Real phone control needed more than a thin wrapper around existing APIs — it needed genuine native code, written, built, and shipped as part of the Android app itself. That work happened the normal way: iterating locally, testing on a real device, committing progress as it went.

It looked committed

Nothing about the day-to-day work looked wrong. The module existed in the project, ran on a real phone, and had been worked on across multiple sessions like anything else in the codebase.

One line was quietly excluding all of it

A single rule in a config file meant to ignore one specific build-output folder had been written broadly enough to also match the real, hand-written native source sitting right next to it. Every commit since that rule was added had been silently skipping the entire module — the Kotlin source, the manifest, the resources. All of it.

What that actually means

Real, working native code existed in exactly one place: the working directory of one laptop. No history. No backup. Nothing recoverable except that, by chance, it was still sitting there uncommitted and untouched when the mistake was finally caught.

It wasn't lost. It came close enough that the difference was luck, not process.

The fix was narrow and immediate — tighten the rule so it only ever matches what it was supposed to, and commit everything it had been hiding.

Then the real work continued

From that recovered base, phone control kept moving fast through the rest of that month: write actions reaching the same level of control as the desktop version, a proper confirmation flow on mobile, notification handling, a find-my-phone path, gesture macros, and battery-aware behavior so none of it drained a phone just sitting in someone's pocket.