Member-only story
Think Twice : Before You Ship AI-Generated Code to Production
A real story about Android Keystore, 4 million users, and why “looks correct” isn’t the same as “is safe.”
A few days ago, I found myself staring at a production crash that looked innocent enough:
java.security.InvalidKeyException: Keystore operation failed
SECURE_HW_COMMUNICATION_FAILEDNothing unusual. Android Keystore. Hardware-backed encryption. One of those bugs that every Android engineer eventually meets.
Like many engineers in 2026, I did what most of us do nowadays — I asked AI.
Actually, I asked two AIs.
- Both were incredibly confident.
- Both sounded convincing.
- Both were wrong.
The Crash
The crash happened while initializing a Cipher using an AES key stored inside Android Keystore.








