DEV Community

Cover image for My Screenshot Tool Broke on Android 16 — Here's What Actually Happened
hiyoyo
hiyoyo

Posted on

My Screenshot Tool Broke on Android 16 — Here's What Actually Happened

I build Mac utilities for Android developers. When Android 16 dropped, one of my apps quietly stopped working — no error on launch, no crash, just screenshots not transferring. Here's how I tracked it down without owning an Android 16 device.

What Broke

HiyokoShot is a screenshot transfer tool. You take a screenshot on your Android, it shows up on your Mac automatically. Simple concept, painful to debug when it silently stops working.

The symptom: screenshots taken on the device weren't being detected. Manual transfer still worked fine. The app launched without errors. Just... nothing happened automatically.

The First Clue: A User's Log

I didn't catch this myself. A user on Android 16 reached out with a detailed bug report and shared their system logs.

The logs showed the app was detecting the device correctly, scanning the screenshot folder — and finding nothing. Every scan came back empty, even when there were clearly files there.

That narrowed it down fast: not a connection issue, not a permissions issue. Something was wrong with how I was reading the file list.

The Actual Cause

I was using a shell command to list files on the device. A flag I'd been using appends extra characters to filenames under certain conditions — a detail I'd never questioned, because it had always worked before.

The result: filenames came back with an unexpected trailing character. So instead of:

Screenshot_20260101_120000.png
Enter fullscreen mode Exit fullscreen mode

The output looked like:

Screenshot_20260101_120000.png*
Enter fullscreen mode Exit fullscreen mode

My code was checking if the filename ended with .png — which it didn't, because of that extra character. Every file failed the check. The scan returned zero results. Screenshots were invisible to the app.

Why It Showed Up on Android 16

This wasn't a new bug I introduced — it was always there. I identified what changed on the Android 16 side, but the details aren't something I want to publish. What matters is that an assumption I'd built on silently stopped holding.

Older Android versions masked the issue. Android 16 exposed it.

The Fix

Strip the unexpected characters from filenames before doing any extension checks. One line of cleanup applied before the comparison, and the scanner started working correctly across all Android versions.

What I Learned

Silent failures are the worst kind. The app appeared to work — it connected, it scanned, it just never found anything. No error surfaced to the user or the logs until someone dug into the raw output.

User logs are irreplaceable. I couldn't reproduce this without an Android 16 device. The user's detailed report and log output made diagnosis possible in a fraction of the time it would have taken otherwise.

Test your assumptions about command output. I assumed the file listing command returned clean filenames. It didn't. Flags you've used for years can produce unexpected output in a different environment.

Closing

If your app reads file listings from Android over ADB and things stopped working on Android 16 — check what your listing command actually returns. The output might not be what you expect.


Follow me on X: @hiyoyok

Top comments (0)